Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
This module defines a nicer intermediate representation of Cryptol types allowed for the FFI, which the typechecker generates then stores in the AST. This way the FFI evaluation code does not have to examine the raw type signatures again.
Synopsis
- data FFIFunType = FFIFunType {
- ffiTParams :: [TParam]
- ffiArgTypes :: [FFIType]
- ffiRetType :: FFIType
- data FFIType
- data FFIBasicType
- data FFIBasicValType
- data FFIWordSize
- data FFIFloatSize
- data FFIBasicRefType
- = FFIInteger (Maybe Type)
- | FFIRational
Documentation
data FFIFunType Source #
Type of a foreign function.
FFIFunType | |
|
Instances
Type of a value that can be passed to or returned from a foreign function.
FFIBool | |
FFIBasic FFIBasicType | |
FFIArray [Type] FFIBasicType |
|
FFITuple [FFIType] | |
FFIRecord (RecordMap Ident FFIType) |
Instances
data FFIBasicType Source #
Types which can be elements of FFI arrays.
Instances
data FFIBasicValType Source #
Basic type which is passed and returned directly by value.
FFIWord | |
| |
FFIFloat | |
|
Instances
data FFIWordSize Source #
Instances
Generic FFIWordSize Source # | |
Defined in Cryptol.TypeCheck.FFI.FFIType type Rep FFIWordSize :: Type -> Type # from :: FFIWordSize -> Rep FFIWordSize x # to :: Rep FFIWordSize x -> FFIWordSize # | |
Show FFIWordSize Source # | |
Defined in Cryptol.TypeCheck.FFI.FFIType showsPrec :: Int -> FFIWordSize -> ShowS # show :: FFIWordSize -> String # showList :: [FFIWordSize] -> ShowS # | |
NFData FFIWordSize Source # | |
Defined in Cryptol.TypeCheck.FFI.FFIType rnf :: FFIWordSize -> () # | |
type Rep FFIWordSize Source # | |
Defined in Cryptol.TypeCheck.FFI.FFIType type Rep FFIWordSize = D1 ('MetaData "FFIWordSize" "Cryptol.TypeCheck.FFI.FFIType" "cryptol-3.1.0-276efOa9Q2aIFSEzDdp2Mp" 'False) ((C1 ('MetaCons "FFIWord8" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "FFIWord16" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "FFIWord32" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "FFIWord64" 'PrefixI 'False) (U1 :: Type -> Type))) |
data FFIFloatSize Source #
Instances
Generic FFIFloatSize Source # | |
Defined in Cryptol.TypeCheck.FFI.FFIType type Rep FFIFloatSize :: Type -> Type # from :: FFIFloatSize -> Rep FFIFloatSize x # to :: Rep FFIFloatSize x -> FFIFloatSize # | |
Show FFIFloatSize Source # | |
Defined in Cryptol.TypeCheck.FFI.FFIType showsPrec :: Int -> FFIFloatSize -> ShowS # show :: FFIFloatSize -> String # showList :: [FFIFloatSize] -> ShowS # | |
NFData FFIFloatSize Source # | |
Defined in Cryptol.TypeCheck.FFI.FFIType rnf :: FFIFloatSize -> () # | |
type Rep FFIFloatSize Source # | |
Defined in Cryptol.TypeCheck.FFI.FFIType |
data FFIBasicRefType Source #
Basic type which is passed and returned by reference through a parameter.
FFIInteger (Maybe Type) | Modulus (Just for Z, Nothing for Integer) |
FFIRational |
Instances
Generic FFIBasicRefType Source # | |
Defined in Cryptol.TypeCheck.FFI.FFIType type Rep FFIBasicRefType :: Type -> Type # from :: FFIBasicRefType -> Rep FFIBasicRefType x # to :: Rep FFIBasicRefType x -> FFIBasicRefType # | |
Show FFIBasicRefType Source # | |
Defined in Cryptol.TypeCheck.FFI.FFIType showsPrec :: Int -> FFIBasicRefType -> ShowS # show :: FFIBasicRefType -> String # showList :: [FFIBasicRefType] -> ShowS # | |
NFData FFIBasicRefType Source # | |
Defined in Cryptol.TypeCheck.FFI.FFIType rnf :: FFIBasicRefType -> () # | |
type Rep FFIBasicRefType Source # | |
Defined in Cryptol.TypeCheck.FFI.FFIType type Rep FFIBasicRefType = D1 ('MetaData "FFIBasicRefType" "Cryptol.TypeCheck.FFI.FFIType" "cryptol-3.1.0-276efOa9Q2aIFSEzDdp2Mp" 'False) (C1 ('MetaCons "FFIInteger" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Type))) :+: C1 ('MetaCons "FFIRational" 'PrefixI 'False) (U1 :: Type -> Type)) |