Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype Typed x = Typed {}
- class LiftT x where
- failT ∷ [String] → Typed a
- explain ∷ String → Typed a → Typed a
- mergeExplain ∷ (Monoid x, LiftT x) ⇒ String → x → x → x
- data HasConstraint c t where
- With ∷ c t ⇒ s t → HasConstraint c (s t)
- newtype Id x = Id x
- errorTyped ∷ HasCallStack ⇒ Typed t → t
- monadTyped ∷ (HasCallStack, Monad m) ⇒ Typed t → m t
- requireAll ∷ [(Bool, [String])] → Typed a → Typed a
- generateWithSeed ∷ Int → Gen a → IO a
Documentation
data HasConstraint c t where Source #
runTime evidence that the index i
of an indexed type '(s i)'
is constrained by the class c
. If one has an un-indexed type
t
one can always use (Id t) instead. Eg
With (Id x) <- hasOrd repT (Id t)
With ∷ c t ⇒ s t → HasConstraint c (s t) |
errorTyped ∷ HasCallStack ⇒ Typed t → t Source #
Pushes the (Left msgs) into a call to error
monadTyped ∷ (HasCallStack, Monad m) ⇒ Typed t → m t Source #
Pushes the (Left msgs) into a call to error
, then injects into a Monad