purescript-typelevel-prelude icon indicating copy to clipboard operation
purescript-typelevel-prelude copied to clipboard

Document Undecidable Instance

Open maddie927 opened this issue 7 years ago • 1 comments

I ran into an issue using multiple deletes to compose a Builder because of the underlying Type.Row constraints: http://try.purescript.org/?gist=c566077f18d0d9ddbd99d3c79d1cfd4a

@paf31 came up with these explicit annotations to fix it: http://try.purescript.org/?gist=faf2fd6edfa06949831b0be85d91af43

I think @paf31 was saying this was a compiler issue but it'd be good to document the danger here.

maddie927 avatar Mar 20 '18 16:03 maddie927

The issue seems to be the usual one with undecidable instances - committing to an undecidable instance before all type information is available. We have a more specific instance in the context which should be picked.

So whether this is a compiler issue remains to be decided, but we could address this here with a comment explaining the risk perhaps.

paf31 avatar Mar 20 '18 16:03 paf31