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
This makes it impossible to use GND or deriving via to derive FromRow instances. This is rather annoying since there is no good reason for type variable to nominal.
Fixing this is possible but require some boilerplate
The text was updated successfully, but these errors were encountered:
As I said it makes impossible to use GND or deriving via which rely on coerce. As a simple example:
newtypeFoo=Foo (Int,Int)
derivingnewtypeFromRow
results in error:
• Couldn't match type ‘(Int, Int)’ with ‘Foo’
arising from the coercion of the method ‘fromRow’
from type ‘RowParser (Int, Int)’ to type ‘RowParser Foo’
• When deriving the instance for (FromRow Foo)
Reason for that is quite easy to see:
type role RowParser nominal
This in turn is caused by ReaderT:
type role ReaderT representational representational nominal
This could be fixed by unpacking ReaderT and using it only to derive instances. Something along the lines:
This makes it impossible to use GND or deriving via to derive FromRow instances. This is rather annoying since there is no good reason for type variable to nominal.
Fixing this is possible but require some boilerplate
The text was updated successfully, but these errors were encountered: