29 lines
459 B
Haskell
29 lines
459 B
Haskell
{- HLINT ignore "Use newtype instead of data" -}
|
|
module Gyehoek.Wasm
|
|
()
|
|
where
|
|
|
|
import Data.List (List)
|
|
import GHC.Generics (Generic)
|
|
|
|
|
|
data Module = MkModule
|
|
{ typeSection :: List Type
|
|
}
|
|
deriving (Show, Generic)
|
|
|
|
data Type
|
|
deriving (Show, Generic)
|
|
|
|
data Function = MkFunction
|
|
{ params :: List Type
|
|
, result :: List Type
|
|
, locals :: List Type
|
|
, body :: Expr
|
|
}
|
|
deriving (Show, Generic)
|
|
|
|
type Expr = List Instr
|
|
|
|
type Instr = ByteString
|