Shape view

This commit is contained in:
Kiana Sheibani 2022-06-15 11:45:06 -04:00
parent 4b293d7e2a
commit cb0157cd8c
Signed by: toki
GPG key ID: 6CB106C25E86A9F7
4 changed files with 56 additions and 46 deletions

View file

@ -17,10 +17,6 @@ Matrix' : Nat -> Type -> Type
Matrix' n = Matrix n n
export
withDims : {0 m',n' : Nat} -> {0 b : Nat -> Nat -> Type} -> Matrix m' n' a -> ((m,n : Nat) -> Matrix m n a -> b m n) -> b m' n'
withDims mat f = rewrite shapeEq mat in f (head $ shape mat) (index 1 $ shape mat) (rewrite sym (shapeEq mat) in mat)
--------------------------------------------------------------------------------
-- Matrix constructors
--------------------------------------------------------------------------------