purescript / purescript-typelevel-prelude

Types and kinds for basic type-level programming

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Document Undecidable Instance

megamaddu opened this issue · 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.

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.