2013/3/13 Dominique Devriese <dominique.devri...@cs.kuleuven.be>:
> class ProductionRule p => LiftableProductionRule p where
>   epsilonL :: a -> Q Exp -> p aSource
>
> and associated
>   epsilonLS :: (Lift v, LiftableProductionRule p) => v -> p v
>   epsilonLS v = epsilonL v $ lift v

Note that the point of providing epsilonL as primitive and not just
epsilonLS is that I can then still lift most functions I use:

  epsilonL (,) [| (,) |]

Even though functions are not necessarily liftable. This is an
alternative to Oleg's adding of e.g. pair etc. as DSL primitives.

Dominique

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to