| Copyright | (c) 2013-2016 Galois Inc. |
|---|---|
| License | BSD3 |
| Maintainer | cryptol@galois.com |
| Stability | provisional |
| Portability | portable |
| Safe Haskell | Safe |
| Language | Haskell2010 |
Cryptol.Parser.AST
Description
Synopsis
- data Ident
- mkIdent :: Text -> Ident
- mkInfix :: Text -> Ident
- isInfixIdent :: Ident -> Bool
- nullIdent :: Ident -> Bool
- identText :: Ident -> Text
- data ModName
- modRange :: Module name -> Range
- data PName
- getModName :: PName -> Maybe ModName
- getIdent :: PName -> Ident
- mkUnqual :: Ident -> PName
- mkQual :: ModName -> Ident -> PName
- data Named a = Named {}
- data Pass
- data Assoc
- data Schema n = Forall [TParam n] [Prop n] (Type n) (Maybe Range)
- data TParam n = TParam {}
- data Kind
- data Type n
- newtype Prop n = CType (Type n)
- tsName :: TySyn name -> Located name
- psName :: PropSyn name -> Located name
- tsFixity :: TySyn name -> Maybe Fixity
- psFixity :: PropSyn name -> Maybe Fixity
- type Module = ModuleG ModName
- data ModuleG mname name = Module {}
- mDecls :: ModuleG mname name -> [TopDecl name]
- mImports :: ModuleG mname name -> [Located Import]
- mModParams :: ModuleG mname name -> [ModParam name]
- mIsFunctor :: ModuleG mname nmae -> Bool
- isParamDecl :: TopDecl a -> Bool
- data ModuleDefinition name
- = NormalModule [TopDecl name]
- | FunctorInstance (Located (ImpName name)) (ModuleInstanceArgs name) (ModuleInstance name)
- | InterfaceModule (Signature name)
- data ModuleInstanceArgs name
- = DefaultInstArg (Located (ModuleInstanceArg name))
- | DefaultInstAnonArg [TopDecl name]
- | NamedInstArgs [ModuleInstanceNamedArg name]
- data ModuleInstanceNamedArg name = ModuleInstanceNamedArg (Located Ident) (Located (ModuleInstanceArg name))
- data ModuleInstanceArg name
- = ModuleArg (ImpName name)
- | ParameterArg Ident
- | AddParams
- type ModuleInstance name = Map name name
- emptyModuleInstance :: Ord name => ModuleInstance name
- newtype Program name = Program [TopDecl name]
- data TopDecl name
- = Decl (TopLevel (Decl name))
- | DPrimType (TopLevel (PrimType name))
- | TDNewtype (TopLevel (Newtype name))
- | TDEnum (TopLevel (EnumDecl name))
- | Include (Located FilePath)
- | DParamDecl Range (Signature name)
- | DModule (TopLevel (NestedModule name))
- | DImport (Located (ImportG (ImpName name)))
- | DModParam (ModParam name)
- | DInterfaceConstraint (Maybe (Located Text)) (Located [Prop name])
- data Decl name
- data Fixity = Fixity {}
- defaultFixity :: Fixity
- data FixityCmp
- compareFixity :: Fixity -> Fixity -> FixityCmp
- data TySyn n = TySyn (Located n) (Maybe Fixity) [TParam n] (Type n)
- data PropSyn n = PropSyn (Located n) (Maybe Fixity) [TParam n] [Prop n]
- data Bind name = Bind {}
- bindParams :: Bind name -> [Pattern name]
- bindHeaderLoc :: Bind name -> Maybe Range
- data BindParams name
- = PatternParams [Pattern name]
- | DroppedParams (Maybe Range) Int
- dropParams :: BindParams name -> BindParams name
- noParams :: BindParams name
- data BindDef name
- type LBindDef = Located (BindDef PName)
- data BindImpl name
- = DExpr (Expr name)
- | DPropGuards [PropGuardCase name]
- bindImpl :: Bind name -> Maybe (BindImpl name)
- exprDef :: Expr name -> BindDef name
- data Pragma
- data ExportType
- data TopLevel a = TopLevel {}
- type Import = ImportG ModName
- data ImportG mname = Import {}
- data ImportSpec
- data ImpName name
- impNameModPath :: ImpName Name -> ModPath
- data Newtype name = Newtype {}
- data EnumDecl name = EnumDecl {}
- data EnumCon name = EnumCon {}
- data PrimType name = PrimType {}
- data ParameterType name = ParameterType {}
- data ParameterFun name = ParameterFun {}
- data ParameterConstraint name = ParameterConstraint {}
- newtype NestedModule name = NestedModule (ModuleG name name)
- data Signature name = Signature {
- sigImports :: ![Located (ImportG (ImpName name))]
- sigTypeParams :: [ParameterType name]
- sigConstraints :: [Located (Prop name)]
- sigDecls :: [SigDecl name]
- sigFunParams :: [ParameterFun name]
- data SigDecl name
- data ModParam name = ModParam {}
- data ParamDecl name
- = DParameterType (ParameterType name)
- | DParameterFun (ParameterFun name)
- | DParameterDecl (SigDecl name)
- | DParameterConstraint (ParameterConstraint name)
- data PropGuardCase name = PropGuardCase {}
- data ReplInput name
- = ExprInput (Expr name)
- | LetInput [Decl name]
- | EmptyInput
- data Expr n
- = EVar n
- | ELit Literal
- | EGenerate (Expr n)
- | ETuple [Expr n]
- | ERecord (Rec (Expr n))
- | ESel (Expr n) Selector
- | EUpd (Maybe (Expr n)) [UpdField n]
- | EList [Expr n]
- | EFromTo (Type n) (Maybe (Type n)) (Type n) (Maybe (Type n))
- | EFromToBy Bool (Type n) (Type n) (Type n) (Maybe (Type n))
- | EFromToDownBy Bool (Type n) (Type n) (Type n) (Maybe (Type n))
- | EFromToLessThan (Type n) (Type n) (Maybe (Type n))
- | EInfFrom (Expr n) (Maybe (Expr n))
- | EComp (Expr n) [[Match n]]
- | EApp (Expr n) (Expr n)
- | EAppT (Expr n) [TypeInst n]
- | EIf (Expr n) (Expr n) (Expr n)
- | ECase (Expr n) [CaseAlt n]
- | EWhere (Expr n) [Decl n]
- | ETyped (Expr n) (Type n)
- | ETypeVal (Type n)
- | EFun (FunDesc n) [Pattern n] (Expr n)
- | ELocated (Expr n) Range
- | ESplit (Expr n)
- | EParens (Expr n)
- | EInfix (Expr n) (Located n) Fixity (Expr n)
- | EPrefix PrefixOp (Expr n)
- data Literal
- data NumInfo
- data FracInfo
- data Match name
- data Pattern n
- data Selector
- data CaseAlt n = CaseAlt (Pattern n) (Expr n)
- data TypeInst name
- data UpdField n = UpdField UpdHow [Located Selector] (Expr n)
- data UpdHow
- data FunDesc n = FunDesc {
- funDescrName :: Maybe n
- funDescrArgOffset :: Int
- emptyFunDesc :: FunDesc n
- data PrefixOp
- prefixFixity :: PrefixOp -> Fixity
- asEApps :: Expr n -> (Expr n, [Expr n])
- data Located a = Located {}
- type LPName = Located PName
- type LString = Located String
- type LIdent = Located Ident
- class NoPos t where
- noPos :: t -> t
- cppKind :: Kind -> Doc
- ppSelector :: Selector -> Doc
Names
The type of identifiers. * The boolean flag indicates whether or not they're infix operators. The boolean is present just as cached information from the lexer, and never used during comparisons. * The MaybeAnon indicates if this is an anonymous name
Instances
| IsString Ident Source # | |
Defined in Cryptol.Utils.Ident Methods fromString :: String -> Ident # | |
| Generic Ident Source # | |
| Show Ident Source # | |
| ShowParseable Ident Source # | |
Defined in Cryptol.TypeCheck.Parseable | |
| PP Ident Source # | |
| NFData Ident Source # | |
Defined in Cryptol.Utils.Ident | |
| Eq Ident Source # | |
| Ord Ident Source # | |
| type Rep Ident Source # | |
Defined in Cryptol.Utils.Ident | |
isInfixIdent :: Ident -> Bool Source #
Top-level Module names are just text.
Names that originate in the parser.
Constructors
| UnQual !Ident | Unqualified names like |
| Qual !ModName !Ident | Qualified names like |
| NewName !Pass !Int | Fresh names generated by a pass. |
Instances
Instances
| Foldable Named Source # | |
Defined in Cryptol.Parser.AST Methods fold :: Monoid m => Named m -> m # foldMap :: Monoid m => (a -> m) -> Named a -> m # foldMap' :: Monoid m => (a -> m) -> Named a -> m # foldr :: (a -> b -> b) -> b -> Named a -> b # foldr' :: (a -> b -> b) -> b -> Named a -> b # foldl :: (b -> a -> b) -> b -> Named a -> b # foldl' :: (b -> a -> b) -> b -> Named a -> b # foldr1 :: (a -> a -> a) -> Named a -> a # foldl1 :: (a -> a -> a) -> Named a -> a # elem :: Eq a => a -> Named a -> Bool # maximum :: Ord a => Named a -> a # minimum :: Ord a => Named a -> a # | |
| Traversable Named Source # | |
| Functor Named Source # | |
| Generic (Named a) Source # | |
| Show a => Show (Named a) Source # | |
| NoPos t => NoPos (Named t) Source # | |
| HasLoc a => HasLoc (Named a) Source # | |
| NFData a => NFData (Named a) Source # | |
Defined in Cryptol.Parser.AST | |
| Eq a => Eq (Named a) Source # | |
| type Rep (Named a) Source # | |
Defined in Cryptol.Parser.AST type Rep (Named a) = D1 ('MetaData "Named" "Cryptol.Parser.AST" "cryptol-3.3.0-7OIQa8lMv7L2xoAlM9JEI6" 'False) (C1 ('MetaCons "Named" 'PrefixI 'True) (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Located Ident)) :*: S1 ('MetaSel ('Just "value") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) | |
Passes that can generate fresh names.
Constructors
| NoPat | |
| MonoValues | |
| ExpandPropGuards String |
Instances
| Generic Pass Source # | |
| Show Pass Source # | |
| NFData Pass Source # | |
Defined in Cryptol.Parser.Name | |
| Eq Pass Source # | |
| Ord Pass Source # | |
| type Rep Pass Source # | |
Defined in Cryptol.Parser.Name type Rep Pass = D1 ('MetaData "Pass" "Cryptol.Parser.Name" "cryptol-3.3.0-7OIQa8lMv7L2xoAlM9JEI6" 'False) (C1 ('MetaCons "NoPat" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "MonoValues" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ExpandPropGuards" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)))) | |
Information about associativity.
Constructors
| LeftAssoc | |
| RightAssoc | |
| NonAssoc |
Instances
| Generic Assoc Source # | |
| Show Assoc Source # | |
| PP Assoc Source # | |
| NFData Assoc Source # | |
Defined in Cryptol.Utils.Fixity | |
| Eq Assoc Source # | |
| Ord Assoc Source # | |
| type Rep Assoc Source # | |
Defined in Cryptol.Utils.Fixity type Rep Assoc = D1 ('MetaData "Assoc" "Cryptol.Utils.Fixity" "cryptol-3.3.0-7OIQa8lMv7L2xoAlM9JEI6" 'False) (C1 ('MetaCons "LeftAssoc" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "RightAssoc" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NonAssoc" 'PrefixI 'False) (U1 :: Type -> Type))) | |
Types
Instances
Instances
| Functor TParam Source # | |
| Rename TParam Source # | |
| Generic (TParam n) Source # | |
| Show n => Show (TParam n) Source # | |
| BindsNames (TParam PName) Source # | Generate the naming environment for a type parameter. |
Defined in Cryptol.ModuleSystem.Binds | |
| NoPos (TParam name) Source # | |
| AddLoc (TParam name) Source # | |
| HasLoc (TParam name) Source # | |
| PPName name => PP (TParam name) Source # | |
| NFData n => NFData (TParam n) Source # | |
Defined in Cryptol.Parser.AST | |
| Eq n => Eq (TParam n) Source # | |
| type Rep (TParam n) Source # | |
Defined in Cryptol.Parser.AST type Rep (TParam n) = D1 ('MetaData "TParam" "Cryptol.Parser.AST" "cryptol-3.3.0-7OIQa8lMv7L2xoAlM9JEI6" 'False) (C1 ('MetaCons "TParam" 'PrefixI 'True) (S1 ('MetaSel ('Just "tpName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 n) :*: (S1 ('MetaSel ('Just "tpKind") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Kind)) :*: S1 ('MetaSel ('Just "tpRange") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Range))))) | |
Instances
| Generic Kind Source # | |
| Show Kind Source # | |
| PP Kind Source # | |
| NFData Kind Source # | |
Defined in Cryptol.Parser.AST | |
| Eq Kind Source # | |
| type Rep Kind Source # | |
Defined in Cryptol.Parser.AST type Rep Kind = D1 ('MetaData "Kind" "Cryptol.Parser.AST" "cryptol-3.3.0-7OIQa8lMv7L2xoAlM9JEI6" 'False) ((C1 ('MetaCons "KProp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KNum" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "KType" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KFun" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Kind) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Kind)))) | |
Constructors
| TFun (Type n) (Type n) | [8] -> [8] |
| TSeq (Type n) (Type n) | [8] a |
| TBit | Bit |
| TNum Integer | 10 |
| TChar Char | |
| TUser n [Type n] | A type variable or synonym |
| TTyApp [Named (Type n)] | `{ x = [8], y = Integer } |
| TRecord (Rec (Type n)) | { x : [8], y : [32] } |
| TTuple [Type n] | ([8], [32]) |
| TWild |
|
| TLocated (Type n) Range | Location information |
| TParens (Type n) (Maybe Kind) | (ty) |
| TInfix (Type n) (Located n) Fixity (Type n) | ty + ty |
Instances
| Functor Type Source # | |
| Rename Type Source # | |
| Generic (Type n) Source # | |
| Show n => Show (Type n) Source # | |
| NoPos (Type name) Source # | |
| AddLoc (Type name) Source # | |
| HasLoc (Type name) Source # | |
| PPName name => PP (Type name) Source # | |
| NFData n => NFData (Type n) Source # | |
Defined in Cryptol.Parser.AST | |
| Eq n => Eq (Type n) Source # | |
| type Rep (Type n) Source # | |
Defined in Cryptol.Parser.AST | |
Instances
| Functor Prop Source # | |
| Rename Prop Source # | |
| Generic (Prop n) Source # | |
| Show n => Show (Prop n) Source # | |
| NoPos (Prop name) Source # | |
| PPName name => PP (Prop name) Source # | |
| PPName name => PP [Prop name] Source # | |
| NFData n => NFData (Prop n) Source # | |
Defined in Cryptol.Parser.AST | |
| Eq n => Eq (Prop n) Source # | |
| type Rep (Prop n) Source # | |
Defined in Cryptol.Parser.AST | |
Declarations
data ModuleG mname name Source #
A module for the pre-typechecker phasese. The two parameters are:
Constructors
| Module | |
Fields
| |
Instances
mImports :: ModuleG mname name -> [Located Import] Source #
Imports of top-level (i.e. "file" based) modules.
mModParams :: ModuleG mname name -> [ModParam name] Source #
Get the module parameters of a module (new module system)
mIsFunctor :: ModuleG mname nmae -> Bool Source #
isParamDecl :: TopDecl a -> Bool Source #
data ModuleDefinition name Source #
Different flavours of module we have.
Constructors
| NormalModule [TopDecl name] | |
| FunctorInstance (Located (ImpName name)) (ModuleInstanceArgs name) (ModuleInstance name) | The instance is filled in by the renamer |
| InterfaceModule (Signature name) |
Instances
data ModuleInstanceArgs name Source #
All arguments in a functor instantiation
Constructors
| DefaultInstArg (Located (ModuleInstanceArg name)) | Single parameter instantitaion |
| DefaultInstAnonArg [TopDecl name] | Single parameter instantitaion using this anonymous module. (parser only) |
| NamedInstArgs [ModuleInstanceNamedArg name] |
Instances
data ModuleInstanceNamedArg name Source #
A named argument in a functor instantiation
Constructors
| ModuleInstanceNamedArg (Located Ident) (Located (ModuleInstanceArg name)) |
Instances
data ModuleInstanceArg name Source #
An argument in a functor instantiation
Constructors
| ModuleArg (ImpName name) | An argument that is a module |
| ParameterArg Ident | An argument that is a parameter |
| AddParams | Arguments adds extra parameters to decls. ("backtick" import) |
Instances
type ModuleInstance name = Map name name Source #
Maps names in the original functor with names in the instnace. Does *NOT* include the parameters, just names for the definitions. This *DOES* include entrirs for all the name in the instantiated functor, including names in modules nested inside the functor.
emptyModuleInstance :: Ord name => ModuleInstance name Source #
A declaration that may only appear at the top level of a module. The module may be nested, however.
Constructors
| Decl (TopLevel (Decl name)) | |
| DPrimType (TopLevel (PrimType name)) | |
| TDNewtype (TopLevel (Newtype name)) | @newtype T as = t |
| TDEnum (TopLevel (EnumDecl name)) | enum T as = cons |
| Include (Located FilePath) |
|
| DParamDecl Range (Signature name) |
|
| DModule (TopLevel (NestedModule name)) | submodule M where ... |
| DImport (Located (ImportG (ImpName name))) | import X |
| DModParam (ModParam name) | import interface X ... |
| DInterfaceConstraint (Maybe (Located Text)) (Located [Prop name]) | interface constraint |
Instances
A simple declaration. Generally these are things that can appear both at the top-level of a module and in `where` clauses.
Constructors
| DSignature [Located name] (Schema name) | A type signature. Eliminated in NoPat--after NoPat signatures are in their associated Bind |
| DFixity !Fixity [Located name] | A fixity declaration. Eliminated in NoPat---after NoPat fixities are in their associated Bind |
| DPragma [Located name] Pragma | A pragma declaration. Eliminated in NoPat---after NoPat fixities are in their associated Bind |
| DBind (Bind name) | A non-recursive binding. |
| DRec [Bind name] | A group of recursive bindings. Introduced by the renamer. |
| DPatBind (Pattern name) (Expr name) | A pattern binding. Eliminated in NoPat---after NoPat fixities are in their associated Bind |
| DType (TySyn name) | A type synonym. |
| DProp (PropSyn name) | A constraint synonym. |
| DLocated (Decl name) Range | Keeps track of the location of a declaration. |
Instances
Instances
| Generic Fixity Source # | |
| Show Fixity Source # | |
| PP Fixity Source # | |
| NFData Fixity Source # | |
Defined in Cryptol.Utils.Fixity | |
| Eq Fixity Source # | |
| Ord Fixity Source # | |
| type Rep Fixity Source # | |
Defined in Cryptol.Utils.Fixity type Rep Fixity = D1 ('MetaData "Fixity" "Cryptol.Utils.Fixity" "cryptol-3.3.0-7OIQa8lMv7L2xoAlM9JEI6" 'False) (C1 ('MetaCons "Fixity" 'PrefixI 'True) (S1 ('MetaSel ('Just "fAssoc") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Assoc) :*: S1 ('MetaSel ('Just "fLevel") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int))) | |
defaultFixity :: Fixity Source #
The fixity used when none is provided.
compareFixity :: Fixity -> Fixity -> FixityCmp Source #
Let op1 have fixity f1 and op2 have fixity f2. Then
compareFixity f1 f2 determines how to parse the infix expression
x op1 y op2 z@.
FCLeft:(x op1 y) op2 zFCRight:x op1 (y op2 z)FCError: no parse
Instances
| Functor TySyn Source # | |
| Rename TySyn Source # | |
| Generic (TySyn n) Source # | |
| Show n => Show (TySyn n) Source # | |
| NoPos (TySyn name) Source # | |
| HasLoc (TySyn name) Source # | |
| PPName name => PP (TySyn name) Source # | |
| NFData n => NFData (TySyn n) Source # | |
Defined in Cryptol.Parser.AST | |
| Eq n => Eq (TySyn n) Source # | |
| type Rep (TySyn n) Source # | |
Defined in Cryptol.Parser.AST type Rep (TySyn n) = D1 ('MetaData "TySyn" "Cryptol.Parser.AST" "cryptol-3.3.0-7OIQa8lMv7L2xoAlM9JEI6" 'False) (C1 ('MetaCons "TySyn" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Located n)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Fixity))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TParam n]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type n))))) | |
Instances
Bindings. Notes:
- The parser does not associate type signatures and pragmas with their bindings: this is done in a separate pass, after de-sugaring pattern bindings. In this way we can associate pragmas and type signatures with the variables defined by pattern bindings as well.
- Currently, there is no surface syntax for defining monomorphic bindings (i.e., bindings that will not be automatically generalized by the type checker. However, they are useful when de-sugaring patterns.
Constructors
| Bind | |
Fields
| |
Instances
bindParams :: Bind name -> [Pattern name] Source #
bindHeaderLoc :: Bind name -> Maybe Range Source #
Range encompassing the LHS of a binder, its signature, but not its definition.
data BindParams name Source #
A list of patterns used as parameters to a Bind.
This is only used to improve error messages, by retaining
information about the original shape of a Bind when
rewriting (see dropParams).
Constructors
| PatternParams [Pattern name] | Parameters that appear in the LHS of a binding equation
as patterns.
e.g. |
| DroppedParams (Maybe Range) Int | Represents zero parameters to a binding equation that
originally had parameters, but was rewritten to have none
(see |
Instances
dropParams :: BindParams name -> BindParams name Source #
Sets the number of parameters for a binding to zero, noting
the original number and source location of the patterns.
e.g. when rewriting let f a b c = x -> ..., into
let f = \a b c x -> ... the parameters for f change from
PatternParams [a,b,c] to DroppedParams (getLoc [a,b,c]) 3
noParams :: BindParams name Source #
An empty BindParams (i.e. zero parameters).
Note that dropParams should be used instead of this
when rewriting an existing Bind to have no parameters.
Constructors
| DPrim | |
| DForeign (Maybe (BindImpl name)) | Foreign functions can have an optional cryptol implementation |
| DImpl (BindImpl name) |
Instances
| Functor BindDef Source # | |
| Rename BindDef Source # | |
| Generic (BindDef name) Source # | |
| Show name => Show (BindDef name) Source # | |
| (Show name, PPName name) => PP (BindDef name) Source # | |
| NFData name => NFData (BindDef name) Source # | |
Defined in Cryptol.Parser.AST | |
| Eq name => Eq (BindDef name) Source # | |
| type Rep (BindDef name) Source # | |
Defined in Cryptol.Parser.AST type Rep (BindDef name) = D1 ('MetaData "BindDef" "Cryptol.Parser.AST" "cryptol-3.3.0-7OIQa8lMv7L2xoAlM9JEI6" 'False) (C1 ('MetaCons "DPrim" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "DForeign" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (BindImpl name)))) :+: C1 ('MetaCons "DImpl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (BindImpl name))))) | |
Constructors
| DExpr (Expr name) | |
| DPropGuards [PropGuardCase name] |
Instances
| Functor BindImpl Source # | |
| Rename BindImpl Source # | |
| Generic (BindImpl name) Source # | |
| Show name => Show (BindImpl name) Source # | |
| (Show name, PPName name) => PP (BindImpl name) Source # | |
| NFData name => NFData (BindImpl name) Source # | |
Defined in Cryptol.Parser.AST | |
| Eq name => Eq (BindImpl name) Source # | |
| type Rep (BindImpl name) Source # | |
Defined in Cryptol.Parser.AST type Rep (BindImpl name) = D1 ('MetaData "BindImpl" "Cryptol.Parser.AST" "cryptol-3.3.0-7OIQa8lMv7L2xoAlM9JEI6" 'False) (C1 ('MetaCons "DExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr name))) :+: C1 ('MetaCons "DPropGuards" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [PropGuardCase name]))) | |
Constructors
| PragmaNote String | |
| PragmaProperty |
Instances
| Generic Pragma Source # | |
| Show Pragma Source # | |
| NoPos Pragma Source # | |
| PP Pragma Source # | |
| NFData Pragma Source # | |
Defined in Cryptol.Parser.AST | |
| Eq Pragma Source # | |
| type Rep Pragma Source # | |
Defined in Cryptol.Parser.AST type Rep Pragma = D1 ('MetaData "Pragma" "Cryptol.Parser.AST" "cryptol-3.3.0-7OIQa8lMv7L2xoAlM9JEI6" 'False) (C1 ('MetaCons "PragmaNote" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)) :+: C1 ('MetaCons "PragmaProperty" 'PrefixI 'False) (U1 :: Type -> Type)) | |
data ExportType Source #
Export information for a declaration.
Instances
| Generic ExportType Source # | |
Defined in Cryptol.Parser.AST Associated Types type Rep ExportType :: Type -> Type # | |
| Show ExportType Source # | |
Defined in Cryptol.Parser.AST Methods showsPrec :: Int -> ExportType -> ShowS # show :: ExportType -> String # showList :: [ExportType] -> ShowS # | |
| NFData ExportType Source # | |
Defined in Cryptol.Parser.AST Methods rnf :: ExportType -> () # | |
| Eq ExportType Source # | |
Defined in Cryptol.Parser.AST | |
| Ord ExportType Source # | |
Defined in Cryptol.Parser.AST Methods compare :: ExportType -> ExportType -> Ordering # (<) :: ExportType -> ExportType -> Bool # (<=) :: ExportType -> ExportType -> Bool # (>) :: ExportType -> ExportType -> Bool # (>=) :: ExportType -> ExportType -> Bool # max :: ExportType -> ExportType -> ExportType # min :: ExportType -> ExportType -> ExportType # | |
| type Rep ExportType Source # | |
A top-level module declaration.
Instances
An import declaration.
Constructors
| Import | |
Instances
| Generic (ImportG mname) Source # | |
| Show mname => Show (ImportG mname) Source # | |
| PP mname => PP (ImportG mname) Source # | |
| NFData mname => NFData (ImportG mname) Source # | |
Defined in Cryptol.Parser.AST | |
| type Rep (ImportG mname) Source # | |
Defined in Cryptol.Parser.AST type Rep (ImportG mname) = D1 ('MetaData "ImportG" "Cryptol.Parser.AST" "cryptol-3.3.0-7OIQa8lMv7L2xoAlM9JEI6" 'False) (C1 ('MetaCons "Import" 'PrefixI 'True) ((S1 ('MetaSel ('Just "iModule") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 mname) :*: S1 ('MetaSel ('Just "iAs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ModName))) :*: (S1 ('MetaSel ('Just "iSpec") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ImportSpec)) :*: (S1 ('MetaSel ('Just "iInst") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe (ModuleInstanceArgs PName))) :*: S1 ('MetaSel ('Just "iDoc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Located Text))))))) | |
data ImportSpec Source #
The list of names following an import.
Instances
| Generic ImportSpec Source # | |
Defined in Cryptol.Parser.AST Associated Types type Rep ImportSpec :: Type -> Type # | |
| Show ImportSpec Source # | |
Defined in Cryptol.Parser.AST Methods showsPrec :: Int -> ImportSpec -> ShowS # show :: ImportSpec -> String # showList :: [ImportSpec] -> ShowS # | |
| PP ImportSpec Source # | |
Defined in Cryptol.Parser.AST | |
| NFData ImportSpec Source # | |
Defined in Cryptol.Parser.AST Methods rnf :: ImportSpec -> () # | |
| Eq ImportSpec Source # | |
Defined in Cryptol.Parser.AST | |
| type Rep ImportSpec Source # | |
Defined in Cryptol.Parser.AST type Rep ImportSpec = D1 ('MetaData "ImportSpec" "Cryptol.Parser.AST" "cryptol-3.3.0-7OIQa8lMv7L2xoAlM9JEI6" 'False) (C1 ('MetaCons "Hiding" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Ident])) :+: C1 ('MetaCons "Only" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Ident]))) | |
The name of an imported module
Instances
| Rename ImpName Source # | |
| Generic (ImpName name) Source # | |
| Show name => Show (ImpName name) Source # | |
| ModuleInstance name => ModuleInstance (ImpName name) Source # | |
Defined in Cryptol.TypeCheck.ModuleInstance Methods moduleInstance :: ImpName name -> ImpName name Source # | |
| PP name => PP (ImpName name) Source # | |
| NFData name => NFData (ImpName name) Source # | |
Defined in Cryptol.Parser.AST | |
| Eq name => Eq (ImpName name) Source # | |
| Ord name => Ord (ImpName name) Source # | |
Defined in Cryptol.Parser.AST | |
| type Rep (ImpName name) Source # | |
Defined in Cryptol.Parser.AST type Rep (ImpName name) = D1 ('MetaData "ImpName" "Cryptol.Parser.AST" "cryptol-3.3.0-7OIQa8lMv7L2xoAlM9JEI6" 'False) (C1 ('MetaCons "ImpTop" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ModName)) :+: C1 ('MetaCons "ImpNested" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 name))) | |
Constructors
| Newtype | |
Instances
| Rename Newtype Source # | |
| Generic (Newtype name) Source # | |
| Show name => Show (Newtype name) Source # | |
| BindsNames (InModule (Newtype PName)) Source # | |
Defined in Cryptol.ModuleSystem.Binds | |
| NoPos (Newtype name) Source # | |
| HasLoc (Newtype name) Source # | |
| PPName name => PP (Newtype name) Source # | |
| NFData name => NFData (Newtype name) Source # | |
Defined in Cryptol.Parser.AST | |
| Eq name => Eq (Newtype name) Source # | |
| type Rep (Newtype name) Source # | |
Defined in Cryptol.Parser.AST | |
Constructors
| EnumDecl | |
Instances
| Rename EnumDecl Source # | |
| Generic (EnumDecl name) Source # | |
| Show name => Show (EnumDecl name) Source # | |
| BindsNames (InModule (EnumDecl PName)) Source # | |
Defined in Cryptol.ModuleSystem.Binds | |
| NoPos (EnumDecl name) Source # | |
| HasLoc (EnumDecl name) Source # | |
| (Show name, PPName name) => PP (EnumDecl name) Source # | |
| NFData name => NFData (EnumDecl name) Source # | |
Defined in Cryptol.Parser.AST | |
| type Rep (EnumDecl name) Source # | |
Defined in Cryptol.Parser.AST type Rep (EnumDecl name) = D1 ('MetaData "EnumDecl" "Cryptol.Parser.AST" "cryptol-3.3.0-7OIQa8lMv7L2xoAlM9JEI6" 'False) (C1 ('MetaCons "EnumDecl" 'PrefixI 'True) (S1 ('MetaSel ('Just "eName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Located name)) :*: (S1 ('MetaSel ('Just "eParams") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TParam name]) :*: S1 ('MetaSel ('Just "eCons") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TopLevel (EnumCon name)])))) | |
Instances
| Generic (EnumCon name) Source # | |
| Show name => Show (EnumCon name) Source # | |
| NoPos (EnumCon name) Source # | |
| HasLoc (EnumCon name) Source # | |
| (Show name, PPName name) => PP (EnumCon name) Source # | |
| NFData name => NFData (EnumCon name) Source # | |
Defined in Cryptol.Parser.AST | |
| type Rep (EnumCon name) Source # | |
Defined in Cryptol.Parser.AST type Rep (EnumCon name) = D1 ('MetaData "EnumCon" "Cryptol.Parser.AST" "cryptol-3.3.0-7OIQa8lMv7L2xoAlM9JEI6" 'False) (C1 ('MetaCons "EnumCon" 'PrefixI 'True) (S1 ('MetaSel ('Just "ecName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Located name)) :*: S1 ('MetaSel ('Just "ecFields") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Type name]))) | |
A declaration for a type with no implementation.
Constructors
| PrimType | |
Instances
data ParameterType name Source #
A type parameter for a module.
Constructors
| ParameterType | |
Instances
data ParameterFun name Source #
A value parameter for a module.
Constructors
| ParameterFun | |
Instances
data ParameterConstraint name Source #
Constructors
| ParameterConstraint | |
Instances
newtype NestedModule name Source #
A nested module.
Constructors
| NestedModule (ModuleG name name) |
Instances
Interface Modules (aka types of functor arguments)
IMPORTANT: Interface Modules are a language construct and are different from the notion of "interface" in the Cryptol implementation.
Note that the names *defined* in an interface module are only really used in the other members of the interface module. When an interface module is "imported" as a functor parameter these names are instantiated to new names, because there could be multiple paramers using the same interface.
Constructors
| Signature | |
Fields
| |
Instances
A constraint or type synonym declared in an interface.
Instances
A module parameter declaration.
import interface A import interface A as B
The name of the parameter is derived from the as clause. If there
is no as clause then it is derived from the name of the interface module.
If there is no as clause, then the type/value parameters are unqualified,
and otherwise they are qualified.
Constructors
| ModParam | |
Fields
| |
Instances
Things that maybe appear in an interface/parameter block. These only exist during parsering.
Constructors
| DParameterType (ParameterType name) |
|
| DParameterFun (ParameterFun name) |
|
| DParameterDecl (SigDecl name) | A delcaration in an interface |
| DParameterConstraint (ParameterConstraint name) | parameter type constraint (fin T) |
Instances
data PropGuardCase name Source #
Instances
Interactive
Input at the REPL, which can be an expression, a let
statement, or empty (possibly a comment).
Constructors
| ExprInput (Expr name) | |
| LetInput [Decl name] | |
| EmptyInput |
Expressions
Constructors
| EVar n | x |
| ELit Literal | 0x10 |
| EGenerate (Expr n) | generate f |
| ETuple [Expr n] | (1,2,3) |
| ERecord (Rec (Expr n)) | { x = 1, y = 2 } |
| ESel (Expr n) Selector | e.l |
| EUpd (Maybe (Expr n)) [UpdField n] | { r | x = e } |
| EList [Expr n] | [1,2,3] |
| EFromTo (Type n) (Maybe (Type n)) (Type n) (Maybe (Type n)) | [1, 5 .. 117 : t] |
| EFromToBy Bool (Type n) (Type n) (Type n) (Maybe (Type n)) | [1 .. 10 by 2 : t ] |
| EFromToDownBy Bool (Type n) (Type n) (Type n) (Maybe (Type n)) | [10 .. 1 down by 2 : t ] |
| EFromToLessThan (Type n) (Type n) (Maybe (Type n)) | [ 1 .. < 10 : t ] |
| EInfFrom | |
| EComp (Expr n) [[Match n]] | [ 1 | x <- xs ] |
| EApp (Expr n) (Expr n) | f x |
| EAppT (Expr n) [TypeInst n] | f `{x = 8}, f`{8} |
| EIf (Expr n) (Expr n) (Expr n) | if ok then e1 else e2 |
| ECase (Expr n) [CaseAlt n] | case e of { P -> e } |
| EWhere (Expr n) [Decl n] | 1 + x where { x = 2 } |
| ETyped (Expr n) (Type n) | 1 : [8] |
| ETypeVal (Type n) |
|
| EFun (FunDesc n) [Pattern n] (Expr n) | \x y -> x |
| ELocated (Expr n) Range | position annotation |
| ESplit (Expr n) |
|
| EParens (Expr n) |
|
| EInfix | |
| EPrefix PrefixOp (Expr n) | -1, ~1 |
Instances
| Functor Expr Source # | |
| Rename Expr Source # | |
| Generic (Expr n) Source # | |
| Show n => Show (Expr n) Source # | |
| NoPos (Expr name) Source # | |
| RemovePatterns (Expr PName) Source # | |
Defined in Cryptol.Parser.NoPat | |
| AddLoc (Expr n) Source # | |
| HasLoc (Expr name) Source # | |
| (Show name, PPName name) => PP (Expr name) Source # | |
| NFData n => NFData (Expr n) Source # | |
Defined in Cryptol.Parser.AST | |
| Eq n => Eq (Expr n) Source # | |
| type Rep (Expr n) Source # | |
Defined in Cryptol.Parser.AST | |
Literals.
Constructors
| ECNum Integer NumInfo |
|
| ECChar Char | |
| ECFrac Rational FracInfo | 1.2e3 |
| ECString String | "hello" |
Instances
Infromation about the representation of a numeric constant.
Constructors
| BinLit Text Int | n-digit binary literal |
| OctLit Text Int | n-digit octal literal |
| DecLit Text | overloaded decimal literal |
| HexLit Text Int | n-digit hex literal |
| PolyLit Int | polynomial literal |
Instances
Information about fractional literals.
Instances
| Generic FracInfo Source # | |
| Show FracInfo Source # | |
| NFData FracInfo Source # | |
Defined in Cryptol.Parser.AST | |
| Eq FracInfo Source # | |
| type Rep FracInfo Source # | |
Defined in Cryptol.Parser.AST type Rep FracInfo = D1 ('MetaData "FracInfo" "Cryptol.Parser.AST" "cryptol-3.3.0-7OIQa8lMv7L2xoAlM9JEI6" 'False) ((C1 ('MetaCons "BinFrac" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: C1 ('MetaCons "OctFrac" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) :+: (C1 ('MetaCons "DecFrac" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: C1 ('MetaCons "HexFrac" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))) | |
Instances
| Functor Match Source # | |
| Rename Match Source # | |
| Generic (Match name) Source # | |
| Show name => Show (Match name) Source # | |
| NoPos (Match name) Source # | |
| HasLoc (Match name) Source # | |
| (Show name, PPName name) => PP (Match name) Source # | |
| NFData name => NFData (Match name) Source # | |
Defined in Cryptol.Parser.AST | |
| Eq name => Eq (Match name) Source # | |
| type Rep (Match name) Source # | |
Defined in Cryptol.Parser.AST type Rep (Match name) = D1 ('MetaData "Match" "Cryptol.Parser.AST" "cryptol-3.3.0-7OIQa8lMv7L2xoAlM9JEI6" 'False) (C1 ('MetaCons "Match" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Pattern name)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr name))) :+: C1 ('MetaCons "MatchLet" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Bind name)))) | |
Constructors
| PVar (Located n) | x |
| PWild | _ |
| PTuple [Pattern n] | (x,y,z) |
| PRecord (Rec (Pattern n)) | { x = (a,b,c), y = z } |
| PList [Pattern n] | [ x, y, z ] |
| PTyped (Pattern n) (Type n) | x : [8] |
| PSplit | |
| PCon (Located n) [Pattern n] | Just x |
| PLocated (Pattern n) Range | Location information |
Instances
| Functor Pattern Source # | |
| Rename Pattern Source # | |
| Generic (Pattern n) Source # | |
| Show n => Show (Pattern n) Source # | |
| BindsNames (Pattern PName) Source # | |
Defined in Cryptol.ModuleSystem.Binds | |
| NoPos (Pattern name) Source # | |
| AddLoc (Pattern name) Source # | |
| HasLoc (Pattern name) Source # | |
| PPName name => PP (Pattern name) Source # | |
| NFData n => NFData (Pattern n) Source # | |
Defined in Cryptol.Parser.AST | |
| Eq n => Eq (Pattern n) Source # | |
| type Rep (Pattern n) Source # | |
Defined in Cryptol.Parser.AST | |
Selectors are used for projecting from various components. Each selector has an option spec to specify the shape of the thing that is being selected. Currently, there is no surface syntax for list selectors, but they are used during the desugaring of patterns.
Constructors
| TupleSel Int (Maybe Int) | Zero-based tuple selection. Optionally specifies the shape of the tuple (one-based). |
| RecordSel Ident (Maybe [Ident]) | Record selection. Optionally specifies the shape of the record. |
| ListSel Int (Maybe Int) | List selection. Optionally specifies the length of the list. |
Instances
Instances
| Functor CaseAlt Source # | |
| Rename CaseAlt Source # | |
| Generic (CaseAlt n) Source # | |
| Show n => Show (CaseAlt n) Source # | |
| NoPos (CaseAlt name) Source # | |
| (Show name, PPName name) => PP (CaseAlt name) Source # | |
| NFData n => NFData (CaseAlt n) Source # | |
Defined in Cryptol.Parser.AST | |
| Eq n => Eq (CaseAlt n) Source # | |
| type Rep (CaseAlt n) Source # | |
Defined in Cryptol.Parser.AST type Rep (CaseAlt n) = D1 ('MetaData "CaseAlt" "Cryptol.Parser.AST" "cryptol-3.3.0-7OIQa8lMv7L2xoAlM9JEI6" 'False) (C1 ('MetaCons "CaseAlt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Pattern n)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr n)))) | |
Instances
| Functor TypeInst Source # | |
| Rename TypeInst Source # | |
| Generic (TypeInst name) Source # | |
| Show name => Show (TypeInst name) Source # | |
| NoPos (TypeInst name) Source # | |
| PPName name => PP (TypeInst name) Source # | |
| NFData name => NFData (TypeInst name) Source # | |
Defined in Cryptol.Parser.AST | |
| Eq name => Eq (TypeInst name) Source # | |
| type Rep (TypeInst name) Source # | |
Defined in Cryptol.Parser.AST type Rep (TypeInst name) = D1 ('MetaData "TypeInst" "Cryptol.Parser.AST" "cryptol-3.3.0-7OIQa8lMv7L2xoAlM9JEI6" 'False) (C1 ('MetaCons "NamedInst" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Named (Type name)))) :+: C1 ('MetaCons "PosInst" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type name)))) | |
Instances
| Functor UpdField Source # | |
| Rename UpdField Source # | Note that after this point the |
| Generic (UpdField n) Source # | |
| Show n => Show (UpdField n) Source # | |
| NoPos (UpdField name) Source # | |
| (Show name, PPName name) => PP (UpdField name) Source # | |
| NFData n => NFData (UpdField n) Source # | |
Defined in Cryptol.Parser.AST | |
| Eq n => Eq (UpdField n) Source # | |
| type Rep (UpdField n) Source # | |
Defined in Cryptol.Parser.AST type Rep (UpdField n) = D1 ('MetaData "UpdField" "Cryptol.Parser.AST" "cryptol-3.3.0-7OIQa8lMv7L2xoAlM9JEI6" 'False) (C1 ('MetaCons "UpdField" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UpdHow) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Located Selector]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr n))))) | |
Description of functions. Only trivial information is provided here by the parser. The NoPat pass fills this in as required.
Constructors
| FunDesc | |
Fields
| |
Instances
| Functor FunDesc Source # | |
| Rename FunDesc Source # | |
| Generic (FunDesc n) Source # | |
| Show n => Show (FunDesc n) Source # | |
| NFData n => NFData (FunDesc n) Source # | |
Defined in Cryptol.Parser.AST | |
| Eq n => Eq (FunDesc n) Source # | |
| type Rep (FunDesc n) Source # | |
Defined in Cryptol.Parser.AST type Rep (FunDesc n) = D1 ('MetaData "FunDesc" "Cryptol.Parser.AST" "cryptol-3.3.0-7OIQa8lMv7L2xoAlM9JEI6" 'False) (C1 ('MetaCons "FunDesc" 'PrefixI 'True) (S1 ('MetaSel ('Just "funDescrName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe n)) :*: S1 ('MetaSel ('Just "funDescrArgOffset") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))) | |
emptyFunDesc :: FunDesc n Source #
Prefix operator.
Constructors
| PrefixNeg | - |
| PrefixComplement | ~ |
prefixFixity :: PrefixOp -> Fixity Source #
Positions
Instances
Instances
Pretty-printing
ppSelector :: Selector -> Doc Source #
Display the thing selected by the selector, nicely.