[Haskell-cafe] Unique Ordered Types
Silvio Frischknecht
silvio.frischi at gmail.com
Wed Aug 12 23:24:54 UTC 2015
Looks very nice. A bit large for my taste though. Anyway, it seems they
can't order their units either.
That's why
(|+|) :: (d1 @~ d2, Num n) => Qu d1 l n -> Qu d2 l n -> Qu d1 l n
and not
(|+|) :: (Num n) => Qu d l n -> Qu d l n -> Qu d l n
This will always be a bit annoying. You can almost never safely write
Qu (Foo :* Bar) l n
but will always have to write
(d @~ (Foo :* Bar)) => Qu d l n
in your types.
Silvio
More information about the Haskell-Cafe
mailing list