[Haskell-cafe] liftN

adam vogt vogt.adam at gmail.com
Thu Oct 17 22:09:21 UTC 2013

On Thu, Oct 17, 2013 at 3:19 PM, Wvv <vitea3v at rambler.ru> wrote:
> Nice! Thanks!
> As I understand, your solution it is not liftN, but another nice function:
> liftUp (it lifts up to Monad).

The simpler liftN I wrote seems to be the same as

In the LiftN_ module, the expression (liftN (Proxy :: Proxy 3)) has
the same type as the example (lift . lift . lift) you gave, and the
recursion in the class instance look pretty much repeats the lift .
(liftN (n-1)) you wrote.

On the other hand, I'm not sure what you're expecting from the type
signature you wrote for liftN. Promoted types don't have values, which
is why things like f :: True and  g :: 'False -> () are kind errors.


More information about the Haskell-Cafe mailing list