Open Ericson2314 opened 9 years ago
Sure, that makes sense.
What remains to be done on this?
Well, mostly we need to decide if we need more indexing operations than we already have for Vec: http://hackage.haskell.org/package/clash-prelude-0.10.10/docs/CLaSH-Sized-Vector.html#g:4, and then decide on a type signature.
As we currently have:
(!!) :: (KnownNat n, Enum i) => Vec n a -> i -> a
at :: SNat m -> Vec (m + (n + 1)) a -> a
Just as we have pow2 block ram, etc, it would be nice if we had safe pow2 vector indexing.
I was just refactoring one of my processors to change the word size, and some bugs got caught with my tests instead of the type checker because I was using
!!
.Maybe something like
should go in
CLaSH.Sized.Vector
?Feel free to suggest a different identifier if you like the idea, of course.