diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Parser/Statement.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Parser/Statement.hs b/src/Parser/Statement.hs index 67f2f88..1c1b805 100644 --- a/src/Parser/Statement.hs +++ b/src/Parser/Statement.hs @@ -295,7 +295,7 @@ instance ExprType a => ParamType (InnerBlock a) where combine _ [] = error "inner block parameter count mismatch" innerBlock :: CommandDef (TestStep ()) -innerBlock = ($ ([] :: [ Void ])) <$> innerBlockFun +innerBlock = ($ ([] :: [ Void ])) <$> innerBlockFunList innerBlockFun :: ExprType a => CommandDef (a -> TestStep ()) innerBlockFun = (\f x -> f [ x ]) <$> innerBlockFunList @@ -336,6 +336,9 @@ command name (CommandDef types ctor) = do , Just (Refl :: p :~: InnerBlock a) <- eqT -> SomeParam p . Identity . ( vars, ) <$> restOfParts cmdi partials + | Just (Refl :: p :~: InnerBlock Void) <- eqT + -> SomeParam p . Identity . ( [], ) <$> restOfParts cmdi partials + (sym, SomeParam p Nothing) -> choice [ SomeParam p . Identity <$> paramDefault p , fail $ "missing " ++ (if null sym then "" else "'" ++ sym ++ "' ") ++ showParamType p |