dimensions-1.0.1.1: Safe type-level dimensionality for multidimensional data.

Copyright(c) Artem Chirkin
LicenseBSD3
Maintainerchirkin@arch.ethz.ch
Safe HaskellNone
LanguageHaskell2010

Numeric.Type.Evidence

Description

Construct type-level evidence at runtime

Synopsis

Documentation

data Evidence :: Constraint -> Type where Source #

Bring an instance of certain class or constaint satisfaction evidence into scope.

Constructors

E :: a => Evidence a 

withEvidence :: Evidence a -> (a => r) -> r Source #

Pattern match agains evidence to get constraints info

sumEvs :: Evidence a -> Evidence b -> Evidence (a, b) Source #

Combine evidence

(+!+) :: Evidence a -> Evidence b -> Evidence (a, b) infixl 4 Source #

Combine evidence

data Evidence' :: (k -> Constraint) -> k -> Type where Source #

Same as Evidence, but allows to separate constraint function from the type it is applied to.

Constructors

E' :: c a => Evidence' c a