cryptol-3.0.0: Cryptol: The Language of Cryptography

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

Cryptol.Parser.NoPat

Description

The purpose of this module is to convert all patterns to variable patterns. It also eliminates pattern bindings by de-sugaring them into `Bind`. Furthermore, here we associate signatures, fixities, and pragmas with the names to which they belong.

# Documentation

class RemovePatterns t where Source #

Methods

removePatterns :: t -> (t, [Error]) Source #

Eliminate all patterns in a program.

#### Instances

Instances details

RemovePatterns (Expr PName) Source # |
Instance details Defined in Cryptol.Parser.NoPat Methods removePatterns :: Expr PName -> (Expr PName, [Error]) Source #
RemovePatterns (NestedModule PName) Source # |
Instance details Defined in Cryptol.Parser.NoPat Methods removePatterns :: NestedModule PName -> (NestedModule PName, [Error]) Source #
RemovePatterns (Program PName) Source # |
Instance details Defined in Cryptol.Parser.NoPat Methods removePatterns :: Program PName -> (Program PName, [Error]) Source #
RemovePatterns [Decl PName] Source # |
Instance details Defined in Cryptol.Parser.NoPat Methods removePatterns :: [Decl PName] -> ([Decl PName], [Error]) Source #
RemovePatterns (ModuleG mname PName) Source # |
Instance details Defined in Cryptol.Parser.NoPat Methods removePatterns :: ModuleG mname PName -> (ModuleG mname PName, [Error]) Source #

data Error Source #

Constructors

MultipleSignatures PName [Located (Schema PName)] |
SignatureNoBind (Located PName) (Schema PName) |
PragmaNoBind (Located PName) Pragma |
MultipleFixities PName [Range] |
FixityNoBind (Located PName) |
MultipleDocs PName [Range] |

#### Instances

Instances details

Generic Error Source # |
Instance details Defined in Cryptol.Parser.NoPat Associated Types type Rep Error :: Type -> Type Source # Methods from :: Error -> Rep Error x Source # to :: Rep Error x -> Error Source #
Show Error Source # |
Instance details Defined in Cryptol.Parser.NoPat Methods showsPrec :: Int -> Error -> ShowS Source # show :: Error -> String Source # showList :: [Error] -> ShowS Source #
PP Error Source # |
Instance details Defined in Cryptol.Parser.NoPat Methods ppPrec :: Int -> Error -> Doc Source #
NFData Error Source # |
Instance details Defined in Cryptol.Parser.NoPat Methods rnf :: Error -> () Source #
type Rep Error Source # |

Instance details

Defined in Cryptol.Parser.NoPat

type Rep Error = D1 ('MetaData "Error" "Cryptol.Parser.NoPat" "cryptol-3.0.0-DBVDUAjB1JeD0WzkHH4ckn" 'False) ((C1 ('MetaCons "MultipleSignatures" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Located (Schema PName)])) :+: (C1 ('MetaCons "SignatureNoBind" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Located PName)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Schema PName))) :+: C1 ('MetaCons "PragmaNoBind" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Located PName)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Pragma)))) :+: (C1 ('MetaCons "MultipleFixities" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Range])) :+: (C1 ('MetaCons "FixityNoBind" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Located PName))) :+: C1 ('MetaCons "MultipleDocs" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Range])))))