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 | Safe
Language | Haskell98

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 and pragmas with the names to which they belong.

# Documentation

class RemovePatterns t where Source #

Minimal complete definition

removePatterns

Methods

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

Eliminate all patterns in a program.

Instances

RemovePatterns [Decl PName] Source # |
Methods removePatterns :: [Decl PName] -> ([Decl PName], [Error]) Source #
RemovePatterns (Expr PName) Source # |
Methods removePatterns :: Expr PName -> (Expr PName, [Error]) Source #
RemovePatterns (Module PName) Source # |
Methods removePatterns :: Module PName -> (Module PName, [Error]) Source #
RemovePatterns (Program PName) Source # |
Methods removePatterns :: Program PName -> (Program 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

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

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