cryptol-2.4.0: Cryptol: The Language of Cryptography

Copyright | (c) 2015-2016 Galois Inc.
License | BSD3
Maintainer | cryptol@galois.com
Stability | provisional
Portability | portable
Safe Haskell | Safe
Language | Haskell98

Cryptol.TypeCheck.Sanity

Description

# Documentation

tcExpr :: Map Name Schema -> Expr -> Either Error (Schema, [ProofObligation]) Source #

tcDecls :: Map Name Schema -> [DeclGroup] -> Either Error [ProofObligation] Source #

tcModule :: Map Name Schema -> Module -> Either Error [ProofObligation] Source #

type ProofObligation = Schema Source #

data Error Source #

Constructors

TypeMismatch Schema Schema | expected, actual
ExpectedMono Schema | expected a mono type, got this
TupleSelectorOutOfRange Int Int |
MissingField Ident [Ident] |
UnexpectedTupleShape Int Int |
UnexpectedRecordShape [Ident] [Ident] |
UnexpectedSequenceShape Int Type |
BadSelector Selector Type |
BadInstantiation |
Captured TVar |
BadProofNoAbs |
BadProofTyVars [TParam] |
KindMismatch Kind Kind |
NotEnoughArgumentsInKind Kind |
BadApplication Type Type |
FreeTypeVariable TVar |
BadTypeApplication Kind [Kind] |
RepeatedVariableInForall TParam |
BadMatch Type |
EmptyArm |
UndefinedTypeVaraible TVar |
UndefinedVariable Name |

Instances

Show Error Source # |
Methods showsPrec :: Int -> Error -> ShowS # show :: Error -> String # showList :: [Error] -> ShowS #

same :: Same a => a -> a -> Bool Source #