sslang-0.1.0.0
Safe HaskellNone
LanguageHaskell2010

Front

Description

Front end of the compiler pipeline.

Throughout this stage, high-level syntax is progressively parsed and desugared into simpler AST constructs.

Synopsis

Documentation

data Mode Source #

Operation modes for the front end compiler stage.

Constructors

Continue

Compile end-to-end (default).

DumpTokens

Print the token stream from the scanner.

DumpAst

Print the initial parsed AST, before operators are parsed.

DumpAstParsed

Print the AST after operators are parsed.

DumpAstFinal

Print the AST after all desugaring, just before lowering.

Instances

Instances details
Eq Mode Source # 
Instance details

Defined in Front

Methods

(==) :: Mode -> Mode -> Bool #

(/=) :: Mode -> Mode -> Bool #

Show Mode Source # 
Instance details

Defined in Front

Methods

showsPrec :: Int -> Mode -> ShowS #

show :: Mode -> String #

showList :: [Mode] -> ShowS #

newtype Options Source #

Compiler options for the front end compiler stage.

Constructors

Options 

Fields

Instances

Instances details
Eq Options Source # 
Instance details

Defined in Front

Methods

(==) :: Options -> Options -> Bool #

(/=) :: Options -> Options -> Bool #

Show Options Source # 
Instance details

Defined in Front

Default Options Source # 
Instance details

Defined in Front

Methods

def :: Options Source #

options :: [OptDescr (Options -> Options)] Source #

CLI options for the front end compiler stage.

parseAst :: Options -> String -> Pass Program Source #

Parse a fully-formed AST from some String input.

checkAst :: Options -> Program -> Pass () Source #

Semantic checking on an AST.

run :: Options -> String -> Pass Program Source #

Front end compiler stage.