Skip to content

newtype fixpoint sends the compiler into an infinite loop

I was playing around with some edge cases in the type system and hit an infinite loop compiling the following program:

module CompilerBug where

newtype Fix a = Fix (a (Fix a))
data ID a = ID a
newtype I a = I a

testOk :: Fix ID
testOk = undefined

-- this definition causes the compiler to fail to terminate
testInfiniteLoop :: Fix I
testInfiniteLoop = undefined
Trac metadata
Trac field Value
Version 6.6.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system Windows
Architecture x86
Edited by guest
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information