fix module idents coding

This commit is contained in:
Ilya Rezvov
2018-03-20 16:51:58 -07:00
parent 13fecfe74b
commit 4bf66b9295
2 changed files with 10 additions and 10 deletions
+10 -9
View File
@@ -1291,27 +1291,28 @@ type Script = [Command]
type Expression = [Instruction]
data ModuleDef
= RawModDef Module
| TextModDef (Maybe TL.Text) [TL.Text]
| BinaryModDef (Maybe TL.Text) [TL.Text]
= RawModDef (Maybe Ident) Module
| TextModDef (Maybe Ident) [TL.Text]
| BinaryModDef (Maybe Ident) [TL.Text]
deriving (Show, Eq)
data Command
= ModuleDef ModuleDef
| Register TL.Text (Maybe Ident)
| Action
| Assertion
| Meta
deriving (Show, Eq)
data Action
= Invoke (Maybe TL.Text) TL.Text [Expression]
| Get (Maybe TL.Text) TL.Text
= Invoke (Maybe Ident) TL.Text [Expression]
| Get (Maybe Ident) TL.Text
deriving (Show, Eq)
type FailureString = TL.Text
data Assertion
= AssertReturn Action Instruction
= AssertReturn Action [Expression]
| AssertReturnCanonicalNaN Action
| AssertReturnArithmeticNaN Action
| AssertTrap (Either Action ModuleDef) FailureString
@@ -1321,9 +1322,9 @@ data Assertion
deriving (Show, Eq)
data Meta
= Script (Maybe TL.Text) Script
| Input (Maybe TL.Text) TL.Text
| Output (Maybe TL.Text) TL.Text
= Script (Maybe Ident) Script
| Input (Maybe Ident) TL.Text
| Output (Maybe Ident) TL.Text
deriving (Show, Eq)
type Labels = [Maybe Ident]
-1
View File
@@ -60,7 +60,6 @@ main = do
let Right mod = Parser.parseModule <$> Lexer.scanner content
(modInst, store) <- Interpreter.instantiate Interpreter.emptyStore Interpreter.emptyImports mod
(`mapM` ["fac-rec", "fac-rec-named", "fac-iter", "fac-iter-named", "fac-opt"]) $ \fn -> do
-- (`mapM` ["fac-iter-named"]) $ \fn -> do
let fac = \n -> Interpreter.invokeExport store modInst fn [Interpreter.VI64 n]
fac3 <- fac 3
fac5 <- fac 5