[Haskell-cafe] Memoization in Type Calculation
olshanskydr at gmail.com
Mon Jul 17 15:19:35 UTC 2017
I wonder is there some possibility to get Memoization in Type Calculation
(e.g. in closed Type Families)?
Can we make something more efficient for famous Fib function then
type family Fib (n::Nat) :: Nat where
Fib 1 = 1
Fib 2 = 1
Fib n = Fib (n-1) + Fib (n-2)
This Fib has obviously exponential calculation time and we need some
If it is impossible right now, maybe there is a ticket for this? It seems
to me very important things, no?
Probably in this case we can write TypeChecker Plugin, but it looks like
the common problem.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe