-
-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Description
I sometimes get error messages that resemble GHC missing instance messages but I don't understand what they actually mean. For example, the declaration
import Control.Lens (ReifiedLens(Lens))
foo :: HasPosition i s t a b => ReifiedLens s t a b
foo = Lens (position0 @i)
Gives this error:
src/Data/Generics/Product/Positions.hs:109:18: error:
* | No instance for ?Generic s?
| arising from a generic lens focusing on the field at
| position ?i? of type ?a? in ?s?
* In the first argument of `Lens', namely `position0'
In the expression: Lens (position0 @i)
In an equation for `foo': foo = Lens (position0 @i)
Could someone explain what this question mark bracketing means? There is already a Generic constraint on s.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels