From a87b1a8eb1f659fc15060b6215eb9a6706dfdccd Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Thu, 26 Sep 2024 22:51:51 +0200 Subject: The size of the empty shape is 1, not 0 --- src/Array.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Array.hs b/src/Array.hs index c48e442..c939419 100644 --- a/src/Array.hs +++ b/src/Array.hs @@ -27,7 +27,7 @@ deriving instance Show (Index n) deriving instance Eq (Index n) shapeSize :: Shape n -> Int -shapeSize ShNil = 0 +shapeSize ShNil = 1 shapeSize (ShCons sh n) = shapeSize sh * n fromLinearIndex :: Shape n -> Int -> Index n -- cgit v1.2.3-70-g09d2