Shellac

A library for creating read-eval-print shells

Maintainer: robdockins AT fastmail DOT fm
Current Version: 0.9.5.2
Current Release Date: June 1, 2014
Homepage: http://rwd.rdockins.name/shellac/home/
Darcs repos: http://hub.darcs.net/rdockins/shellac/
http://hub.darcs.net/rdockins/shellac-readline/
http://hub.darcs.net/rdockins/shellac-editline/
http://hub.darcs.net/rdockins/shellac-compatline/
Hackage Shellac Shellac-readline Shellac-editline Shellac-compatline Shellac-haskeline

About Shellac

Shellac is a framework for building read-eval-print style shells. Shells are created by declaratively defining a set of shell commands and an evaluation function. Shellac supports multiple shell backends, including a 'basic' backend which uses only Haskell IO primitives and a full featured 'readline' backend based on the the Haskell readline bindings found in the standard libraries.

This library attempts to allow users to write shells in a declarative way and still enjoy the advanced features that may be available from a powerful line editing package like readline.

Documentation

Currently, the API documentation is the only formal documentation that exists for Shellac. It can be viewed from the Hackage main page or built locally from the source tarball.

To see examples of using Shellac, you can check out the lambda shell, which I wrote partially as a way to exercise most of Shellac's features. For a more mimimal example, check out Andy Gimblett's blog, where he shows how to build a simple shell using Shellac in about 130 (commented!) lines of code.

License

Shellac is available under a BSD3 license. See the LICENSE file for details.

Be aware, however, that the GNU readline library itself is licensed under the GPL. If you wish to use the readline bindings, your project will need to be GPL compatible. Also note that the "compatline" backend may be compiled against readline depending on the configuration of the target machine. Your project should be GPL compatible if you use the compatline backend!

Go to the readline home page for more information about the readline library.

About portability

Currently, Shellac is GHC only. The 0.5 release made significant efforts toward portability by eliminating dependencies on the GHC specific features GADTs and STM. However, it still requires existential types, multi-parameter type classes, functional dependencies, preemptive concurrency support and the FFI. Currently no Haskell implementation other than GHC supports all these features.