From: Christiaan Baaij Date: Thu, 6 Aug 2009 12:07:46 +0000 (+0200) Subject: Revert vectorTH to it's old implementation, so that it works with the new tfp X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=7443b25a5a51e48e00b8af393473d75359947225;p=matthijs%2Fmaster-project%2Fsupport%2Ftfvec.git Revert vectorTH to it's old implementation, so that it works with the new tfp --- diff --git a/Data/Param/TFVec.hs b/Data/Param/TFVec.hs index 529c52c..1b2051e 100644 --- a/Data/Param/TFVec.hs +++ b/Data/Param/TFVec.hs @@ -100,9 +100,9 @@ vectorCPS xs = unsafeVectorCPS (toInteger (P.length xs)) xs -- FIXME: Not the most elegant solution... but it works for now in clash vectorTH :: (Lift a, Typeable a) => [a] -> ExpQ -vectorTH xs = sigE [| (TFVec xs) |] (decTFVecT (toInteger (P.length xs)) xs) --- vectorTH [] = [| empty |] --- vectorTH (x:xs) = [| x +> $(vectorTH xs) |] +-- vectorTH xs = sigE [| (TFVec xs) |] (decTFVecT (toInteger (P.length xs)) xs) +vectorTH [] = [| empty |] +vectorTH (x:xs) = [| x +> $(vectorTH xs) |] unsafeVector :: NaturalT s => s -> [a] -> TFVec s a unsafeVector l xs