X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fmaster-project%2Fsupport%2Ftfvec.git;a=blobdiff_plain;f=Data%2FParam%2FTFVec.hs;h=1b2051e6e9ba176335d69a01033e06b4dd1e1912;hp=529c52c12a163dfb3b31397ddfbd987189e78ca4;hb=7443b25a5a51e48e00b8af393473d75359947225;hpb=92cb4e3a487e88220aba94d7fc6003384e971e5c 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