cryptol-2.8.0: Cryptol: The Language of Cryptography

Safe Haskell | Safe
Language | Haskell2010

Cryptol.TypeCheck.Default

Synopsis

- defaultLiterals :: [TVar] -> [Goal] -> ([TVar], Subst, [Warning])
- improveByDefaultingWithPure :: [TVar] -> [Goal] -> ([TVar], [Goal], Subst, [Warning])
- defaultReplExpr' :: Solver -> [TParam] -> [Prop] -> IO (Maybe [(TParam, Type)])

# Documentation

defaultLiterals :: [TVar] -> [Goal] -> ([TVar], Subst, [Warning]) Source #

We default constraints of the form `Literal t a` to `a := [width t]`

improveByDefaultingWithPure :: [TVar] -> [Goal] -> ([TVar], [Goal], Subst, [Warning]) Source #

defaultReplExpr' :: Solver -> [TParam] -> [Prop] -> IO (Maybe [(TParam, Type)]) Source #

Try to pick a reasonable instantiation for an expression with the given type. This is useful when we do evaluation at the REPL. The resulting types should satisfy the constraints of the schema. The parameters should be all of numeric kind, and the props should als be numeric