clash-prelude icon indicating copy to clipboard operation
clash-prelude copied to clipboard

window could have simpler signature

Open ra1u opened this issue 7 years ago • 1 comments

current

window :: (KnownNat n, Default a)
       -> Signal a               
       -> Vec (n + 1) (Signal a)   

proposed

window :: (KnownNat n, Default a)
       -> Signal a               
       -> Vec n (Signal a)   

This makes auto type deduction simpler and possible in cases where (n+1) becomes unmanageable.

Possible implementation:

window = iterateI (register def)

ra1u avatar Jun 10 '17 07:06 ra1u

ra1u, you are correct, I'll put it on my todo list.

christiaanb avatar Jun 11 '17 21:06 christiaanb