
19 Mar
2008
19 Mar
'08
1:50 p.m.
On Wed, Mar 19, 2008 at 10:46 AM, Ryan Ingram
gen1 i = LitE $ StringE $ "<<" ++ show i ++ ">>"
Oops, two mistakes here: 1) StringE should be StringL 2) splices need to be in the Q monad. To fix (2), you can either add a "return" here, or, there are conveniently lowercase constructors for much of TH that return results in the Q monad:
gen1 i = return $ LitE $ StringL $ "<<" ++ show i ++ ">>" or gen1 i = litE $ StringL $ "<<" ++ show i ++ ">>"