logo       

TH bug: Lift (a -> b) where: msg#00064

lang.haskell.glasgow.bugs

Subject: TH bug: Lift (a -> b) where

Hello,

I dont know if it has been reported, this looks like a bug in TH. The
program goes into infinite loop.

Saswat

-----------------------------
instance Lift (a -> b) where
lift f = [| f |]

compile :: (a -> b) -> ExpQ
compile p = lift p

printE :: ExpQ -> IO ()
printE expQ = do exp <- unQ expQ
putStrLn (show exp)

inc x = x + 1

main = printE (compile inc)
-----------------------------


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise