Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- testEqElse :: forall f a b r. TestEquality f => f a -> f b -> (a ~ b => r) -> r -> r
Documentation
testEqElse :: forall f a b r. TestEquality f => f a -> f b -> (a ~ b => r) -> r -> r Source #
Do one thing if a
and b
are equal, else do something else.
Handy for chaining testEquality
s e.g. when singling type family equation
lists.
Use like so:
testEqN sn sm1 _ $ testEqN sn sm2 _ $ ...
TODO really handy. give a larger, concrete example