Skip to content

Instantly share code, notes, and snippets.


Chris Lavoie christianlavoie

View GitHub Profile
View Main.mjs
import * as rts from "./_build/rts.mjs";
import module from "./_build/Main.wasm.mjs";
import req from "./_build/Main.req.mjs";
module.then(m =>
rts.newAsteriusInstance(Object.assign(req, {module: m})))
.then(i => {
.catch(err => {
if (!(err.startsWith('ExitSuccess') || err.startsWith('ExitFailure ')))
View Main.hs
{-# LANGUAGE ScopedTypeVariables #-}
module Main (runParser, main) where
import Asterius.Text
import Asterius.Types
import Control.Concurrent (threadDelay)
import Data.Text (Text)
import Data.Void (Void)