Ticket #668 (closed bug: wontfix)

Opened 7 years ago

Last modified 5 years ago

Compiler loops indefinitely on Morris-style fixed-point operator

Reported by: Stefan Holdermans (stefan@… Owned by:
Priority: normal Milestone:
Component: Compiler Version: 6.4.1
Keywords: code generation, morris-style fixed-point operator Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Consider the following programs:

-- program 1.hs
newtype F a = F {unF :: F a -> a}
fix f       = (\x -> f (unF x x)) (F (\x -> f (unF x x)))
fac         = fix (\f -> \n -> if n == 0 then 1 else n * f (n - 1))
main        = return ()
-- program 2: morris2.hs
newtype F a = F {unF :: F a -> a}
fix f       = (\x -> f (unF x x)) (F (\x -> f (unF x x)))
fac         = fix (\f -> \n -> if n == 0 then 1 else n * f (n - 1))
main        = print (fac 2)

The first one compiles just fine; the second however causes GHC to go in an infinite loop:

$ ghc -c morris1.hs
$
$ ghc -c morris2.hs
(loops)

Change History

Changed 7 years ago by stefan@…

  • keywords code generation, added; type checker, removed
  • priority changed from low to normal
  • component changed from Compiler (Type checker) to Compiler

Changed 7 years ago by guest

  • summary changed from Type checker loops on Morris-style fixed-point operator to Compiler loops indefinitely on Morris-style fixed-point operator

Changed 7 years ago by simonmar

  • status changed from new to closed
  • resolution set to wontfix
  • os changed from MacOS X to Multiple
  • architecture changed from powerpc to Multiple

This is a known bug, documented here.

Changed 5 years ago by simonmar

  • architecture changed from Multiple to Unknown/Multiple

Changed 5 years ago by simonmar

  • os changed from Multiple to Unknown/Multiple
Note: See TracTickets for help on using tickets.