This would be useful for genetic programming, which usually use a Lisp subset as representation for programs.
I've found something called Liskell (Lisp syntax, Haskell inside) on the web, but the links are broken and I can't find the paper on it...
They're both functional programming languages and Lisp influenced Haskell, but Haskell is not a Lisp derivative.
An s-expression, also known as a sexpr or sexp, is a way to represent a nested list of data. It stands for "symbolic expression," and it is commonly encountered in the Lisp programming language and variants of Lisp such as Scheme, Racket, and Clojure.
The syntactic elements of the Lisp programming language are symbolic expressions, also known as s-expressions. Both programs and data are represented as s-expressions: an s-expression may be either an atom or a list. Lisp atoms are the basic syntactic units of the language and include both numbers and symbols.
Check out Lisk, which was designed to fix the author's gripes with Liskell.
In my spare time I’m working on a project called Lisk. Using the -pgmF option for GHC, you can provide GHC a program name that is called to preprocess the file before GHC compiles it. It also works in GHCi and imports. You use it like this:
{-# OPTIONS -F -pgmF lisk #-} (module fibs (import system.environment) (:: main (io ())) (= 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)))))
The source is here.
Also, if you don't actually care about Haskell and just want some of its features, you might want to check out Qi (or its successor, Shen), which has s-expression syntax with many modern functional-programming features similar to Haskell.
You might be interested in a project I have been working on, husk scheme.
Basically it will let you call into Scheme code (S-expressions) from Haskell, and vice-versa. So you can intermingle that code within your program, and then process the s-expressions as native Haskell data types when you want to do something on the Haskell side.
Anyway, it may be useful to you, or not - have a look and decide for yourself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With