Opened 2 years ago

Closed 23 months ago

Last modified 23 months ago

#9064 closed feature request (fixed)

Support default class method signatures in Template Haskell

Reported by: goldfire Owned by: goldfire
Priority: normal Milestone:
Component: Template Haskell Version: 7.8.2
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case: th/T9064
Blocked By: Blocking:
Related Tickets: Differential Rev(s): Phab:D440
Wiki Page:


If I say

blah = [d|
  class C a where
    foo :: a -> String
    default foo :: Show a => a -> String
    foo = show

I get

    Illegal default signature for ‘[foo]’
    Default signatures are not supported by Template Haskell

I would like this feature. I will implement this in due course.

Change History (6)

comment:1 Changed 2 years ago by goldfire

See Design/TemplateHaskellGADTs for a related change to the Dec type I'd like feedback on.

comment:2 Changed 2 years ago by goldfire

  • Differential Rev(s) set to Phab:D440
  • Status changed from new to patch

comment:3 Changed 23 months ago by Richard Eisenberg <eir@…>

comment:4 Changed 23 months ago by Richard Eisenberg <eir@…>

In e4efb7b8de8ff3781a42e69e35dee981d9885fcf/ghc:

Fix #9064 by adding support for generic default signatures to TH.

comment:5 Changed 23 months ago by goldfire

  • Resolution set to fixed
  • Status changed from patch to closed
  • Test Case set to th/T9064

comment:6 Changed 23 months ago by Richard Eisenberg <eir@…>

In 786b62aa57e4dcc528e2da2f7d0451ab834d655a/ghc:

Add release notes for #8100, #9527, and #9064.
Note: See TracTickets for help on using tickets.