aboutsummaryrefslogtreecommitdiff
path: root/src/CHAD/ForwardAD.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/CHAD/ForwardAD.hs')
-rw-r--r--src/CHAD/ForwardAD.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/CHAD/ForwardAD.hs b/src/CHAD/ForwardAD.hs
index 7126e10..0ebc244 100644
--- a/src/CHAD/ForwardAD.hs
+++ b/src/CHAD/ForwardAD.hs
@@ -7,6 +7,7 @@
module CHAD.ForwardAD where
import Data.Bifunctor (bimap)
+import Data.Foldable (fold)
import System.IO.Unsafe
-- import Debug.Trace
@@ -89,7 +90,7 @@ tanScalars (STLEither a _) (Just (Left x)) = tanScalars a x
tanScalars (STLEither _ b) (Just (Right y)) = tanScalars b y
tanScalars (STMaybe _) Nothing = []
tanScalars (STMaybe t) (Just x) = tanScalars t x
-tanScalars (STArr _ t) x = foldMap id $ arrayMap (tanScalars t) x
+tanScalars (STArr _ t) x = fold $ arrayMap (tanScalars t) x
tanScalars (STScal STI32) _ = []
tanScalars (STScal STI64) _ = []
tanScalars (STScal STF32) x = [realToFrac x]