mirror of
https://github.com/rowtype-yoga/psfp.git
synced 2024-09-11 16:25:36 +03:00
Add playground
This commit is contained in:
parent
f8046d6e24
commit
97117af528
@ -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`")
|
||||
}
|
||||
|
@ -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
|
@ -2,5 +2,5 @@ module Main where
|
||||
|
||||
import Grimoire
|
||||
|
||||
incantation :: Effect Unit
|
||||
incantation = cast "Abracadabra"
|
||||
main :: Effect Unit
|
||||
main = log "Abracadabra"
|
||||
|
Loading…
Reference in New Issue
Block a user