stare#
gleam add stare@1
import stare
pub fn main() {
// import gleam/io
//
// pub fn main() -> Nil {
// io.println("Hello World!")
//}
echo stare.module(
imports: [
stare.import_(
module: ["gleam", "io"],
types: [],
constructors: [],
functions: [],
alias: None,
),
],
functions: [
stare.function(
name: "main",
public: True,
parameters: [],
return_type: Some(stare.nil_type),
statements: [
stare.call_function(
module: Some("io"),
name: "println",
arguments: [stare.string("Hello World!")],
),
],
),
],
)
|> stare.generate
|> stare.format
}
Further documentation can be found at https://hexdocs.pm/stare.
Development#
gleam run -m birdie # Run birdie
gleam test # Run the tests
Nix#
nix run .#birdie # Run birdie
nix run .#test # Run the tests