[GHC] #15368: Type families, holes and -fdefer-type-errors may cause 'opt_univ fell into a hole' panic
GHC
ghc-devs at haskell.org
Wed Sep 5 11:19:26 UTC 2018
#15368: Type families, holes and -fdefer-type-errors may cause 'opt_univ fell into
a hole' panic
-------------------------------------+-------------------------------------
Reporter: dramforever | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.8.1
Component: Compiler | Version: 8.4.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: Compile-time | Test Case:
crash or panic | typecheck/should_compile/T15368
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by osa1):
I believe this is fixed in 8.6 beta already so we should merge Phab:D4958
and close this:
{{{
haskell $ ghc MorePanic.hs -fdefer-type-errors
[1 of 1] Compiling MorePanic ( MorePanic.hs, MorePanic.o )
MorePanic.hs:9:15: warning: [-Wtyped-holes]
• Found hole: _ :: (F a b, F a0 b0)
Where: ‘a0’ is an ambiguous type variable
‘b0’ is an ambiguous type variable
‘a’, ‘b’ are rigid type variables bound by
the type signature for:
trigger :: forall a b. a -> b -> (F a b, F b a)
at MorePanic.hs:8:1-35
• In the first argument of ‘transitive’, namely ‘_’
In the expression: _ `transitive` trigger _ _
In an equation for ‘trigger’:
trigger _ _ = _ `transitive` trigger _ _
• Relevant bindings include
trigger :: a -> b -> (F a b, F b a) (bound at MorePanic.hs:9:1)
|
9 | trigger _ _ = _ `transitive` trigger _ _
| ^
MorePanic.hs:9:15: warning: [-Wdeferred-type-errors]
• Couldn't match type ‘F b a’ with ‘F b0 a0’
Expected type: (F a b, F b a)
Actual type: (F a b, F b0 a0)
NB: ‘F’ is a non-injective type family
The type variables ‘b0’, ‘a0’ are ambiguous
• In the expression: _ `transitive` trigger _ _
In an equation for ‘trigger’:
trigger _ _ = _ `transitive` trigger _ _
• Relevant bindings include
trigger :: a -> b -> (F a b, F b a) (bound at MorePanic.hs:9:1)
|
9 | trigger _ _ = _ `transitive` trigger _ _
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
MorePanic.hs:9:38: warning: [-Wtyped-holes]
• Found hole: _ :: a0
Where: ‘a0’ is an ambiguous type variable
• In the first argument of ‘trigger’, namely ‘_’
In the second argument of ‘transitive’, namely ‘trigger _ _’
In the expression: _ `transitive` trigger _ _
• Relevant bindings include
trigger :: a -> b -> (F a b, F b a) (bound at MorePanic.hs:9:1)
|
9 | trigger _ _ = _ `transitive` trigger _ _
| ^
MorePanic.hs:9:40: warning: [-Wtyped-holes]
• Found hole: _ :: b0
Where: ‘b0’ is an ambiguous type variable
• In the second argument of ‘trigger’, namely ‘_’
In the second argument of ‘transitive’, namely ‘trigger _ _’
In the expression: _ `transitive` trigger _ _
• Relevant bindings include
trigger :: a -> b -> (F a b, F b a) (bound at MorePanic.hs:9:1)
|
9 | trigger _ _ = _ `transitive` trigger _ _
| ^
haskell $ ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.6.0.20180810
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15368#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list