summaryrefslogtreecommitdiff
path: root/src/Array.hs
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2024-09-15 22:14:11 +0200
committerTom Smeding <tom@tomsmeding.com>2024-09-15 22:14:11 +0200
commit1d748ea62d02e4f66fd0f8be9815b8c3843f8356 (patch)
tree6b7631b191fdd6df137e527844296a93a77d3067 /src/Array.hs
parent94938d648e021d2ace0f3b7bf383d256449d619f (diff)
WIP Accum stuff
Diffstat (limited to 'src/Array.hs')
-rw-r--r--src/Array.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Array.hs b/src/Array.hs
index 0d585a9..d7dadbf 100644
--- a/src/Array.hs
+++ b/src/Array.hs
@@ -1,6 +1,7 @@
-{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE DataKinds #-}
+{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE GADTs #-}
+{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TupleSections #-}
module Array where
@@ -47,7 +48,7 @@ emptyShape (SS m) = emptyShape m `ShCons` 0
-- | TODO: this Vector is a boxed vector, which is horrendously inefficient.
data Array (n :: Nat) t = Array (Shape n) (Vector t)
- deriving (Show)
+ deriving (Show, Functor, Foldable, Traversable)
arrayShape :: Array n t -> Shape n
arrayShape (Array sh _) = sh