Strange. GHC just doesn't allow nested declaration splices -- and gives a horrible message to boot. I'm not sure why I hadn't even registered that point. Turns out that the way to fix this is closely connected with preparatory work towards producing *typed* TH syntax trees. TH has grown quite a long to-do list in the last month. I'll try to do something about it before our Xmas release of 6.4. How urgent is this particular thing for you? Simon | -----Original Message----- | From: template-haskell-bounces@haskell.org [mailto:template-haskell-bounces@haskell.org] On | Behalf Of Ian Lynagh | Sent: 21 November 2004 23:59 | To: template-haskell@haskell.org | Subject: [Template-haskell] panic: addImpDecls | | | Hi all, | | If I have | | module Q () where | | $( [d| | $( [d| foo = 'c' |] ) | |] | ) | | or even | | module Q () where | | $( [d| | $( [] ) | |] | ) | | then "ghc -fth --make Q.hs" gives me: | | ghc-6.3: panic! (the `impossible' happened, GHC version 6.3): | addImpDecls | | | Thanks | Ian | | _______________________________________________ | template-haskell mailing list | template-haskell@haskell.org | http://www.haskell.org/mailman/listinfo/template-haskell