Difference between revisions of "Haskell Lisp"

From HaskellWiki
Jump to navigation Jump to search
(→‎Haskells in Lisp: Added notes about Yale Haskell)
(→‎A Haskell-Lisp Toolbox: Added interpreter section)
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Haskell Lisp =
+
= Background =
 
Lispers who love Haskell can be heard saying that Haskell is Lisp's missing [http://en.wikipedia.org/wiki/M-expression M-Expression] implementation. Though that statement embodies a great deal of poetic license (and perhaps romanticism), there is a very natural fit between the two.
   
 
In practical terms, there are three areas of intersection between Haskell and Lisp:
Lispers who love Haskell can be heard saying that Haskell is Lisp's missing [http://en.wikipedia.org/wiki/M-expression M-Expression] implementation. Though that statement embodies a great deal of poetic license (an perhaps romanticism), there is a very natural fit between the two.
 
 
In practical terms, there are two areas of intersection between Haskell and Lisp:
 
 
# Haskell implementations written in Lisp (there seems to be only one of these), and
 
# Haskell implementations written in Lisp (there seems to be only one of these), and
 
# Lisps written in Haskell (much more common)
 
# Lisps written in Haskell (much more common)
  +
# Haskell with Lisp Syntax (Lisp-flavoured Haskells)
   
 
There is a [https://github.com/haskell-lisp github organization] which tracks these projects, though more detail is given below.
 
There is a [https://github.com/haskell-lisp github organization] which tracks these projects, though more detail is given below.
Line 11: Line 11:
 
Also, there is a [https://twitter.com/HaskellLisp twitter account] dedicated to all things Haskell+Lisp.
 
Also, there is a [https://twitter.com/HaskellLisp twitter account] dedicated to all things Haskell+Lisp.
   
== Haskells in Lisp ==
+
= Haskells in Lisp =
  +
* [https://github.com/haskell-lisp/yale-haskell Yale Haskell] - written between 1991 and 1993; was built from sources using CMU Common Lisp, Lucid Common Lisp, Allegro Common Lisp, or Harlequin LispWorks
+
* [https://github.com/haskell-lisp/yale-haskell Yale Haskell] - written between 1991 and 1993; was built from sources using CMU Common Lisp, Lucid Common Lisp, Allegro Common Lisp, Harlequin LispWorks, Kyoto Common Lisp. The last did suffer from performance problems, though. Compiled binaries were available for Sparc systems running SunOS 4.1.2 and Sparc 10's (sun4m) running 4.1.3. In the last release, the full functionality of X windows was made available at the Haskell level.
  +
 
= Lisps in Haskell =
  +
  +
The following Lisps are not wrappers around Haskell, but rather their own languages. Some may offer interop with FFI calls.
  +
  +
* [https://github.com/haskell-lisp/husk-scheme Husk Scheme] - Implements a superset of the R5RS standard and a large portion of the R7RS-small language. Advanced features are provided including continuations, hygienic macros, libraries, and a full numeric tower. Actively maintained.
  +
* [https://www.egison.org/ Egison] - Written in Haskell, Egison is a Lisp that realizes non-linear pattern-matching against non-free data types, directly representing pattern-matching against a wide range of data types such as lists, multisets, sets, trees and graphs.
  +
* [https://github.com/mthom/shentong Shentong] - The [http://www.shenlanguage.org/ Shen programming language] is a Lisp that offers pattern matching, lambda calculus consistency, macros, optional lazy evaluation, static type checking, one of the most powerful systems for typing in functional programming, portability over many languages, an integrated fully functional Prolog, and an inbuilt compiler-compiler. Shentong is an implementation of Shen written in Haskell.
  +
* [https://github.com/haskell-lisp/leesp Leesp] - Like Husk, this was written as part of the popular Scheme/Haskell tutorial. Actively maintained.
  +
* [https://github.com/haskell-lisp/blaise Blaise] - Slava Akhmechet's Lisp from 2006, updated by community members to run on the lastest version of GHC. The original author likely disavows any interest :-)
  +
  +
= Haskell with Lisp Syntax =
  +
  +
* [https://github.com/haskell-lisp/liskell Liskell] - From the ILC 2007 paper: "Liskell uses an extremely minimalistic parse tree and shifts syntactic classification of parse tree parts to a later compiler stage to give parse tree transformers the opportunity to rewrite the parse trees being compiled. These transformers can be user supplied and loaded dynamically into the compiler to extend the language." Has not received attention for a while, though the author has stated that he continues to think about it and has future plans for it.
  +
* [https://github.com/haskell-lisp/historic-lisk Lisk] - Inspired by Liskell, but with the intent of making different design choices. Uses the [http://hackage.haskell.org/package/haskell-src-exts haskell-src-exts] AST and pretty printer to convert Lisk code to Haskell. 100% abandoned; interested parties are actively (and nicely!) discouraged by the original author. The name is being bandied about for a potential new Haskell+Lisp effort (blessed by the original author).
  +
  +
= A Haskell-Lisp Toolbox =
   
  +
* AST-Related
== Lisps in Haskell ==
 
  +
** [[Template Haskell]]
* TBD
 
  +
** [https://hackage.haskell.org/package/haskell-src-exts haskell-src-exts]
  +
* [[Applications and libraries/Compiler tools]]
  +
** [[GHC API]]
  +
** [https://github.com/mvdan/hint hint] (Runtime Haskell Interpreter)
  +
** [https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/HscMain HscMain (commentary)]
  +
* Interpreters
  +
** [http://okmij.org/ftp/Computation/free-monad.html Free and Freer Monads: Putting Monads Back into Closet]
  +
** [http://dlaing.org/cofun/posts/free_and_cofree.html Free for DSLs, cofree for interpreters]
  +
** [https://wiki.haskell.org/wikiupload/c/c6/ICMI45-paper-en.pdf How to Build a Monadic Interpreter in One Day]
  +
* S-Expressions
  +
** [https://github.com/aisamanra/s-cargot s-cargot]
  +
** [https://hackage.haskell.org/package/atto-lisp atto-lisp]
  +
** [http://oubiwann.blogspot.com/2014/01/prefix-operators-in-haskell.html Prefix operators in Haskell]

Revision as of 23:50, 13 July 2016

Background

Lispers who love Haskell can be heard saying that Haskell is Lisp's missing M-Expression implementation. Though that statement embodies a great deal of poetic license (and perhaps romanticism), there is a very natural fit between the two.

In practical terms, there are three areas of intersection between Haskell and Lisp:

  1. Haskell implementations written in Lisp (there seems to be only one of these), and
  2. Lisps written in Haskell (much more common)
  3. Haskell with Lisp Syntax (Lisp-flavoured Haskells)

There is a github organization which tracks these projects, though more detail is given below.

Also, there is a twitter account dedicated to all things Haskell+Lisp.

Haskells in Lisp

  • Yale Haskell - written between 1991 and 1993; was built from sources using CMU Common Lisp, Lucid Common Lisp, Allegro Common Lisp, Harlequin LispWorks, Kyoto Common Lisp. The last did suffer from performance problems, though. Compiled binaries were available for Sparc systems running SunOS 4.1.2 and Sparc 10's (sun4m) running 4.1.3. In the last release, the full functionality of X windows was made available at the Haskell level.

Lisps in Haskell

The following Lisps are not wrappers around Haskell, but rather their own languages. Some may offer interop with FFI calls.

  • Husk Scheme - Implements a superset of the R5RS standard and a large portion of the R7RS-small language. Advanced features are provided including continuations, hygienic macros, libraries, and a full numeric tower. Actively maintained.
  • Egison - Written in Haskell, Egison is a Lisp that realizes non-linear pattern-matching against non-free data types, directly representing pattern-matching against a wide range of data types such as lists, multisets, sets, trees and graphs.
  • Shentong - The Shen programming language is a Lisp that offers pattern matching, lambda calculus consistency, macros, optional lazy evaluation, static type checking, one of the most powerful systems for typing in functional programming, portability over many languages, an integrated fully functional Prolog, and an inbuilt compiler-compiler. Shentong is an implementation of Shen written in Haskell.
  • Leesp - Like Husk, this was written as part of the popular Scheme/Haskell tutorial. Actively maintained.
  • Blaise - Slava Akhmechet's Lisp from 2006, updated by community members to run on the lastest version of GHC. The original author likely disavows any interest :-)

Haskell with Lisp Syntax

  • Liskell - From the ILC 2007 paper: "Liskell uses an extremely minimalistic parse tree and shifts syntactic classification of parse tree parts to a later compiler stage to give parse tree transformers the opportunity to rewrite the parse trees being compiled. These transformers can be user supplied and loaded dynamically into the compiler to extend the language." Has not received attention for a while, though the author has stated that he continues to think about it and has future plans for it.
  • Lisk - Inspired by Liskell, but with the intent of making different design choices. Uses the haskell-src-exts AST and pretty printer to convert Lisk code to Haskell. 100% abandoned; interested parties are actively (and nicely!) discouraged by the original author. The name is being bandied about for a potential new Haskell+Lisp effort (blessed by the original author).

A Haskell-Lisp Toolbox