playground/haskell/template-haskell/hi.hs

17 lines
285 B
Haskell

-- {-# TemplateHaskell #-}
import Clash.Prelude
import Clash.Sized.Vector
import Language.Haskell.TH
import Language.Haskell.TH.Syntax
-- v1 = $(listToVecTH [0,1])
{-
λ> :t $(listToVecTH [0,1])
$(listToVecTH [0,1]) :: Num a => Vec 2 a
λ> $(listToVecTH [0,1])
0 :> 1 :> Nil
-}