cryptol-2.4.0: Cryptol: The Language of Cryptography

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

Cryptol.Eval.Error

Description

Synopsis

- evalPanic :: String -> [String] -> a
- data EvalError
  - = InvalidIndex Integer
  - | TypeCannotBeDemoted Type
  - | DivideByZero
  - | WordTooWide Integer
  - | UserError String
- invalidIndex :: Integer -> a
- typeCannotBeDemoted :: Type -> a
- divideByZero :: a
- wordTooWide :: Integer -> a
- cryUserError :: String -> a

# Documentation

evalPanic :: String -> [String] -> a Source #

Panic from an Eval context.

data EvalError Source #

Constructors

InvalidIndex Integer |
TypeCannotBeDemoted Type |
DivideByZero |
WordTooWide Integer |
UserError String |

Instances

Show EvalError Source # |
Methods showsPrec :: Int -> EvalError -> ShowS # show :: EvalError -> String # showList :: [EvalError] -> ShowS #
Exception EvalError Source # |
Methods toException :: EvalError -> SomeException # fromException :: SomeException -> Maybe EvalError # displayException :: EvalError -> String #
PP EvalError Source # |
Methods ppPrec :: Int -> EvalError -> Doc Source #

invalidIndex :: Integer -> a Source #

A sequencing operation has gotten an invalid index.

typeCannotBeDemoted :: Type -> a Source #

For things like `(inf) or `(0-1)

divideByZero :: a Source #

For division by 0.

wordTooWide :: Integer -> a Source #

For when we know that a word is too wide and will exceed gmp's limits (though words approaching this size will probably cause the system to crash anyway due to lack of memory)

cryUserError :: String -> a Source #

For `error`