liquidhaskell-0.8.10.1: Liquid Types for Haskell
Safe HaskellNone
LanguageHaskell98

Language.Haskell.Liquid.GHC.GhcMonadLike

Description

This module introduces a "lighter" GhcMonad typeclass which doesn't require an instance of ExceptionMonad, and can therefore be used for both CoreM and Ghc.

Synopsis

Types and type classes

class HasHscEnv m #

Minimal complete definition

askHscEnv

Instances

Instances details
HasHscEnv TcM # 
Instance details

Defined in Language.Haskell.Liquid.GHC.GhcMonadLike

Methods

askHscEnv :: TcM HscEnv #

HasHscEnv Ghc # 
Instance details

Defined in Language.Haskell.Liquid.GHC.GhcMonadLike

Methods

askHscEnv :: Ghc HscEnv #

HasHscEnv Hsc # 
Instance details

Defined in Language.Haskell.Liquid.GHC.GhcMonadLike

Methods

askHscEnv :: Hsc HscEnv #

HasHscEnv CoreM # 
Instance details

Defined in Language.Haskell.Liquid.GHC.GhcMonadLike

HasHscEnv (IfM lcl) # 
Instance details

Defined in Language.Haskell.Liquid.GHC.GhcMonadLike

Methods

askHscEnv :: IfM lcl HscEnv #

(ExceptionMonad m, HasHscEnv m) => HasHscEnv (GhcT m) # 
Instance details

Defined in Language.Haskell.Liquid.GHC.GhcMonadLike

Methods

askHscEnv :: GhcT m HscEnv #

class (Functor m, MonadIO m, HasHscEnv m, HasDynFlags m) => GhcMonadLike m #

A typeclass which is very similar to the existing GhcMonad, but it doesn't impose a ExceptionMonad constraint.

data ModuleInfo #

Our own simplified version of ModuleInfo to overcome the fact we cannot construct the "original" one as the constructor is not exported, and getHomeModuleInfo and getPackageModuleInfo are not exported either, so we had to backport them as well.

Functions and typeclass methods

desugarModule :: (GhcMonadLike m, IsTypecheckedModule t) => ModSummary -> t -> m ModGuts #

Desugar a typechecked module.

findModule :: GhcMonadLike m => ModuleName -> Maybe FastString -> m Module #

Takes a ModuleName and possibly a UnitId, and consults the filesystem and package database to find the corresponding Module, using the algorithm that is used for an import declaration.