-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Description
When compiling the latest version on hackage (0.9.22) with ghc 8.2.1, I get the following error:
src/UU/Parsing/Offside.hs:128:9: error:
• Could not deduce (Position pos)
from the context: (InputState t1 s p1, Position p1,
InputState t1 s1 t0, InputState t1 s pos)
bound by the inferred type for ‘sameln’:
forall pos s1 p1.
(InputState t1 s p1, Position p1, InputState t1 s1 t0,
InputState t1 s pos) =>
t1 -> [a0] -> OffsideInput t1 s t0
at src/UU/Parsing/Offside.hs:(128,9)-(145,37)
• In the ambiguity check for the inferred type for ‘sameln’
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
When checking the inferred type
sameln :: forall pos s1 p.
(InputState t1 s p, Position p, InputState t1 s1 t0,
InputState t1 s pos) =>
t1 -> [a0] -> OffsideInput t1 s t0
In an equation for ‘layoutL’:
layoutL ln ts ms
| ln /= sln = startln (column pos) ts ms
| otherwise = sameln ts ms
where
sln = line pos
pos = getPosition ts
layout = layoutL ln
implicit = implicitL ln
....
|
128 | sameln tts ms
| ^^^^^^^^^^^^^...
Adding 'AllowAmbiguousTypes' to the language pragma at the top of the file 'src/UU/Parsing/Offside.hs' seems to work, but I have no idea if this is the correct fix.
Metadata
Metadata
Assignees
Labels
No labels