[Template-haskell] Binding again

Keean Schupke k.schupke at imperial.ac.uk
Thu Nov 25 12:05:50 EST 2004


Simon Peyton-Jones wrote:

>[cut]
>
>But a 'yes' to Q2 might be considered inconvenient, because you might
>generate lots of (newName "f"), and they'd then clash.
>
>Views?
>  
>
Erm confusing... what about:

d2 :: Q [Dec]
d2 = do
	f1 <- newName "f"
	f2 <- newName "f"
	fn1 <- funD f1 ...
	fn2 <- funD f2 ...
	return [fn1,fn2]

Keean
	






More information about the template-haskell mailing list