cryptol-2.2.6: Cryptol: The Language of Cryptography

Safe Haskell | Trustworthy
Language | Haskell98

Cryptol.Parser

# Documentation

parseModule :: Config -> String -> Either ParseError Module Source

parseProgram :: Layout -> String -> Either ParseError Program Source

parseProgramWith :: Config -> String -> Either ParseError Program Source

parseExpr :: String -> Either ParseError Expr Source

parseExprWith :: Config -> String -> Either ParseError Expr Source

parseDecl :: String -> Either ParseError Decl Source

parseDeclWith :: Config -> String -> Either ParseError Decl Source

parseDecls :: String -> Either ParseError [Decl] Source

parseDeclsWith :: Config -> String -> Either ParseError [Decl] Source

parseLetDecl :: String -> Either ParseError Decl Source

parseLetDeclWith :: Config -> String -> Either ParseError Decl Source

parseRepl :: String -> Either ParseError ReplInput Source

parseReplWith :: Config -> String -> Either ParseError ReplInput Source

parseSchema :: String -> Either ParseError Schema Source

parseSchemaWith :: Config -> String -> Either ParseError Schema Source

parseModName :: String -> Maybe ModName Source

data ParseError Source

Constructors

HappyError FilePath Position (Maybe Token) |
HappyErrorMsg Range String |

Instances

Show ParseError Source |
PP ParseError Source |

ppError :: ParseError -> Doc Source

data Layout Source

Constructors

Layout |
NoLayout |

data Config Source

Constructors

Config |

Fields

cfgSource :: !FilePath

  File that we are working on

cfgLayout :: !Layout

  Settings for layout processing

cfgPreProc :: PreProc

  Preprocessor settings

cfgAutoInclude :: [FilePath]

  Implicit includes

cfgModuleScope :: Bool

  When we do layout processing should we add a vCurly (i.e., are we parsing a list of things).

defaultConfig :: Config Source

guessPreProc :: FilePath -> PreProc Source

data PreProc Source

Constructors

None |
Markdown |
LaTeX |