summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Command/CommandInfo.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/GF/Command/CommandInfo.hs')
-rw-r--r--src/compiler/GF/Command/CommandInfo.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/compiler/GF/Command/CommandInfo.hs b/src/compiler/GF/Command/CommandInfo.hs
index 696d14cbc..f73aa35e1 100644
--- a/src/compiler/GF/Command/CommandInfo.hs
+++ b/src/compiler/GF/Command/CommandInfo.hs
@@ -17,6 +17,8 @@ data CommandInfo env = CommandInfo {
needsTypeCheck :: Bool
}
+mapCommandEnv f c = c { exec = exec c . f }
+
emptyCommandInfo :: CommandInfo env
emptyCommandInfo = CommandInfo {
exec = \_ _ ts -> return $ pipeExprs ts, ----
@@ -33,6 +35,9 @@ emptyCommandInfo = CommandInfo {
class TypeCheckArg env where typeCheckArg :: env -> Expr -> Either Doc Expr
+instance TypeCheckArg env => TypeCheckArg (x,env) where
+ typeCheckArg (x,env) = typeCheckArg env
+
--------------------------------------------------------------------------------
newtype CommandOutput = Piped {fromPipe :: ([Expr],String)} ---- errors, etc