[GHC] #10031: coerce can cause compiler to loop
GHC
ghc-devs at haskell.org
Tue Jan 27 08:17:40 UTC 2015
#10031: coerce can cause compiler to loop
-------------------------------------+-------------------------------------
Reporter: glguy | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.1-rc1
Keywords: | Operating System: Unknown/Multiple
Architecture: x86_64 | Type of failure: Compile-time
(amd64) | crash
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Revisions: |
-------------------------------------+-------------------------------------
This program causes GHC to loop at compile time
{{{
{-# LANGUAGE ScopedTypeVariables #-}
import Data.Coerce
coerce' :: Coercible b a => a -> b
coerce' = coerce (\x -> x :: b) :: forall a b. Coercible b a => a -> b
}}}
I encountered this trying to use a similar construction in
https://github.com/glguy/profunctors/blob/coerce/src/Data/Profunctor/Unsafe.hs
I'm not absolutely certain about what aspect of this snippet is looping
the compiler, but it's pretty small.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10031>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list