[Haskell-cafe] Existential question

Tom Schouten tom at zwizwa.be
Sat Aug 20 22:41:52 CEST 2011


On 08/19/2011 08:50 AM, Ryan Ingram wrote:
>
> ki1 :: KI () Int
> ki1 = KI @Int (\() s -> (s+1, s))
>
> ki2 :: KI () Int
> ki2 = KI @() (\() () -> ((), 0))
>
> f :: Bool -> KI () Int
> f x = if x then ki1 else ki2
>
> iso f = KI ?? ??
>
> The problem is that we have multiple possible internal state types!

Aha!
Nice counterexample.
Thanks :)




More information about the Haskell-Cafe mailing list