cryptol-2.7.0: Cryptol: The Language of Cryptography

Safe HaskellSafe
LanguageHaskell2010

Cryptol.Prims.Syntax

Synopsis

Documentation

data PrimTy Source #

Information about a user visible built-in type.

Constructors

PrimTy 

Fields

Instances
Eq PrimTy Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

(==) :: PrimTy -> PrimTy -> Bool #

(/=) :: PrimTy -> PrimTy -> Bool #

Ord PrimTy Source # 
Instance details

Defined in Cryptol.Prims.Syntax

primTyList :: [PrimTy] Source #

This list should contain all user-visible built-in types.

primTyIx :: Ord a => (PrimTy -> Maybe a) -> a -> Maybe PrimTy Source #

Construct an index for quick lookup of primtys.

primTyFromPName :: PName -> Maybe PrimTy Source #

Lookup a prim type by a parser name.

primTyFromTC :: TCon -> Maybe PrimTy Source #

Lookup if a ty con is a primitive.

primTyFromTF :: TFun -> Maybe PrimTy Source #

Lookup a TFun prim type.

primTyFromPC :: PC -> Maybe PrimTy Source #

Lookup a TCon prim type.

data Kind Source #

Kinds, classify types.

Constructors

KType 
KNum 
KProp 
Kind :-> Kind infixr 5 
Instances
Eq Kind Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

(==) :: Kind -> Kind -> Bool #

(/=) :: Kind -> Kind -> Bool #

Ord Kind Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

compare :: Kind -> Kind -> Ordering #

(<) :: Kind -> Kind -> Bool #

(<=) :: Kind -> Kind -> Bool #

(>) :: Kind -> Kind -> Bool #

(>=) :: Kind -> Kind -> Bool #

max :: Kind -> Kind -> Kind #

min :: Kind -> Kind -> Kind #

Show Kind Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

showsPrec :: Int -> Kind -> ShowS #

show :: Kind -> String #

showList :: [Kind] -> ShowS #

Generic Kind Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Associated Types

type Rep Kind :: Type -> Type #

Methods

from :: Kind -> Rep Kind x #

to :: Rep Kind x -> Kind #

NFData Kind Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

rnf :: Kind -> () #

PP Kind Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

ppPrec :: Int -> Kind -> Doc Source #

type Rep Kind Source # 
Instance details

Defined in Cryptol.Prims.Syntax

class HasKind t where Source #

Methods

kindOf :: t -> Kind Source #

Instances
HasKind TFun Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

kindOf :: TFun -> Kind Source #

HasKind UserTC Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

kindOf :: UserTC -> Kind Source #

HasKind TC Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

kindOf :: TC -> Kind Source #

HasKind PC Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

kindOf :: PC -> Kind Source #

HasKind TCon Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

kindOf :: TCon -> Kind Source #

HasKind Newtype Source # 
Instance details

Defined in Cryptol.TypeCheck.Type

Methods

kindOf :: Newtype -> Kind Source #

HasKind TySyn Source # 
Instance details

Defined in Cryptol.TypeCheck.Type

Methods

kindOf :: TySyn -> Kind Source #

HasKind TVar Source # 
Instance details

Defined in Cryptol.TypeCheck.Type

Methods

kindOf :: TVar -> Kind Source #

HasKind Type Source # 
Instance details

Defined in Cryptol.TypeCheck.Type

Methods

kindOf :: Type -> Kind Source #

HasKind TParam Source # 
Instance details

Defined in Cryptol.TypeCheck.Type

Methods

kindOf :: TParam -> Kind Source #

data TCon Source #

Type constants.

Instances
Eq TCon Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

(==) :: TCon -> TCon -> Bool #

(/=) :: TCon -> TCon -> Bool #

Ord TCon Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

compare :: TCon -> TCon -> Ordering #

(<) :: TCon -> TCon -> Bool #

(<=) :: TCon -> TCon -> Bool #

(>) :: TCon -> TCon -> Bool #

(>=) :: TCon -> TCon -> Bool #

max :: TCon -> TCon -> TCon #

min :: TCon -> TCon -> TCon #

Show TCon Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

showsPrec :: Int -> TCon -> ShowS #

show :: TCon -> String #

showList :: [TCon] -> ShowS #

Generic TCon Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Associated Types

type Rep TCon :: Type -> Type #

Methods

from :: TCon -> Rep TCon x #

to :: Rep TCon x -> TCon #

NFData TCon Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

rnf :: TCon -> () #

PPName TCon Source # 
Instance details

Defined in Cryptol.Prims.Syntax

PP TCon Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

ppPrec :: Int -> TCon -> Doc Source #

HasKind TCon Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

kindOf :: TCon -> Kind Source #

FreeVars TCon Source # 
Instance details

Defined in Cryptol.IR.FreeVars

Methods

freeVars :: TCon -> Deps Source #

type Rep TCon Source # 
Instance details

Defined in Cryptol.Prims.Syntax

data PC Source #

Predicate symbols. If you add additional user-visible constructors, please update primTys.

Constructors

PEqual
_ == _
PNeq
_ /= _
PGeq
_ >= _
PFin
fin _
PHas Selector

Has sel type field does not appear in schemas

PZero
Zero _
PLogic
Logic _
PArith
Arith _
PCmp
Cmp _
PSignedCmp
SignedCmp _
PLiteral
Literal _ _
PAnd

This is useful when simplifying things in place

PTrue

Ditto

Instances
Eq PC Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

(==) :: PC -> PC -> Bool #

(/=) :: PC -> PC -> Bool #

Ord PC Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

compare :: PC -> PC -> Ordering #

(<) :: PC -> PC -> Bool #

(<=) :: PC -> PC -> Bool #

(>) :: PC -> PC -> Bool #

(>=) :: PC -> PC -> Bool #

max :: PC -> PC -> PC #

min :: PC -> PC -> PC #

Show PC Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

showsPrec :: Int -> PC -> ShowS #

show :: PC -> String #

showList :: [PC] -> ShowS #

Generic PC Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Associated Types

type Rep PC :: Type -> Type #

Methods

from :: PC -> Rep PC x #

to :: Rep PC x -> PC #

NFData PC Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

rnf :: PC -> () #

PP PC Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

ppPrec :: Int -> PC -> Doc Source #

HasKind PC Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

kindOf :: PC -> Kind Source #

type Rep PC Source # 
Instance details

Defined in Cryptol.Prims.Syntax

type Rep PC = D1 (MetaData "PC" "Cryptol.Prims.Syntax" "cryptol-2.7.0-6VD9sMh08R1JPrYSq7DH8b" False) (((C1 (MetaCons "PEqual" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "PNeq" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "PGeq" PrefixI False) (U1 :: Type -> Type))) :+: (C1 (MetaCons "PFin" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "PHas" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Selector)) :+: C1 (MetaCons "PZero" PrefixI False) (U1 :: Type -> Type)))) :+: ((C1 (MetaCons "PLogic" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "PArith" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "PCmp" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "PSignedCmp" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "PLiteral" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "PAnd" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "PTrue" PrefixI False) (U1 :: Type -> Type)))))

data TC Source #

1-1 constants. If you add additional user-visible constructors, please update primTys.

Constructors

TCNum Integer

Numbers

TCInf

Inf

TCBit

Bit

TCInteger

Integer

TCIntMod
Z _
TCSeq
[_] _
TCFun
_ -> _
TCTuple Int
(_, _, _)
TCNewtype UserTC

user-defined, T

Instances
Eq TC Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

(==) :: TC -> TC -> Bool #

(/=) :: TC -> TC -> Bool #

Ord TC Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

compare :: TC -> TC -> Ordering #

(<) :: TC -> TC -> Bool #

(<=) :: TC -> TC -> Bool #

(>) :: TC -> TC -> Bool #

(>=) :: TC -> TC -> Bool #

max :: TC -> TC -> TC #

min :: TC -> TC -> TC #

Show TC Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

showsPrec :: Int -> TC -> ShowS #

show :: TC -> String #

showList :: [TC] -> ShowS #

Generic TC Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Associated Types

type Rep TC :: Type -> Type #

Methods

from :: TC -> Rep TC x #

to :: Rep TC x -> TC #

NFData TC Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

rnf :: TC -> () #

PP TC Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

ppPrec :: Int -> TC -> Doc Source #

HasKind TC Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

kindOf :: TC -> Kind Source #

type Rep TC Source # 
Instance details

Defined in Cryptol.Prims.Syntax

type Rep TC = D1 (MetaData "TC" "Cryptol.Prims.Syntax" "cryptol-2.7.0-6VD9sMh08R1JPrYSq7DH8b" False) (((C1 (MetaCons "TCNum" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Integer)) :+: C1 (MetaCons "TCInf" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "TCBit" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "TCInteger" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "TCIntMod" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "TCSeq" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "TCFun" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "TCTuple" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)) :+: C1 (MetaCons "TCNewtype" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 UserTC))))))

data UserTC Source #

Constructors

UserTC Name Kind 
Instances
Eq UserTC Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

(==) :: UserTC -> UserTC -> Bool #

(/=) :: UserTC -> UserTC -> Bool #

Ord UserTC Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Show UserTC Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Generic UserTC Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Associated Types

type Rep UserTC :: Type -> Type #

Methods

from :: UserTC -> Rep UserTC x #

to :: Rep UserTC x -> UserTC #

NFData UserTC Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

rnf :: UserTC -> () #

PP UserTC Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

ppPrec :: Int -> UserTC -> Doc Source #

HasKind UserTC Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

kindOf :: UserTC -> Kind Source #

type Rep UserTC Source # 
Instance details

Defined in Cryptol.Prims.Syntax

data TCErrorMessage Source #

Constructors

TCErrorMessage 
Instances
Eq TCErrorMessage Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Ord TCErrorMessage Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Show TCErrorMessage Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Generic TCErrorMessage Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Associated Types

type Rep TCErrorMessage :: Type -> Type #

NFData TCErrorMessage Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

rnf :: TCErrorMessage -> () #

PP TCErrorMessage Source # 
Instance details

Defined in Cryptol.Prims.Syntax

type Rep TCErrorMessage Source # 
Instance details

Defined in Cryptol.Prims.Syntax

type Rep TCErrorMessage = D1 (MetaData "TCErrorMessage" "Cryptol.Prims.Syntax" "cryptol-2.7.0-6VD9sMh08R1JPrYSq7DH8b" False) (C1 (MetaCons "TCErrorMessage" PrefixI True) (S1 (MetaSel (Just "tcErrorMessage") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 String)))

data TFun Source #

Built-in type functions. If you add additional user-visible constructors, please update primTys in Cryptol.Prims.Types.

Constructors

TCAdd
 : Num -> Num -> Num
TCSub
 : Num -> Num -> Num
TCMul
 : Num -> Num -> Num
TCDiv
 : Num -> Num -> Num
TCMod
 : Num -> Num -> Num
TCExp
 : Num -> Num -> Num
TCWidth
 : Num -> Num
TCMin
 : Num -> Num -> Num
TCMax
 : Num -> Num -> Num
TCCeilDiv
 : Num -> Num -> Num
TCCeilMod
 : Num -> Num -> Num
TCLenFromThenTo

: Num -> Num -> Num -> Num Example: [ 1, 5 .. 9 ] :: [lengthFromThenTo 1 5 9][b]

Instances
Bounded TFun Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Enum TFun Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

succ :: TFun -> TFun #

pred :: TFun -> TFun #

toEnum :: Int -> TFun #

fromEnum :: TFun -> Int #

enumFrom :: TFun -> [TFun] #

enumFromThen :: TFun -> TFun -> [TFun] #

enumFromTo :: TFun -> TFun -> [TFun] #

enumFromThenTo :: TFun -> TFun -> TFun -> [TFun] #

Eq TFun Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

(==) :: TFun -> TFun -> Bool #

(/=) :: TFun -> TFun -> Bool #

Ord TFun Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

compare :: TFun -> TFun -> Ordering #

(<) :: TFun -> TFun -> Bool #

(<=) :: TFun -> TFun -> Bool #

(>) :: TFun -> TFun -> Bool #

(>=) :: TFun -> TFun -> Bool #

max :: TFun -> TFun -> TFun #

min :: TFun -> TFun -> TFun #

Show TFun Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

showsPrec :: Int -> TFun -> ShowS #

show :: TFun -> String #

showList :: [TFun] -> ShowS #

Generic TFun Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Associated Types

type Rep TFun :: Type -> Type #

Methods

from :: TFun -> Rep TFun x #

to :: Rep TFun x -> TFun #

NFData TFun Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

rnf :: TFun -> () #

PPName TFun Source # 
Instance details

Defined in Cryptol.Prims.Syntax

PP TFun Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

ppPrec :: Int -> TFun -> Doc Source #

HasKind TFun Source # 
Instance details

Defined in Cryptol.Prims.Syntax

Methods

kindOf :: TFun -> Kind Source #

type Rep TFun Source # 
Instance details

Defined in Cryptol.Prims.Syntax

type Rep TFun = D1 (MetaData "TFun" "Cryptol.Prims.Syntax" "cryptol-2.7.0-6VD9sMh08R1JPrYSq7DH8b" False) (((C1 (MetaCons "TCAdd" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "TCSub" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "TCMul" PrefixI False) (U1 :: Type -> Type))) :+: (C1 (MetaCons "TCDiv" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "TCMod" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "TCExp" PrefixI False) (U1 :: Type -> Type)))) :+: ((C1 (MetaCons "TCWidth" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "TCMin" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "TCMax" PrefixI False) (U1 :: Type -> Type))) :+: (C1 (MetaCons "TCCeilDiv" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "TCCeilMod" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "TCLenFromThenTo" PrefixI False) (U1 :: Type -> Type)))))