git.iko.soy/rowtype-yoga/purs-eval
on main help sign in
20 lines 711 B history raw
1# purs-eval
2A simple PureScript expression evaluation tool. It uses [try.purescript.org](https://try.purescript.org) as a compilation backend; for this reason, it currently does not support embedding local files or modules.
4## Usage
6```bash
7EXAMPLE="module Main where\nimport Effect.Console (log)\nmain = log \"hello from PS\""
9# With npm
10echo -e $EXAMPLE | npx purs-eval
12# With nix
13echo -e $EXAMPLE | nix run github:rowtype-yoga/purs-eval
15# Pipe node (>v18)
16echo -e $EXAMPLE | nix run github:rowtype-yoga/purs-eval | nix run nixpkgs#nodejs -- --experimental-network-imports --input-type module
18# or with npx
19echo -e $EXAMPLE | npx purs-eval | node --experimental-network-imports --input-type module
20```