1
1
mirror of https://github.com/kanaka/mal.git synced 2024-08-18 02:00:40 +03:00
mal/impls/picolisp/types.l
Joel Martin 8a19f60386 Move implementations into impls/ dir
- Reorder README to have implementation list after "learning tool"
  bullet.

- This also moves tests/ and libs/ into impls. It would be preferrable
  to have these directories at the top level.  However, this causes
  difficulties with the wasm implementations which need pre-open
  directories and have trouble with paths starting with "../../". So
  in lieu of that, symlink those directories to the top-level.

- Move the run_argv_test.sh script into the tests directory for
  general hygiene.
2020-02-10 23:50:16 -06:00

102 lines
1.6 KiB
Plaintext

(class +MAL)
# type value meta
(dm T (Type Value Meta)
(=: type Type)
(=: value Value)
(=: meta Meta) )
(de MAL-type (MAL)
(get MAL 'type) )
(de MAL-value (MAL)
(get MAL 'value) )
(de MAL-meta (MAL)
(get MAL 'meta) )
(class +MALTrue +MAL)
(dm T ()
(super 'true 'true NIL) )
(class +MALFalse +MAL)
(dm T ()
(super 'false 'false NIL) )
(class +MALNil +MAL)
(dm T ()
(super 'nil 'nil NIL) )
(def '*MAL-true (new '(+MALTrue)))
(def '*MAL-false (new '(+MALFalse)))
(def '*MAL-nil (new '(+MALNil)))
(class +MALNumber +MAL)
(dm T (Number)
(super 'number Number NIL) )
(de MAL-number (N)
(new '(+MALNumber) N) )
(class +MALString +MAL)
(dm T (String)
(super 'string String NIL) )
(de MAL-string (N)
(new '(+MALString) N) )
(class +MALSymbol +MAL)
(dm T (String)
(super 'symbol String NIL) )
(de MAL-symbol (N)
(new '(+MALSymbol) N) )
(class +MALKeyword +MAL)
(dm T (String)
(super 'keyword String NIL) )
(de MAL-keyword (N)
(new '(+MALKeyword) N) )
(class +MALList +MAL)
(dm T (Values)
(super 'list Values NIL) )
(de MAL-list (N)
(new '(+MALList) N) )
(class +MALVector +MAL)
(dm T (Values)
(super 'vector Values NIL) )
(de MAL-vector (N)
(new '(+MALVector) N) )
(class +MALMap +MAL)
(dm T (Values)
(super 'map Values NIL) )
(de MAL-map (N)
(new '(+MALMap) N) )
(class +MALAtom +MAL)
(dm T (Value)
(super 'atom Value NIL) )
(de MAL-atom (N)
(new '(+MALAtom) N) )
(class +MALFn +MAL)
(dm T (Fn)
(super 'fn Fn NIL) )
(de MAL-fn (Fn)
(new '(+MALFn) Fn) )
(class +MALError +MAL)
(dm T (Value)
(super 'error Value NIL) )
(de MAL-error (Value)
(new '(+MALError) Value) )