cryptol-2.10.0: Cryptol: The Language of Cryptography
Copyright(c) 2013-2016 Galois Inc.
LicenseBSD3
Maintainercryptol@galois.com
Stabilityprovisional
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cryptol.TypeCheck.Solver.Utils

Description

 
Synopsis

Documentation

splitVarSummands :: Type -> [(TVar, Type)] Source #

All ways to split a type in the form: a + t1, where a is a variable.

splitVarSummand :: TVar -> Type -> Maybe Type Source #

Check if we can express a type in the form: a + t1.

splitConstSummand :: Type -> Maybe (Integer, Type) Source #

Check if we can express a type in the form: k + t1, where k is a constant > 0. This assumes that the type has been simplified already, so that constants are floated to the left.

splitConstFactor :: Type -> Maybe (Integer, Type) Source #

Check if we can express a type in the form: k * t1, where k is a constant > 1. This assumes that the type has been simplified already, so that constants are floated to the left.