husk-scheme: R5RS Scheme interpreter, compiler, and library.

[ compilers-interpreters, language, library, mit, program ] [ Propose Tags ] [ Report a vulnerability ]

A dialect of R5RS Scheme written in Haskell. Advanced features are provided including:

  • First-class continuations of unlimited extent

  • Hygienic macros based on syntax-rules

  • Low-level explicit renaming macros

  • A foreign function interface (FFI) to Haskell

  • Full numeric tower providing support for real, rational, and complex numbers

  • Proper tail recursion and lexical scoping

  • Read-Eval-Print-Loop (REPL) interpreter, with input driven by Haskeline to provide a rich user experience

  • Standard library of Scheme functions, and support for many popular SRFI's

Husk may be used as either a stand-alone interpreter or as an extension language within a larger Haskell application. By closely following the R5RS standard, the intent is to develop a Scheme that is as compatible as possible with other R5RS Schemes. Husk is mature enough for use in production applications, however it is not optimized for performance-critical applications.

Scheme is one of two main dialects of Lisp. Scheme follows a minimalist design philosophy: the core language consists of a small number of fundamental forms which may be used to implement other built-in forms. Scheme is an excellent language for writing small, elegant programs, and may also be used to write scripts or embed scripting functionality within a larger application.


[Skip to Readme]

Flags

Automatic Flags
NameDescriptionDefault
useffi

Haskell Foreign Function Interface (FFI). Allows husk to import and call into Haskell code directly from Scheme code. Turn off FFI to decrease build times and minimize executable sizes

Disabled
uselibraries

R7RS-style libraries.

Enabled
useptrs

Turn off pointers to increase performance at the expense of severely restricting the functionality of mutable variables. Setting this flag to false will revert back to the behavior from previous versions of husk.

Enabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 1.0, 1.1, 1.2, 1.3, 2.0, 2.1, 2.2, 2.3, 2.4, 3.0, 3.1, 3.2, 3.2.1, 3.3, 3.4, 3.4.1, 3.4.2, 3.4.3, 3.4.4, 3.5.1, 3.5.2, 3.5.2.1, 3.5.2.2, 3.5.2.3, 3.5.3, 3.5.3.1, 3.5.3.2, 3.5.4, 3.5.5, 3.5.6, 3.5.7, 3.6, 3.6.1, 3.6.2, 3.6.3, 3.7, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, 3.14, 3.15, 3.15.1, 3.15.2, 3.16, 3.16.1, 3.17, 3.17.1, 3.18, 3.19, 3.19.1, 3.19.2, 3.19.3, 3.20
Change log ChangeLog.markdown
Dependencies array, base (>=2.0 && <5), bytestring, containers, directory, filepath, ghc, ghc-paths, haskeline, husk-scheme, mtl, parsec, process, transformers, utf8-string [details]
Tested with ghc ==7.2.2, ghc ==7.0.2, ghc ==6.12.3, ghc ==6.10.4
License MIT
Author Justin Ethier
Maintainer Justin Ethier <github.com/justinethier>
Category Compilers/Interpreters, Language
Home page http://justinethier.github.com/husk-scheme
Bug tracker http://github.com/justinethier/husk-scheme/issues
Source repo head: git clone git://github.com/justinethier/husk-scheme.git
Uploaded by JustinEthier at 2013-03-20T01:52:13Z
Distributions
Reverse Dependencies 3 direct, 0 indirect [details]
Executables huskc, huski
Downloads 39170 total (202 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for husk-scheme-3.8

[back to package description]

husk-scheme

husk is a dialect of Scheme written in Haskell that adheres to the R5RS standard. Advanced R5RS features are provided including continuations, hygienic macros, and a full numeric tower.

husk may be used as either a stand-alone interpreter or as an extension language within a larger Haskell application. By closely following the R5RS standard, the intent is to develop a Scheme that is as compatible as possible with other R5RS Schemes. husk is mature enough for use in production applications, however it is not optimized for performance-critical applications.

Scheme is one of two main dialects of Lisp. Scheme follows a minimalist design philosophy: the core language consists of a small number of fundamental forms which may be used to implement other built-in forms. Scheme is an excellent language for writing small, elegant programs, and may also be used to write scripts or embed scripting functionality within a larger application.

Installation

The Glasgow Haskell Compiler (GHC) is required to build, install, and run husk. All recent versions of GHC are supported, including 7.0, 7.2, 7.4, and 7.6. The easiest way to get GHC is via the Haskell Platform.

husk may be installed using cabal:

cabal update
cabal install husk-scheme

Before running husk you may also need to add the cabal executable directory to your path. On Linux this is ~/.cabal/bin. Now you are ready to start up the interpreter:

justin@my-pc$ huski
  _               _        __                 _                          
 | |             | |       \\\               | |                         
 | |__  _   _ ___| | __     \\\      ___  ___| |__   ___ _ __ ___   ___  
 | '_ \| | | / __| |/ /    //\\\    / __|/ __| '_ \ / _ \ '_ ` _ \ / _ \ 
 | | | | |_| \__ \   <    /// \\\   \__ \ (__| | | |  __/ | | | | |  __/ 
 |_| |_|\__,_|___/_|\_\  ///   \\\  |___/\___|_| |_|\___|_| |_| |_|\___| 
                                                                         
 http://justinethier.github.com/husk-scheme                              
 (c) 2010-2012 Justin Ethier                                             
 Version 3.6.2 
                                                                         
huski> (define (hello) 'world)
(lambda () ...)
huski> (hello)
world
huski>

husk has been tested on Windows, Linux, and FreeBSD.

More information is available on the husk website.

License

Copyright (C) 2010 Justin Ethier

husk scheme is available under the MIT license.

The interpreter is based on code from the book Write Yourself a Scheme in 48 Hours written by Jonathan Tang and hosted / maintained by Wikibooks.