# Haschoo: Minimalist R5RS Scheme interpreter

[ bsd3, compilers-interpreters, deprecated, program ] [ Propose Tags ]
Deprecated.

Haschoo is a minimalist R5RS interpreter written in Haskell for a university course.

Versions 0.0, 0.1, 0.1.1, 0.1.2 array (==0.4.*), base (==4.*), list-tries (>=0.1 && <0.5), monad-loops (==0.3.*), mtl (>=1.1 && <2.2), numbers (>=2009.5.28 && <3000.1), parsec (>=2.1 && <3.2) [details] BSD-3-Clause Matti Niemenmaa Matti Niemenmaa Compilers/Interpreters http://iki.fi/matti.niemenmaa/misc-projects.html#haschoo by MattiNiemenmaa at Wed May 23 12:21:49 UTC 2012 NixOS:0.1.2 haschoo 2041 total (17 in the last 30 days) (no votes yet) [estimated by rule of succession] λ λ λ Docs not available Successful builds reported Hackage Matrix CI

#### Maintainer's Corner

For package maintainers and hackage trustees

[back to package description]
Haschoo: the Scheme interpreter to be sneezed at
=======

Haschoo is a little R5RS [1] interpreter written in Haskell for a university
course. The name, if it's not obvious, is a portmanteau of "Haskell", "Scheme",
and "achoo", the last of which is meant to signify something along the lines of
it being a sneeze's worth of code and not a particularly serious endeavour.

Usage
-----

Haschoo is quite spartan. It doesn't understand any command line options: if
given no parameters, it becomes a REPL which terminates on end-of-file,
otherwise it runs the file named by each argument as a standalone Scheme
program.

Building
--------

Haschoo is not written in standard Haskell 98, but depends on GHC-only (at the
time of writing) compiler extensions, so you'll need GHC to build it. Get it at
http://www.haskell.org/ghc/; version 6.10.2 was used for testing, but later
6.10 versions should work as well.

Nowadays you can also try the Haskell Platform, intended as a simple installer
to get you started quickly: http://hackage.haskell.org/platform/

If you have the cabal-install tool installed ([2] or the Haskell Platform),

cabal install Haschoo

cabal configure
cabal build
cabal install

If you don't have cabal-install, the following commands, run from Haschoo's root
directory, should also work:

Goal
----

If Haschoo can be said to have had a goal, it is minimalism: it tries to be a
bit of a DeathStation 9000 (see e.g. [3]) for R5RS. Currently it achieves this
in the following ways:

- No non-R5RS procedures are implemented or recognized.
- No extensions are made to existing R5RS procedures.
- Only two optional procedures are implemented: - and / for more than two
arguments.
- Literal lists, strings, and vectors are immutable, as allowed by R5RS 3.4.

The basic idea was that if something works in Haschoo, it should work in any
R5RS system. That's not quite the current situation, but it seems to be mostly
true, at least based on my limited testing.

Known bugs
----------

Due to time and energy constraints I didn't manage to iron out the following:

- Continuations, regretfully, are not implemented at all.

- Nested ellipses in macros don't always work correctly.
(e.g. tests/macros/nested-ellipses.scm)

- The "read" procedure doesn't work very well: due to annoying technical
issues, it works by reading one character at a time and then trying to parse
the string gathered thus far, stopping on a successful parse. Hence reading
"-1" gives "-" followed by "1".

- Quasiquotation has some silly bugs. For example, (1 2 . ,(list 3 4)) results
in '(1 2 unquote (list 3 4)) instead of '(1 2 (list 3 4)).

No doubt there are many other lurking bugs. Time and energy constraints tend to
limit testing as well.

References
----------

[1]: http://schemers.org/Documents/Standards/R5RS/
`