[GHC] #8142: Panic on TypeFamilies compile
GHC
ghc-devs at haskell.org
Mon Aug 19 13:33:29 CEST 2013
#8142: Panic on TypeFamilies compile
---------------------------------------+-----------------------------------
Reporter: zenzike | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.6.3
Resolution: | Keywords:
Operating System: MacOS X | Architecture:
Type of failure: Compile-time crash | Unknown/Multiple
Test Case: | Difficulty: Unknown
Blocking: | Blocked By:
| Related Tickets:
---------------------------------------+-----------------------------------
Comment (by dreixel):
Seems to be fixed in HEAD:
{{{
Test.hs:6:18:
Couldn't match type ‛Nu f0’ with ‛Nu f’
NB: ‛Nu’ is a type function, and may not be injective
The type variable ‛f0’ is ambiguous
Expected type: a -> Nu f
Actual type: a -> Nu f0
When checking that ‛h’
has the inferred type ‛forall (f :: * -> *) a. a -> Nu f’
Probable cause: the inferred type is ambiguous
In an equation for ‛tracer’:
tracer
= h
where
h = (\ (_, b) -> ((outI . fmap h) b)) . out
Test.hs:6:57:
Occurs check: cannot construct the infinite type: a ~ f1 a
Expected type: a -> (t0, f1 a)
Actual type: Nu ((,) t0) -> (t0, Nu ((,) t0))
Relevant bindings include h :: a -> Nu f1 (bound at Test.hs:6:18)
In the second argument of ‛(.)’, namely ‛out’
In the expression: (\ (_, b) -> ((outI . fmap h) b)) . out
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8142#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list