summaryrefslogtreecommitdiff
path: root/src/Array.hs
diff options
context:
space:
mode:
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