Opened 10 years ago

Closed 10 years ago

Last modified 2 years ago

#3368 closed bug (fixed)

Deriving Foldable doesn't work

Reported by: cmcq Owned by: igloo
Priority: normal Milestone: 6.12.1
Component: Compiler Version: 6.11
Keywords: deriving Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

I was trying out the Foldable deriving in GHC HEAD (see ticket #2953). fold gave a stack space overflow. -ddump-deriv shows that the wrong foldr is being used:

  { GHC.Base.foldr f_aat z_aav (Main.Nil) = z_aav,

This is easy to fix but isn't it strange that there's no compile error?

Attachments (2)

fold.patch (9.8 KB) - added by cmcq 10 years ago.
fix
foldtest.patch (3.7 KB) - added by cmcq 10 years ago.
Test that crashes with GHC HEAD

Download all attachments as: .zip

Change History (5)

Changed 10 years ago by cmcq

Attachment: fold.patch added

fix

Changed 10 years ago by cmcq

Attachment: foldtest.patch added

Test that crashes with GHC HEAD

comment:1 Changed 10 years ago by igloo

difficulty: Unknown
Milestone: 6.12.1
Owner: set to igloo

Thanks for the report and patches. I'll take a look.

comment:2 Changed 10 years ago by igloo

Resolution: fixed
Status: newclosed

Patches applied, thanks!

comment:3 Changed 2 years ago by RyanGlScott

Keywords: deriving added
Type of failure: None/Unknown
Note: See TracTickets for help on using tickets.