Wed May 27 11:12:42 PDT 2009 [email protected]
* Template Haskell: allow type splices
Ignore-this: 8beb8ab4f5857967ff33a4877c8931b
At last! Trac #1476 and #3177
This patch extends Template Haskell by allowing splices in
types. For example
f :: Int -> $(burble 3)
A type splice should work anywhere a type is expected. This feature
has been long requested, and quite a while ago I'd re-engineered the
type checker to make it easier, but had never got around to finishing
the job. With luck, this does it.
There's a ToDo in the HsSpliceTy case of RnTypes.rnHsType, where I
am not dealing properly with the used variables; but that's awaiting
the refactoring of the way we report unused names.
M ./compiler/parser/Parser.y.pp +4
M ./compiler/rename/RnExpr.lhs -2 +2
M ./compiler/rename/RnSource.lhs -58 +3
M ./compiler/rename/RnTypes.lhs -3 +62
M ./compiler/typecheck/TcHsType.lhs -5 +17
M ./compiler/typecheck/TcMType.lhs -4 +8
M ./compiler/typecheck/TcSplice.lhs -18 +19
M ./compiler/typecheck/TcSplice.lhs-boot -2 +5
M ./compiler/typecheck/TcType.lhs +2
View patch online:
http://darcs.haskell.org/ghc/_darcs/patches/20090527181242-1287e-bf6a4d9e05158571fae95f99614b8aec97f68e56.gz
_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc