
I'm very much in the "Damn the torpedoes; full speed ahead" camp most of
the time, but not here. Transformers is a tiny step up from base. Why would
you make it depend on template haskell rather than the other way around?
On Jul 23, 2015 12:17 PM, "Ryan Scott"
Template Haskell currently has runIO :: IO a -> Q a , which allows you to run IO actions with a guarantee of IO effects' ordering in a single splice (but not necessarily the order in which all the Q splices are run). If runIO is indeed a monad morphism, then there is a law-abiding MonadIO Q instance that could be added to transformers:
instance MonadIO Q where liftIO = runIO
This would be useful for dealing with monad transformer stacks with Q as the base monad (for an example, see genifunctors ( https://github.com/danr/genifunctors/blob/4677bb57423b1b380ce9b50cc3d765a5c4... ). The only catch is that transformers would have to depend on template-haskell. I think this would be okay since no quasiquotation is involved, but I wanted to hear others' opinions.
Ryan _______________________________________________ Libraries mailing list Libraries@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries