Ticket #892 (closed bug: fixed)

Opened 7 years ago

Last modified 4 years ago

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: Difficulty: Easy (less than 1 hour)
Test Case: Blocked By:
Blocking: Related Tickets:

Description

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

Attachments

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

Change History

Changed 7 years ago by guest

  • attachment foo Download added

Changed 7 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] )

Changed 7 years ago by igloo

  • status changed from new to closed
  • resolution set to fixed

I've now added the instances.

Thanks Ian

Changed 5 years ago by simonmar

  • architecture changed from Multiple to Unknown/Multiple

Changed 5 years ago by simonmar

  • os changed from Multiple to Unknown/Multiple

Changed 4 years ago by simonmar

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