[GHC] #8554: kindFunResult panic when type checking wrongly-kinded function
GHC
ghc-devs at haskell.org
Thu Nov 21 17:29:12 UTC 2013
#8554: kindFunResult panic when type checking wrongly-kinded function
-------------------------------------+-------------------------------------
Reporter: patrick_thomson | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (Type | Version: 7.6.3
checker) | Operating System: MacOS X
Keywords: | Type of failure: Compile-time
Architecture: x86_64 (amd64) | crash
Difficulty: Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: |
-------------------------------------+-------------------------------------
While working on some writing about recursion schemes and morphisms, I
wrote the following well-known catamorphism:
{{{
import Control.Arrow
newtype Fix f = Fix { unFix :: f (Fix f) }
bottomUp f = unFix >>> fmap (bottomUp f) >>> Fix >>> f
}}}
On a lark, I decided to reverse the direction of the arrows in the above
statement and see what the typechecker had to say about it:
{{{
nonsense f = unFix <<< fmap (nonsense f) <<< Fix <<< f
}}}
This function is (I think) not well-kinded, but during type checking (both
from ghci and ghc) I get the following error:
{{{
ghc: panic! (the 'impossible' happened)
(GHC version 7.6.3 for i386-apple-darwin):
kindFunResult
<<details unavailable>>
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
}}}
I am running 32-bit GHC 7.6.3 (from the Haskell Platform) on an x86_64
machine running OS X 10.9. I have attached the output of ghc -v.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8554>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list