hls-tactics-plugin-1.6.2.0: Wingman plugin for Haskell Language Server
Safe HaskellNone
LanguageHaskell2010

Wingman.Context

Synopsis

Documentation

getInstance :: MonadReader Context m => Class -> [Type] -> m (Maybe (Class, PredType)) Source #

Determine if there is an instance that exists for the given Class at the specified types. Deeply checks contexts to ensure the instance is actually real.

If so, this returns a PredType that corresponds to the type of the dictionary.

hasClassInstance :: MonadReader Context m => PredType -> m Bool Source #

Like getInstance, but only returns whether or not it succeeded. Can fail fast, and uses a cached Theta from the context.