Skip to content

Commit

Permalink
🚧 Project structure idea
Browse files Browse the repository at this point in the history
  • Loading branch information
MystPi committed Apr 27, 2024
1 parent e432da4 commit febad89
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 0 deletions.
Empty file added examples/blah/build/Blah.mjs
Empty file.
Empty file.
Empty file.
1 change: 1 addition & 0 deletions examples/blah/spark.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "Blah"
6 changes: 6 additions & 0 deletions examples/blah/src/Blah.spark
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import Spark/IO

def pub main =
\_ <- IO.println("Hello, world!") |> IO.then
\_ <- IO.println("This is the Blah module") |> IO.then
IO.println("Bye!")
13 changes: 13 additions & 0 deletions src/templates/Spark/IO.spark
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
def pub println\text =
\ <- action
external "
console.log(text);
return $.nil;
"

def pub then\@IO { perform }, f =
\ <- action
f(perform()).perform()

def action\perform =
@IO { perform }

0 comments on commit febad89

Please sign in to comment.