forked from tismith/tlisp
-
Notifications
You must be signed in to change notification settings - Fork 0
My take on write-yourself-a-scheme in 48 hours
License
haskell-lisp/tlisp
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
My take on write-yourself-a-scheme-in-48-hours from http://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_Hours ======= To build, use cabal: $ cabal sandbox init $ cabal install --only-dependencies --enable-tests $ cabal configure --enable-tests $ cabal build ====== To run: $ cabal run tlisp>>> (load "stdlib.scm") (lambda ("pred" . lst) ...) tlisp>>> (map (curry + 2) ’(1 2 3 4)) (3 4 5 6) ======= Interesting features, beyond those in write-yourself-a-scheme: *: uses ContT to implement call-with-current-continuation *: native support for integers, rationals, floating point and complex numbers *: arithmetic operations perform type promotion between the numerical types *: uses haskeline for command history and tab-completion in the repl *: has doctest tests for the parser *: models the environment using StateT [IORef (Data.Map String LispVal)] ======= To do: *: support immutable and mutable lisp values *: add more tests, especially for the primitives *: add eval support for quasiquotes and unquotes *: add macros *: integrate test.scm into the tests (currently you just run it and look for #t as the output) ======= To run the tests: $ cabal test Building tlisp-0.1.0.0... Preprocessing executable 'tlisp' for tlisp-0.1.0.0... Preprocessing test suite 'doctests' for tlisp-0.1.0.0... Running 1 test suites... Test suite doctests: RUNNING... Test suite doctests: PASS Test suite logged to: dist/test/tlisp-0.1.0.0-doctests.log 1 of 1 test suites (1 of 1 test cases) passed.
About
My take on write-yourself-a-scheme in 48 hours
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- Haskell 94.9%
- Scheme 5.1%