I know there are a lot of solutions to this, but I've personally found the `mtl` mechanism in Haskell to be completely sufficient.
I know there are a lot of solutions to this, but I've personally found the `mtl` mechanism in Haskell to be completely sufficient. I describe whatever effect languages I want my application bits to be able to operate over as separate type classes and then build one or more interpreters of these classes to run. Essentially it's mtl + Oleg's "Finally Tagless" mechanism [0] [1]. The problem with this mechanism is not felt by the application writer but instead the library writer. It forces you to instantiate (n x m) combinations of effects for your (concrete instantiators) x (effectful languages). For the core classes mtl bears this well, but it might explain why this technique is not as well represented in written libraries. That said, as an application writer the number of concrete instantiators is often between 1 and 3 so the pain is very reasonable. (Edit: I should add that there is another downside in the mtl method in that authors of these finally-tagless code fragments cannot choose priority order of effects---the interpreter is free to decide this on their own. There's nothing wrong with this as long as you, as interpreter writer, consider the burden of correctness. You should be anyway, though, so... It ends up being a minor pain point, imo.) [0] http://hackage.haskell.org/package/mtl [1] http://okmij.org/ftp/tagless-final/
Posted by tel on Feb 2, 2015, 7:47 PM
Tags
Related issues
- > Because they don't believe the disasters were inflicted by them.
- Hehe, yeah I'm not sure when John Stewart would have worked there or what the pain points were for him, but he worked there for a bit.
- https://www.apple.com/shop/product/mxcl3ll/a/magic-keyboard-...
- If first-order hybrids made up only a small proportion of the total population of humans and Neanderthals, then the probability that a pa...
- Well, I'd be interested to hear what some of those nuances are, personally.
- My biggest Amazon annoyance.
Raise real-world problems, find people facing the same issue, and discuss solutions.8,000 issues0 comments
hackernews (E-commerce)
> Because they don't believe the disasters were inflicted by them.
Hehe, yeah I'm not sure when John Stewart would have worked there or what the pain points were for him, but he worked there for a bit.
https://www.apple.com/shop/product/mxcl3ll/a/magic-keyboard-...
If first-order hybrids made up only a small proportion of the total population of humans and Neanderthals, then the probability that a pa...
Well, I'd be interested to hear what some of those nuances are, personally.
My biggest Amazon annoyance.
> There's not really an unmet need for innovation in broadband delivery; the issue is running new wires broadband has costs, and in a lot...
Speaking of Amazon's account process, I have a really annoying problem with theirs.
I know there are a lot of solutions to this, but I've personally found the `mtl` mechanism in Haskell to be completely sufficient.
I know there are a lot of solutions to this, but I've personally found the `mtl` mechanism in Haskell to be completely sufficient. I describe whatever effect languages I want my application bits to be able to operate over as separate type classes and then build one or more interpreters of these classes to run. Essentially it's mtl + Oleg's "Finally Tagless" mechanism [0] [1]. The problem with this mechanism is not felt by the application writer but instead the library writer. It forces you to instantiate (n x m) combinations of effects for your (concrete instantiators) x (effectful languages). For the core classes mtl bears this well, but it might explain why this technique is not as well represented in written libraries. That said, as an application writer the number of concrete instantiators is often between 1 and 3 so the pain is very reasonable. (Edit: I should add that there is another downside in the mtl method in that authors of these finally-tagless code fragments cannot choose priority order of effects---the interpreter is free to decide this on their own. There's nothing wrong with this as long as you, as interpreter writer, consider the burden of correctness. You should be anyway, though, so... It ends up being a minor pain point, imo.) [0] http://hackage.haskell.org/package/mtl [1] http://okmij.org/ftp/tagless-final/
Comments (0)
No comments yet. Start the discussion.