Skip to content

Commit

Permalink
'smap' is now in the prelude
Browse files Browse the repository at this point in the history
  • Loading branch information
christiaanb committed Oct 16, 2015
1 parent 28b8d8f commit e421041
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions tests/shouldwork/Vector/DFold2.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@ module DFold2 where
import CLaSH.Prelude
import Data.Proxy

smap :: KnownNat k => (forall l . SNat (k-1-l) -> a -> b) -> Vec k a -> Vec k b
smap f xs = dfold (Proxy :: Proxy (VCons a))
(\sn x xs -> f (xsL `subSNat` d1 `subSNat` sn) x :> xs)
Nil xs
where
xsL = lengthS xs

topEntity :: Vec 4 (Vec 4 (Unsigned 8)) -> Vec 4 (Vec 4 (Unsigned 8))
topEntity = smap (flip rotateRightS)

Expand Down

0 comments on commit e421041

Please sign in to comment.