Add playground

This commit is contained in:
Mark Eibes 2020-08-09 19:09:45 +02:00
parent f8046d6e24
commit 97117af528
No known key found for this signature in database
GPG Key ID: F2339296A7CD5027
3 changed files with 12 additions and 9 deletions

View File

@ -1 +1,9 @@
require ("./output/Main").incantation()
const main = require ("./output/Main")
if(main.main == undefined) {
console.error("You are missing a 'main' function")
} else if (main.main instanceof Function) {
main.main()
}
else {
console.error("Make sure that you're main function is of type `Effect Unit`")
}

View File

@ -89,6 +89,7 @@ module Grimoire
, module Type.Proxy
, module Unsafe.Coerce
, module Simple.JSON
, module Effect.Console
) where
import Effect.Console (log, logShow)
@ -1072,9 +1073,3 @@ import Type.Proxy
import Unsafe.Coerce
( unsafeCoerce
)
cast :: String -> Effect Unit
cast = log
summon :: forall a. Show a => a -> Effect Unit
summon = logShow

View File

@ -2,5 +2,5 @@ module Main where
import Grimoire
incantation :: Effect Unit
incantation = cast "Abracadabra"
main :: Effect Unit
main = log "Abracadabra"