psilo
Safe HaskellSafe-Inferred
LanguageHaskell2010

Parser

Description

For now all "surface syntax" - eg, text that a human would be expected to type - is modeled as s-expressions, which you can read about in the Syntax module.

After text is parsed into s-expressions it is then transformed into whatever intermediate language representation it needs to be in.

Documentation

numParser :: Parser (Free SExpr ()) Source #

symParser :: Parser (Free SExpr ()) Source #

boolParser :: Parser (Free SExpr ()) Source #

listParser :: Parser (Free SExpr ()) Source #

parens :: Parser a -> Parser a Source #

sexprParser :: Parser (Free SExpr ()) Source #

parseSexpr :: Maybe (Result (Free SExpr ())) -> Text -> Result (Free SExpr ()) Source #

data IResult i r #

Constructors

Fail i [String] String 
Partial (i -> IResult i r) 
Done i r 

Instances

Instances details
Functor (IResult i) 
Instance details

Defined in Data.Attoparsec.Internal.Types

Methods

fmap :: (a -> b) -> IResult i a -> IResult i b #

(<$) :: a -> IResult i b -> IResult i a #

(Show i, Show r) => Show (IResult i r) 
Instance details

Defined in Data.Attoparsec.Internal.Types

Methods

showsPrec :: Int -> IResult i r -> ShowS #

show :: IResult i r -> String #

showList :: [IResult i r] -> ShowS #

(NFData i, NFData r) => NFData (IResult i r) 
Instance details

Defined in Data.Attoparsec.Internal.Types

Methods

rnf :: IResult i r -> () #