singleraeh-0.4.0: raehik's singletons
Safe HaskellSafe-Inferred
LanguageGHC2021

Singleraeh.Equality

Synopsis

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 testEqualitys 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