Opened 10 years ago

Closed 10 years ago

Last modified 7 years ago

#892 closed bug (fixed)

TH does not have Lift instances for Maybe and Either

Reported by: guest Owned by:
Priority: lowest Milestone:
Component: Template Haskell Version: 6.4.2
Keywords: 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

Template Haskell does not have Lift instances for Maybe and Either.

Attachments (1)

foo (289 bytes) - added by guest 10 years ago.

Download all attachments as: .zip

Change History (6)

Changed 10 years ago by guest

Attachment: foo added

comment:1 Changed 10 years ago by igloo

FWIW I have a TH package to derive lift instances: http://urchin.earth.li/~ian/cabal/th-lift/ It doesn't handle all sorts of cases, but it should handle things like

data Foo = Foo | Bar Int

just fine. Patches welcomed :-)

Usage:

import Language.Haskell.TH.Lift (deriveLift)

$( mapM deriveLift [''MyType, ''AnotherType] )

comment:2 Changed 10 years ago by igloo

Resolution: fixed
Status: newclosed

I've now added the instances.

Thanks Ian

comment:3 Changed 8 years ago by simonmar

Architecture: MultipleUnknown/Multiple

comment:4 Changed 8 years ago by simonmar

Operating System: MultipleUnknown/Multiple

comment:5 Changed 7 years ago by simonmar

difficulty: Easy (1 hr)Easy (less than 1 hour)
Note: See TracTickets for help on using tickets.