Program Haskell with Lisp Syntax Using Liskell or Lisk

Do you code in Haskell, but dream of being able to use Lisp instead? If so, you may be in luck. There are no less than two projects dedicated to bringing Lisp’s syntax to Haskell: Liskell and Lisk. Although Liskell’s creator, Clemens Fruhwirth, claimed that the project isn’t dead yet, updates have been slow. Lisk is a work in progress by Chris Done that aims to fix Done’s gripes with Liskell.

Here’s an example of Lisk code:

{-# OPTIONS -F -pgmF lisk #-}
(module :fibs
(import :system.environment)

(:: main (:i-o ()))

(= main (>>= get-args (. print fib read head)))

(:: test (-> :string (, :int :string)))

(= test (, 1))

(:: fib (-> :int :int))

(= fib 0 0)

(= fib 1 1)

(= fib n (+ (fib (- n 1))

(fib (- n 2)))))

However, nothing more is supported than what’s seen in the example above.

The issues with Liskell that Lisk aims to solve are:

  • You have to write (* a (* b c)). My solution above deals with that.
  • You have to write (Maybe a). My solution above deals with that.
  • You have to have a special patched version of a certain version GHC to run it. No one is going to want to install it and it’s going to be hard to maintain that.

If you can live with those issues, then Liskell may be right for you. Otherwise, you can check out Lisk’s progress at its Github repository.

Facebook Comments