Copyright | (c) 2013-2016 Galois Inc. |
---|---|
License | BSD3 |
Maintainer | cryptol@galois.com |
Stability | provisional |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell2010 |
Synopsis
- data TValue
- tValTy :: TValue -> Type
- isTBit :: TValue -> Bool
- tvSeq :: Nat' -> TValue -> TValue
- finNat' :: Nat' -> Integer
- type TypeEnv = Map TVar (Either Nat' TValue)
- evalType :: HasCallStack => TypeEnv -> Type -> Either Nat' TValue
- evalValType :: HasCallStack => TypeEnv -> Type -> TValue
- evalNumType :: HasCallStack => TypeEnv -> Type -> Nat'
- evalTF :: HasCallStack => TFun -> [Nat'] -> Nat'
Documentation
An evaluated type of kind *. These types do not contain type variables, type synonyms, or type functions.
TVBit | Bit |
TVInteger | Integer |
TVFloat Integer Integer | Float e p |
TVIntMod Integer | Z n |
TVRational | Rational |
TVArray TValue TValue | Array a b |
TVSeq Integer TValue | [n]a |
TVStream TValue | [inf]t |
TVTuple [TValue] | (a, b, c ) |
TVRec (RecordMap Ident TValue) | { x : a, y : b, z : c } |
TVFun TValue TValue | a -> b |
TVAbstract UserTC [Either Nat' TValue] | an abstract type |
Instances
finNat' :: Nat' -> Integer Source #
Coerce an extended natural into an integer, for values known to be finite
evalType :: HasCallStack => TypeEnv -> Type -> Either Nat' TValue Source #
Evaluation for types (kind * or #).
evalValType :: HasCallStack => TypeEnv -> Type -> TValue Source #
Evaluation for value types (kind *).
evalNumType :: HasCallStack => TypeEnv -> Type -> Nat' Source #
Evaluation for number types (kind #).