<div dir="ltr">Hello, cafe!<div><br></div><div>I wonder is there some possibility to get Memoization in Type Calculation (e.g. in closed Type Families)?</div><div><br></div><div>Can we make something more efficient for famous Fib function then</div><div><br></div><div>type family Fib (n::Nat) :: Nat where<br></div><div><div>  Fib 1 = 1</div><div>  Fib 2 = 1</div><div>  Fib n = Fib (n-1) + Fib (n-2)</div></div><div><br></div><div>This Fib has obviously exponential calculation time and we need some memoization.</div><div><br></div><div>If it is impossible right now, maybe there is a ticket for this? It seems to me very important things, no?</div><div><br></div><div>Probably in this case we can write TypeChecker Plugin, but it looks like the common problem.</div><div><br></div><div>Best regards,</div><div>Dmitry</div><div><br></div><div><br></div><div><br></div></div>