4 ms·
> ((a -> Void) -> Void) -> a > However, this is exactly the type of Cont Void. Defined where? Not here: https://hackage.haskell.org/package/monads-tf-0.1.0.
by gowld 4y ago
> ((a -> Void) -> Void) -> a
> However, this is exactly the type of Cont Void.
Defined where?
Not here:
https://hackage.haskell.org/package/monads-tf-0.1.0.3/docs/Control-Monad-Cont.html https://hackage.haskell.org/package/monads-tf-0.1.0.3/docs/C...
https://hackage.haskell.org/package/mtl-2.3.1/docs/Control-Monad-Cont.html https://hackage.haskell.org/package/mtl-2.3.1/docs/Control-M...
The closest I find is
cont :: ((a -> r) -> r) -> Cont r a
so
cont (a -> Void) -> Void) :: Cont Void a
There is nothing "out of thin air", since `a` is the input, not the ouput, unless you just misread the type. But that can be said for any higher-order type, like
map :: (a -> b) -> [a] -> [b]