ghc-hs-meta-0.1.3.0: Translate Haskell source to Template Haskell expression
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Haskell.Meta.Parse

Description

This module is here to parse Haskell expression using the GHC Api

Synopsis

Documentation

parseExp :: String -> Either (Int, Int, String) Exp Source #

Parse a Haskell expression from source code into a Template Haskell expression. See parseExpWithExts or parseExpWithFlags for customizing with additional extensions and settings.

parseExpWithExts :: [Extension] -> String -> Either (Int, Int, String) Exp Source #

Parse a Haskell expression from source code into a Template Haskell expression using a given set of GHC extensions.

parseExpWithFlags :: DynFlags -> String -> Either (Int, Int, String) Exp Source #

Parse a Haskell expression from source code into a Template Haskell expression using a given set of GHC DynFlags.

parseHsExpr :: DynFlags -> String -> Either (Int, Int, String) (HsExpr GhcPs) Source #

Run the GHC parser to parse a Haskell expression into a HsExpr.