aboutsummaryrefslogtreecommitdiff
path: root/src/Interpreter.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Interpreter.hs')
-rw-r--r--src/Interpreter.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Interpreter.hs b/src/Interpreter.hs
index db7033d..79d5014 100644
--- a/src/Interpreter.hs
+++ b/src/Interpreter.hs
@@ -146,6 +146,10 @@ interpret'Rec env = \case
sh `ShCons` n = arrayShape arr
numericIsNum t $ return $
arrayGenerate sh (\idx -> minimum [arrayIndex arr (idx `IxCons` i) | i <- [0 .. n-1]])
+ EReshape _ dim esh e -> do
+ sh <- unTupRepIdx ShNil ShCons dim <$> interpret' env esh
+ arr <- interpret' env e
+ return $ arrayReshape sh arr
EFold1InnerD1 _ _ a b c -> do
let t = typeOf b
let f = \x y -> interpret' (V t y `SCons` V t x `SCons` env) a