ekmett / bound

Combinators for manipulating locally-nameless generalized de Bruijn terms
https://www.schoolofhaskell.com/user/edwardk/bound
Other
121 stars 30 forks source link

Remove or explain mention of "ideal monad" from package introduction. #53

Open danidiaz opened 7 years ago

danidiaz commented 7 years ago

The first thing the user reads after clicking on this library is

We represent the target language itself as an ideal monad supplied by the user

I find this a bit confusing because "ideal monad" doesn't seem to be a widely known concept in Haskell (unlike, say, "free monad"). The references I have found give more general category-theoretic explanations and are a bit hard to grasp. In Haskell terms, it seems that ideal monads have a "pure" constructor, but I'm not sure if there are other conditions.

If the conditions are easy to state, perhaps they should be used instead of the term "ideal monad".

ekmett commented 7 years ago

If anything I'd just as soon include the laws for ideal monads rather than remove or further obscure the connection. The operations provided by bound encumber the monad to the point where it is no longer free, but it remains ideal and can be used with ideal monad coproducts, etc.

danidiaz commented 7 years ago

Including the laws (so that people who encounter the package can recognize and create their own ideal monads) would be fine.