ku-fpg / hermit-shell

HERMIT with GHCi shell
BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link

Do we need `OverloadedStrings`? #11

Closed ecaustin closed 9 years ago

ecaustin commented 9 years ago

We have had to back off overloading commands on the client side because OverloadedStrings is causing too many type ambiguities to make it worthwhile, e.g. is unfold (["foo", "bar"] :: [OccurrenceName]) really preferable to `unfoldAny ["foo", "bar"]).

Do we need OverloadedStrings though?

We don't have a tab completion engine anymore so distinguishing between OccurrenceName, HermitName, etc. is unnecessary.

We could instead convert those arguments to String values and do the parsing server side (This is what I've done with a few commands already, e.g. unfold and inline.).

Another bonus of this approach is that we don't have to worry about how to serialize HermitNames with aeson since we can just send simple String values.

andygill commented 9 years ago

I've added a wiki page, where can discuss variadic tradeoffs, including Overloading strings.

andygill commented 9 years ago

The question is open, though. Do we need Overloaded Strings? We can examine our DSL to see.

The overloading allows slightly better typing for Name, but does force non-overloaded String-style arguments (or add types, which we want to avoid).

ecaustin commented 9 years ago

I believe Ryan took care of this issue when he redid most of the API.