[Haskell-cafe] question on the design of protohaskell (in Write You a Haskell)

Maurizio Vitale mrz.vtl at gmail.com
Fri Jan 22 19:38:38 UTC 2016


I know this part has been left incomplete when Stephen got a real job, but
I have a question.
In http://dev.stephendiehl.com/fun/007_path.html, compiler steps are piped
together using the Kleisli (>=>) operator, presumably the one from
Control.Monad.

they also return some flavour of AST (typically Syn.Module or Core.Module).
Assuming that the >=> is the one from Control.Monad, what is the purpose of
this returned value (all the steps are in a compilerMonad and presumably
would have to update the state w/ the new AST anyhow)?

Or is the intention to have a special >=> that also updates the state (but
I wouldn't know how to deal w/ Syn.Core vs Core.Module)

I would understand some form of phantom type to ensure that compilation
steps are in the right order, but as it is I'm puzzled.

Anybody has some insight?

Thanks,

  Maurizio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20160122/71c67ca3/attachment.html>


More information about the Haskell-Cafe mailing list