cryptol-2.4.0: Cryptol: The Language of Cryptography

Copyright | (c) 2013-2016 Galois Inc.
License | BSD3
Maintainer | cryptol@galois.com
Stability | provisional
Portability | portable
Safe Haskell | Trustworthy
Language | Haskell98

Cryptol.Parser

Description

# Documentation

parseModule :: Config -> Text -> Either ParseError (Module PName) Source #

parseProgram :: Layout -> Text -> Either ParseError (Program PName) Source #

parseProgramWith :: Config -> Text -> Either ParseError (Program PName) Source #

parseExpr :: Text -> Either ParseError (Expr PName) Source #

parseExprWith :: Config -> Text -> Either ParseError (Expr PName) Source #

parseDecl :: Text -> Either ParseError (Decl PName) Source #

parseDeclWith :: Config -> Text -> Either ParseError (Decl PName) Source #

parseDecls :: Text -> Either ParseError [Decl PName] Source #

parseDeclsWith :: Config -> Text -> Either ParseError [Decl PName] Source #

parseLetDecl :: Text -> Either ParseError (Decl PName) Source #

parseLetDeclWith :: Config -> Text -> Either ParseError (Decl PName) Source #

parseRepl :: Text -> Either ParseError (ReplInput PName) Source #

parseReplWith :: Config -> Text -> Either ParseError (ReplInput PName) Source #

parseSchema :: Text -> Either ParseError (Schema PName) Source #

parseSchemaWith :: Config -> Text -> Either ParseError (Schema PName) Source #

parseModName :: String -> Maybe ModName Source #

parseHelpName :: String -> Maybe PName Source #

data ParseError Source #

Constructors

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

Instances

Show ParseError Source # |
Methods showsPrec :: Int -> ParseError -> ShowS # show :: ParseError -> String # showList :: [ParseError] -> ShowS #
Generic ParseError Source # |
Associated Types type Rep ParseError :: * -> * # Methods from :: ParseError -> Rep ParseError x # to :: Rep ParseError x -> ParseError #
NFData ParseError Source # |
Methods rnf :: ParseError -> () #
PP ParseError Source # |
Methods ppPrec :: Int -> ParseError -> Doc Source #
type Rep ParseError Source # |

type Rep ParseError = D1 (MetaData "ParseError" "Cryptol.Parser.ParserUtils" "cryptol-2.4.0-CN28BMG3PUFD1lr9WvB1U9" False) ((:+:) (C1 (MetaCons "HappyError" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FilePath)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Position)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Token)))))) (C1 (MetaCons "HappyErrorMsg" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Range)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)))))

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 |