exon-1.6.1.1: Customizable quasiquote interpolation
Safe HaskellSafe-Inferred
LanguageGHC2021

Exon.Haskell.Parse

Description

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

Stolen from ghc-hs-meta

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.