Opened 9 years ago

Closed 9 years ago

Last modified 6 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: Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

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

Attachments (1)

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

Download all attachments as: .zip

Change History (6)

Changed 9 years ago by guest

comment:1 Changed 9 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 9 years ago by igloo

  • Resolution set to fixed
  • Status changed from new to closed

I've now added the instances.

Thanks
Ian

comment:3 Changed 7 years ago by simonmar

  • Architecture changed from Multiple to Unknown/Multiple

comment:4 Changed 7 years ago by simonmar

  • Operating System changed from Multiple to Unknown/Multiple

comment:5 Changed 6 years ago by simonmar

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