
17 Oct
2013
17 Oct
'13
6:09 p.m.
On Thu, Oct 17, 2013 at 3:19 PM, Wvv
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 http://hackage.haskell.org/package/layers-0.1/docs/Control-Monad-Layer.html#... 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. -- Adam