You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is of course the argument that polymorphic function inputs and monomorphic literals is the "right" way to do things, but that ship seems to more or less have sailed, and personally I can't say I disagree with it, particularly given that even pre-OverloadedStrings Haskell went that route with Num literals.
Very few libraries take in ToXXXString a => a arguments, and the libraries that are more polymorphic in string usage are generally that way because the same string type appears in both the input and the output, for example mono-traversable.
For that reason I think ghcjs-dom should plan to transition to monomorphic JSString inputs, with end users being encouraged to use OverloadedStrings and the occasional explicit toJSString.
Note that this is just about ToJSString, I'm not currently trying to change any ToJSVal usages.
Currently I'm having to do a lot of: foo @_ @JSString @JSString "bar" "baz" type stuff and it's rather unpleasant to read.
The text was updated successfully, but these errors were encountered:
There is of course the argument that polymorphic function inputs and monomorphic literals is the "right" way to do things, but that ship seems to more or less have sailed, and personally I can't say I disagree with it, particularly given that even pre-OverloadedStrings Haskell went that route with
Num
literals.Very few libraries take in
ToXXXString a => a
arguments, and the libraries that are more polymorphic in string usage are generally that way because the same string type appears in both the input and the output, for example mono-traversable.For that reason I think ghcjs-dom should plan to transition to monomorphic
JSString
inputs, with end users being encouraged to use OverloadedStrings and the occasional explicittoJSString
.Note that this is just about
ToJSString
, I'm not currently trying to change anyToJSVal
usages.Currently I'm having to do a lot of:
foo @_ @JSString @JSString "bar" "baz"
type stuff and it's rather unpleasant to read.The text was updated successfully, but these errors were encountered: