Carp/core/Interfaces.carp

72 lines
2.0 KiB
Plaintext
Raw Normal View History

;; The 'copy' and 'str' interfaces are defined internally:
;;(definterface copy (λ [&a] a))
;;(definterface str (λ [a] String))
2017-11-21 18:56:39 +03:00
(definterface = (λ [a a] Bool))
2017-11-24 19:17:49 +03:00
(definterface add-ref (λ [&a &a] a))
(definterface sub-ref (λ [&a &a] a))
(definterface mul-ref (λ [&a &a] a))
(definterface div-ref (λ [&a &a] a))
(definterface + (λ [a a] a))
(definterface - (λ [a a] a))
(definterface * (λ [a a] a))
(definterface / (λ [a a] a))
2017-12-28 19:46:47 +03:00
(definterface mod (λ [a a] a))
2017-11-27 23:55:52 +03:00
2020-07-08 22:11:13 +03:00
(definterface bit-and (λ [a a] a))
(definterface bit-or (λ [a a] a))
(definterface bit-xor (λ [a a] a))
(definterface bit-not (λ [a] a))
(definterface bit-shift-left (λ [a a] a))
(definterface bit-shift-right (λ [a a] a))
(definterface < (λ [a a] Bool))
(definterface > (λ [a a] Bool))
(definterface zero (λ [] a))
(definterface inc (λ [a] a))
(definterface dec (λ [a] a))
(definterface neg (λ [a] a))
(definterface to-int (λ [a] Int))
(definterface from-int (λ [Int] a))
(definterface format (λ [&String a] String))
(definterface from-string (λ [&String] a))
(definterface random (Fn [] a))
(definterface random-between (Fn [a a] a))
2017-12-15 00:48:19 +03:00
(definterface pi a)
2017-12-13 01:13:05 +03:00
(definterface abs (λ [a] a))
(definterface acos (λ [a] a))
(definterface asin (λ [a] a))
(definterface atan (λ [a] a))
(definterface atan2 (λ [a a] a))
(definterface ceil (λ [a] a))
(definterface cos (λ [a] a))
(definterface cosh (λ [a] a))
(definterface exp (λ [a] a))
(definterface floor (λ [a] a))
(definterface frexp (λ [a (Ref Int)] a))
(definterface ldexp (λ [a Int] a))
(definterface log (λ [a] a))
(definterface log10 (λ [a] a))
(definterface mod (λ [a a] a))
(definterface modf (λ [a (Ref a)] a))
(definterface pow (λ [a a] a))
(definterface sin (λ [a] a))
(definterface sinh (λ [a] a))
(definterface sqrt (λ [a] a))
(definterface tan (λ [a] a))
(definterface tanh (λ [a] a))
2020-02-11 11:09:30 +03:00
(definterface slice (Fn [&a Int Int] a))
(definterface blit (Fn [a] a)) ; For types that can be freely memcopied -- exact name is up for discussion
2021-01-20 11:54:08 +03:00
(definterface empty? (Fn [&a] Bool))