MIT licensed by Jared Tobin
Maintained by [email protected]
This version can be pinned in stack with:hnock-0.4.0@sha256:4ebad7c746401c99930044a5ff306b516acf66004895816e125276795e5429ab,1853

Module documentation for 0.4.0

Depends on 4 packages(full list with versions):
Used by 1 package in lts-15.3(full list with versions):

hnock

Build Status MIT License

A Nock interpreter.

Install

Use a simple

stack install

to build the hnock binary and get it moved somewhere on your PATH. If you just want to build the binary, you can use stack build.

Usage

From bash, simply pipe Nock expressions into the hnock executable:

$ echo '*[[[4 5] [6 14 15]] [0 7]]' | hnock
[14 15]

For playing around in GHCi, import the Nock library and use hnock to parse and evaluate Nock expressions:

*Nock> hnock "*[[[4 5] [6 14 15]] [0 7]]"
[14 15]

To evaluate raw nock Nouns, i.e. to compute nock(a) for some noun a, use the nock function:

*Nock> let expression = hnock "[[[4 5] [6 14 15]] [0 7]]"
*Nock> expression
[[[4 5] [6 [14 15]]] [0 7]]
*Nock> nock expression
[14 15]

Testing

Use a simple stack test to run the test suite.

See Also