[GHC] #892: TH does not have Lift instances for Maybe and Either

GHC trac at galois.com
Thu Sep 7 12:08:28 EDT 2006


#892: TH does not have Lift instances for Maybe and Either
-------------------------------+--------------------------------------------
  Reporter:  guest             |          Owner:          
      Type:  bug               |         Status:  new     
  Priority:  lowest            |      Milestone:          
 Component:  Template Haskell  |        Version:  6.4.2   
  Severity:  normal            |     Resolution:          
  Keywords:                    |             Os:  Multiple
Difficulty:  Easy (1 hr)       |   Architecture:  Multiple
-------------------------------+--------------------------------------------
Comment (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] )
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/892>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list