Skip to content

S-expression-based syntax alternative for Haskell.

License

Notifications You must be signed in to change notification settings

chrisdone-archive/lisk

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lisk

S-expression-based syntax alternative for Haskell.

This software is incomplete. Don't try to use it.

Latest working example:

{-# OPTIONS -F -pgmF lisk #-}

(module demo
  "A demo program!")

  (import data.char system.io (data.map :as map))

  (:: main ('io ()))
  (= main
    (do
      (<- line get-line)
      (let (= the-line line)
        (= some-map map.empty))
      (case :do get-line
        ("" (put-str-ln "* * Empty!"))
        (x (put-str-ln x)))
      (foo the-line)
      (return ())))

  (= demo
    (do
      (<- line get-line)
        (case :of line
          ("apples" (return "yum"))
          (anything (return "...")))))

  (:: foo (-> 'string ('io ())))
  (= foo x (put-str-ln (show (fib (read x)))))

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

  (= fib2
     (case
       (0 0)
       (1 1)
       (n (+ (fib (- n 1))
             (fib (- n 2))))))

  (:: from-just (-> ('maybe a) a a))
  (= from-just (('just a) b) a)
  (= from-just ('nothing b) b)
```

About

S-expression-based syntax alternative for Haskell.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Haskell 100.0%