Safe Haskell | None |
---|
Documentation
exprtype :: [String] -> FilePath -> String -> IO (Type, String)Source
This function takes a filename and an expression and evaluates the type of this expression in the context of the passed file. The result value is a tuple where the first element is GHCs representation of the type and the second one is the stringified version of the type.
The first two command line parameter is:
- The GHC options as string list (as they should appear on the command
line, e.g.
["-isrc"]
)
exprtypeM :: GhcMonad m => FilePath -> String -> m (Type, String)Source
This is a variant of exprtype that runs within the GHC monad and therefore allows a more fine-grained control over the behaviour of GHC.
showExprTypeResult :: (Type, String) -> StringSource
This function creates a string of the result returned by exprtype or exprtypeM.
The string has exactly the format that should be understood by text editors that are using this mode.