[Haskell-cafe] liftN

adam vogt vogt.adam at gmail.com
Wed Oct 16 23:25:43 UTC 2013

On Wed, Oct 16, 2013 at 5:32 PM, Dan Burton <danburton.email at gmail.com> wrote:
> My "solution" is a lot less interesting
> lift1 = lift
> lift2 = lift . lift1
> lift3 = lift . lift2
> lift4 = lift . lift3
> lift5 = lift . lift4


The number of lifts can be decided if you have a class, and use it in
such a way that the argument and result types are known. It's more
involved to add a type-level Nat that keeps count. Both options are
done here: https://gist.github.com/aavogt/7016708


More information about the Haskell-Cafe mailing list