|Maintainer:||robdockins AT fastmail DOT fm|
|Current Release Date:||September 21, 2009|
|Hackage||Shellac Shellac-readline Shellac-editline Shellac-compatline Shellac-haskeline|
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.
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.
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.
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.