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

ListT instance smells funny #47

Open treeowl opened 7 years ago

treeowl commented 7 years ago

ListT from transformers isn't really a monad transformer, so it seems most unlikely to be a valid Bound instance with the default definition.

phadej commented 7 years ago

So what's it will mean to have

| Weird (ListT Exp a)
| Weird (Exp [a])

Will have a AST node type "of type" a, yet having commuting multiple values (potentially none). I don't know what's that can be useful for, but I don't see it's unlawful either.

treeowl commented 7 years ago

I have no idea.