aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Numeric/ADDual/Internal.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Numeric/ADDual/Internal.hs b/src/Numeric/ADDual/Internal.hs
index 858e0db..5955fae 100644
--- a/src/Numeric/ADDual/Internal.hs
+++ b/src/Numeric/ADDual/Internal.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE MultiWayIf #-}
@@ -41,7 +42,7 @@ gradient' f inp topctg = unsafePerformIO $ do
taperef <- newIORef (MLog idref (Chunk 0 vec1) SLNil)
when debug $ hPutStrLn stderr "Running function"
- let Dual result outi = withDict @(Taping () a) taperef $ f @() inp'
+ let !(Dual result outi) = withDict @(Taping () a) taperef $ f @() inp'
when debug $ hPutStrLn stderr $ "result = " ++ show result ++ "; outi = " ++ show outi
MLog _ lastChunk tapeTail <- readIORef taperef