[Haskell-cafe] manage effects in a DSL
Brandon Allbery
allbery.b at gmail.com
Mon Feb 10 17:16:12 UTC 2014
On Mon, Feb 10, 2014 at 11:26 AM, Dominique Devriese <
dominique.devriese at cs.kuleuven.be> wrote:
> I disagree. Just think about the Ord type class. A decidable order
> relation for a type is definitely something I would consider a clear
> semantical meaning, but different sensible instances can be defined
> for many types... The same thing goes for Eq or Monoid or MonadState
> or...
>
Sure... but now you have to make sure everything agrees about it. The way
you do this in Haskell is to give your custom instance a distinct type to
go with it. (Now go look at the Sum and Product monoids).
--
brandon s allbery kf8nh sine nomine associates
allbery.b at gmail.com ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140210/a294e20b/attachment.html>
More information about the Haskell-Cafe
mailing list