playground/clash/ListInput.hs

31 lines
469 B
Haskell

module ListState where
import Clash.Prelude
tf
:: (Ord a, Num a)
=> ()
-> [a]
-> ((), Bool)
tf s i =
if sum i > 10 then ((), True)
else ((), True)
tfun
:: SystemClockResetEnable
=> Signal System [Int]
-> Signal System Bool
tfun = mealy tf ()
topEntity
:: Clock System
-> Reset System
-> Enable System
-> Signal System [Int]
-> signal System Bool
topEntity = exposeClockResetEnable tfun
{-
compiles but doesn't synthesize
-}