Opened 14 years ago

Closed 14 years ago

Last modified 47 years ago

#124 closed bug (Fixed)

GHCi segfaults on expression evaluation

Reported by: carlossch Owned by: simonpj
Priority: normal Milestone:
Component: None Version: 5.04.2
Keywords: Cc:
Operating System: Architecture:
Type of failure: Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:



I think I've come across a GHCi bug.

Using the following module, GHCi version 5.04.2 segfaults, apparently trying to compute a type using functional dependencies. The segfault
happens when I try to calculate (v1 .> v2). I tried the code on Hugs, and it answers

Main> v1 .> v2
V [] :: PSOp (Pop a Id)

as expected. I think the problem is occuring in the line

> instance Reverse a b c => CheckPS Id a b c

because if I remove the line

> instance Reverse a (Pop t b)  c => Reverse (Pop t a) b c

instead of segfaulting, GHCi rightfully complains:

    No instance for (Reverse (Pop a Id) Id c)
    arising from use of `.>' at <interactive>:1
    In the definition of `it': v1 .> v2

GHC compiles the program just fine and runs it without any issues. I installed GHC 5.04.2 using the RedHat 8.0 RPM's. If there's any important information you may need from me, please,  contact me through my email (, I'd be glad to be of help.


Attachments (1)

Test.2.hs (1.5 KB) - added by carlossch 14 years ago.

Download all attachments as: .zip

Change History (3)

Changed 14 years ago by carlossch

comment:1 Changed 14 years ago by carlossch

Logged In: YES 

I have just noticed that I mistakenly uploaded the file Test.hs without uncommenting the line

> instance Reverse a (Pop t b) ... 

GHCi only crashes with this line uncommented. I am sorry for the confusion

comment:2 Changed 14 years ago by simonmar

  • Status changed from assigned to closed
Logged In: YES 

This one is now fixed.
Note: See TracTickets for help on using tickets.