[Haskell-cafe] Performance of TL-calculations
olshanskydr at gmail.com
Fri Apr 13 13:55:09 UTC 2018
The main problem I have when using promising type-level calculation is
E.g. I have
> type T = ... :: [Symbol]
Now I don't know the order of Symbols in T. But I want to sort it before
using for some reasons.
I can define
> type T1 = Sort T -- where Sort is from Singletons library
but T1 is only type synonym and long type-level calculation will be done in
any places where I use T1.
So I will have problems with compile-time performance.
Probably I would overcome this if I can define
> class X x where ...
> instance X T1 where ...
but I can't do it because can't define instances for (non-injective) Type
Is there any workaround?
Are there any plans to make it better?
Are there any hidden problems to make an analog of CAF on the type level?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe