1
1
mirror of https://github.com/kanaka/mal.git synced 2024-09-11 21:57:38 +03:00
mal/impls/picolisp/types.l

102 lines
1.6 KiB
Plaintext
Raw Normal View History

2016-10-02 16:55:19 +03:00
(class +MAL)
# type value meta
(dm T (Type Value Meta)
(=: type Type)
(=: value Value)
(=: meta Meta) )
2016-10-02 20:41:49 +03:00
(de MAL-type (MAL)
(get MAL 'type) )
(de MAL-value (MAL)
(get MAL 'value) )
(de MAL-meta (MAL)
(get MAL 'meta) )
2016-10-02 16:55:19 +03:00
(class +MALTrue +MAL)
(dm T ()
2016-10-04 23:10:55 +03:00
(super 'true 'true NIL) )
2016-10-02 16:55:19 +03:00
(class +MALFalse +MAL)
(dm T ()
2016-10-04 23:10:55 +03:00
(super 'false 'false NIL) )
2016-10-02 16:55:19 +03:00
(class +MALNil +MAL)
(dm T ()
2016-10-04 23:10:55 +03:00
(super 'nil 'nil NIL) )
2016-10-02 16:55:19 +03:00
(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) )
2016-10-02 20:41:49 +03:00
(de MAL-number (N)
(new '(+MALNumber) N) )
2016-10-02 16:55:19 +03:00
(class +MALString +MAL)
(dm T (String)
(super 'string String NIL) )
2016-10-02 20:41:49 +03:00
(de MAL-string (N)
(new '(+MALString) N) )
2016-10-02 16:55:19 +03:00
(class +MALSymbol +MAL)
(dm T (String)
(super 'symbol String NIL) )
2016-10-02 20:41:49 +03:00
(de MAL-symbol (N)
(new '(+MALSymbol) N) )
2016-10-02 16:55:19 +03:00
(class +MALKeyword +MAL)
(dm T (String)
(super 'keyword String NIL) )
2016-10-02 20:41:49 +03:00
(de MAL-keyword (N)
(new '(+MALKeyword) N) )
2016-10-02 16:55:19 +03:00
(class +MALList +MAL)
(dm T (Values)
(super 'list Values NIL) )
2016-10-02 20:41:49 +03:00
(de MAL-list (N)
(new '(+MALList) N) )
2016-10-02 16:55:19 +03:00
(class +MALVector +MAL)
(dm T (Values)
(super 'vector Values NIL) )
2016-10-02 20:41:49 +03:00
(de MAL-vector (N)
(new '(+MALVector) N) )
2016-10-02 16:55:19 +03:00
(class +MALMap +MAL)
(dm T (Values)
(super 'map Values NIL) )
2016-10-02 20:41:49 +03:00
(de MAL-map (N)
(new '(+MALMap) N) )
2016-10-02 16:55:19 +03:00
(class +MALAtom +MAL)
(dm T (Value)
(super 'atom Value NIL) )
2016-10-02 20:41:49 +03:00
(de MAL-atom (N)
(new '(+MALAtom) N) )
2016-10-04 23:10:55 +03:00
(class +MALFn +MAL)
(dm T (Fn)
(super 'fn Fn NIL) )
(de MAL-fn (Fn)
(new '(+MALFn) Fn) )
2016-10-02 16:55:19 +03:00
(class +MALError +MAL)
(dm T (Value)
(super 'error Value NIL) )
2016-10-02 20:41:49 +03:00
(de MAL-error (Value)
(new '(+MALError) Value) )