[GHC] #15767: "StgCmmEnv: variable not found" with FunctionalDependencies and FlexibleContexts
GHC
ghc-devs at haskell.org
Tue Oct 30 18:57:01 UTC 2018
#15767: "StgCmmEnv: variable not found" with FunctionalDependencies and
FlexibleContexts
-------------------------------------+-------------------------------------
Reporter: roland | Owner: (none)
Type: bug | Status: merge
Priority: normal | Milestone:
Component: Compiler | Version: 8.6.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: Compile-time | Test Case:
crash or panic | typecheck/should_fail/T15767
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by bgamari):
I'm afraid I'm seeing some spurious test output changes when cherry-
picking this to `ghc-8.6`. For instance,
{{{#!patch
diff -uw "./rename/should_fail/mc13.run/mc13.stderr.normalised"
"./rename/should_fail/mc13.run/mc13.comp.stderr.normalised"
--- ./rename/should_fail/mc13.run/mc13.stderr.normalised 2018-10-30
14:54:22.690690790 -0400
+++ ./rename/should_fail/mc13.run/mc13.comp.stderr.normalised 2018-10-30
14:54:22.690690790 -0400
@@ -1,2 +1,18 @@
-mc13.hs:12:37: Variable not in scope: f :: [a] -> m a
+mc13.hs:12:16:
+ Ambiguous type variable ‘m0’ arising from a statement in a monad
comprehension
+ prevents the constraint ‘(Monad m0)’ from being solved.
+ Relevant bindings include output :: m0 () (bound at mc13.hs:12:1)
+ Probable fix: use a type annotation to specify what ‘m0’ should be.
+ These potential instances exist:
+ instance Monad IO -- Defined in ‘GHC.Base’
+ instance Monad Maybe -- Defined in ‘GHC.Base’
+ instance Monoid a => Monad ((,) a) -- Defined in ‘GHC.Base’
+ ...plus one other
+ ...plus two instances involving out-of-scope types
+ (use -fprint-potential-instances to see them all)
+ In a stmt of a monad comprehension: then f
+ In the expression: [() | f <- functions, then f]
+ In an equation for ‘output’: output = [() | f <- functions, then f]
+
+mc13.hs:12:37: Variable not in scope: f :: [a] -> m0 a
}}}
and similar new errors in `TEST="T12529 T12921 mc13 mc14"`. Given that
these are just error message regressions I'm going to go ahead and accept
them (and perhaps we can fix them later if anyone knows the cause off-
hand).
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15767#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list