summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Language.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Language.hs b/src/Language.hs
index cf7cc4c..4ed4eaa 100644
--- a/src/Language.hs
+++ b/src/Language.hs
@@ -149,6 +149,9 @@ infixl 9 !
shape :: NExpr env (TArr n t) -> NExpr env (Tup (Replicate n TIx))
shape = NEShape
+length_ :: NExpr env (TArr N1 t) -> NExpr env TIx
+length_ e = snd_ (shape e)
+
oper :: SOp a t -> NExpr env a -> NExpr env t
oper = NEOp