From e7df04c53ee43603d4a75bf31c7bddae1575366a Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Wed, 17 Apr 2024 10:22:01 +0200 Subject: Strict fields in data instances --- src/Data/Array/Nested/Internal.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Data/Array/Nested') diff --git a/src/Data/Array/Nested/Internal.hs b/src/Data/Array/Nested/Internal.hs index bfcb760..e470907 100644 --- a/src/Data/Array/Nested/Internal.hs +++ b/src/Data/Array/Nested/Internal.hs @@ -117,7 +117,7 @@ newtype instance Mixed sh () = M_Nil (XArray sh ()) -- no content, orthotope op deriving (Show) -- etc. -data instance Mixed sh (a, b) = M_Tup2 (Mixed sh a) (Mixed sh b) +data instance Mixed sh (a, b) = M_Tup2 !(Mixed sh a) !(Mixed sh b) deriving instance (Show (Mixed sh a), Show (Mixed sh b)) => Show (Mixed sh (a, b)) -- etc. @@ -137,10 +137,10 @@ newtype instance MixedVecs s sh Double = MV_Double (VS.MVector s Double) newtype instance MixedVecs s sh () = MV_Nil (VS.MVector s ()) -- no content, MVector optimises this -- etc. -data instance MixedVecs s sh (a, b) = MV_Tup2 (MixedVecs s sh a) (MixedVecs s sh b) +data instance MixedVecs s sh (a, b) = MV_Tup2 !(MixedVecs s sh a) !(MixedVecs s sh b) -- etc. -data instance MixedVecs s sh1 (Mixed sh2 a) = MV_Nest (IxX sh2) (MixedVecs s (sh1 ++ sh2) a) +data instance MixedVecs s sh1 (Mixed sh2 a) = MV_Nest !(IxX sh2) !(MixedVecs s (sh1 ++ sh2) a) -- | Tree giving the shape of every array component. -- cgit v1.2.3-70-g09d2