Created
January 9, 2022 00:19
-
-
Save guibou/504a399cd7f006b725193bb046533a15 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
locFromECP :: ECP -> PV SrcSpan | |
locFromECP e = locA . getLoc <$> unECP e | |
{- | |
1. Defined but not used: ‘locFromECP’ | |
2. • Ambiguous type variable ‘t0’ arising from a use of ‘unECP’ | |
prevents the constraint ‘(DisambECP (t0 GhcPs))’ from being solved. | |
Probable fix: use a type annotation to specify what ‘t0’ should be. | |
These potential instances exist: | |
instance DisambECP (PatBuilder GhcPs) | |
-- Defined at /home/guillaume/srcs/ghc/compiler/GHC/Parser/PostProcess.hs:1791:10 | |
instance DisambECP (HsCmd GhcPs) | |
-- Defined at /home/guillaume/srcs/ghc/compiler/GHC/Parser/PostProcess.hs:1608:10 | |
instance DisambECP (HsExpr GhcPs) | |
-- Defined at /home/guillaume/srcs/ghc/compiler/GHC/Parser/PostProcess.hs:1690:10 | |
• In the second argument of ‘(<$>)’, namely ‘unECP e’ | |
In the expression: locA . getLoc <$> unECP e | |
In an equation for ‘locFromECP’: | |
locFromECP e = locA . getLoc <$> unECP e | |
3. • Occurs check: cannot construct the infinite type: | |
t0 ~ Body (t0 GhcPs) | |
arising from a use of ‘unECP’ | |
The type variable ‘t0’ is ambiguous | |
• In the second argument of ‘(<$>)’, namely ‘unECP e’ | |
In the expression: locA . getLoc <$> unECP e | |
In an equation for ‘locFromECP’: | |
locFromECP e = locA . getLoc <$> unECP e | |
-} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment