Rename unsafe and safe index in PrimArray interface

This commit is contained in:
Kiana Sheibani 2022-05-13 08:33:03 -04:00
parent b0e4253b88
commit a88fc5d9c6
Signed by: toki
GPG key ID: 6CB106C25E86A9F7
2 changed files with 9 additions and 8 deletions

View file

@ -69,7 +69,7 @@ reshape s' = reshape' s' (orderOfShape s' COrder)
export
index : Coords s -> Array s a -> a
index is arr = unsafeIndex (computeLoc (getStrides arr) is) (getPrim arr)
index is arr = index (computeLoc (getStrides arr) is) (getPrim arr)
export
@ -80,3 +80,4 @@ export
main : IO ()
main = do
printLn $ index [0,1,0] test
printLn $ index [1,1,2] test