RE: [Template-haskell] Template Haskell and Hydra
| Thanks for the suggestion - that certainly would be fine as | an interim solution, and I'll give it a try as soon as | the declaration brackets are implemented. My impression is | that they aren't there yet? No, declaration brackets are there already! Remember, though, that you can only splice in a separate module. So in: | > d1 = [d| f1 :: Clocked a => a -> a -> (a,a) | > f1 a b = (x, z) | > where (x,y) = (f2 a y, f3 b x) | > z = f4 a (f5 x y) z | > |] | > | > f1 = splice d1 This isn't quite right. For a start, the splice should look like $d1 (No "f1 ="; that's in the code already.) Secondly the splice has to be in a separate module (sorry). So define d1 in one module, and splice it in another. (Reason: you are running code. This is an impl restriction; could be lifted with more work.) let us know how you get on. Simon
participants (1)
-
Simon Peyton-Jones