[Template-haskell] instance of Lift for Exp

Simon Peyton-Jones simonpj at microsoft.com
Wed Jul 21 09:04:30 EDT 2004


| While on the topic of TH, let me float "yet another idea"TM
| Include {-#  #-} pragmas in the TH abstract syntax.
| 
| Why? Because it would allow domain/library-specific hints and
| annotations.
| 
| data Pragma = PragmaGhcRule ...
| 	      PragmaGhcSpecialise ...
|               PragmaOther String   --free form
| 
| My application of this might be to let the user indicate binding times
| when doing partial evaluation, eg:
| 
| {-# BT  foo :: Static -> Dynamic -> Dynamic #-}
| foo :: Int -> Int -> int
| foo x y = ...

Reasonable idea.   I'll put it in the list, but if anyone wants to have
a go at implementing it, go right ahead.

Simon


More information about the template-haskell mailing list