Opened 14 months ago

Closed 8 months ago

Last modified 8 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 Revisions: Phab:D440

Description

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 9 months ago by goldfire

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

comment:2 Changed 8 months ago by goldfire

  • Differential Revisions set to Phab:D440
  • Status changed from new to patch

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

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

In e4efb7b8de8ff3781a42e69e35dee981d9885fcf/ghc:

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

comment:5 Changed 8 months ago by goldfire

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

comment:6 Changed 8 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.