liquidhaskell-0.8.10.2: 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 Source #

Minimal complete definition

askHscEnv

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

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

data ModuleInfo Source #

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 Source #

Desugar a typechecked module.

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

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.