From 1d748ea62d02e4f66fd0f8be9815b8c3843f8356 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Sun, 15 Sep 2024 22:14:11 +0200 Subject: WIP Accum stuff --- src/Array.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Array.hs') 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 -- cgit v1.2.3-70-g09d2