cryptol-3.1.0: Cryptol: The Language of Cryptography
Copyright(c) 2013-2016 Galois Inc.
LicenseBSD3
Maintainercryptol@galois.com
Stabilityprovisional
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cryptol.Parser.NoPat

Description

The purpose of this module is to convert all irrefutable 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. We also merge empty DForeign binds with their cryptol implementations, if they exist.

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

RemovePatterns (NestedModule PName) Source # 
Instance details

Defined in Cryptol.Parser.NoPat

RemovePatterns (Program PName) Source # 
Instance details

Defined in Cryptol.Parser.NoPat

RemovePatterns [Decl PName] Source # 
Instance details

Defined in Cryptol.Parser.NoPat

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 #

Instances

Instances details
Generic Error Source # 
Instance details

Defined in Cryptol.Parser.NoPat

Associated Types

type Rep Error :: Type -> Type #

Methods

from :: Error -> Rep Error x #

to :: Rep Error x -> Error #

Show Error Source # 
Instance details

Defined in Cryptol.Parser.NoPat

Methods

showsPrec :: Int -> Error -> ShowS #

show :: Error -> String #

showList :: [Error] -> ShowS #

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 -> () #

type Rep Error Source # 
Instance details

Defined in Cryptol.Parser.NoPat

type Rep Error = D1 ('MetaData "Error" "Cryptol.Parser.NoPat" "cryptol-3.1.0-276efOa9Q2aIFSEzDdp2Mp" '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])) :+: C1 ('MetaCons "InvalidConstructorPattern" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Range)))))