Permalink
Browse files

Moved External Term Format code into its own package CLERIC-ETF.

  • Loading branch information...
1 parent 8c1ad05 commit dff1690667011b640c6b88e5fee2a96b8c6699a7 @flambard committed Nov 10, 2012
@@ -1,6 +1,6 @@
;;;; Atom cache entries
-(in-package :cleric)
+(in-package :cleric-etf)
(defun make-atom-cache-entries ()
(make-array 256
View
@@ -1,4 +1,4 @@
-(in-package :cleric)
+(in-package :cleric-etf)
(defclass erlang-object ()
())
View
@@ -1,4 +1,4 @@
-(in-package :cleric)
+(in-package :cleric-etf)
(define-condition not-implemented-error (program-error)
((comment :reader comment :initarg :comment))
View
@@ -1,6 +1,6 @@
;;;; Constants
-(in-package :cleric)
+(in-package :cleric-etf)
;;; Erlang data tags
(defconstant +compressed-term+ 80)
View
@@ -1,4 +1,4 @@
-(in-package :cleric)
+(in-package :cleric-etf)
;;;;
;;;; Decode Erlang term
View
@@ -1,4 +1,4 @@
-(in-package :cleric)
+(in-package :cleric-etf)
;;;;
;;;; Erlang atom
View
@@ -1,4 +1,4 @@
-(in-package :cleric)
+(in-package :cleric-etf)
;;;;
;;;; Erlang binary
View
@@ -1,4 +1,4 @@
-(in-package :cleric)
+(in-package :cleric-etf)
;;;;
;;;; Erlang float
View
@@ -1,4 +1,4 @@
-(in-package :cleric)
+(in-package :cleric-etf)
;;;;
;;;; Erlang function ("Fun")
View
@@ -1,4 +1,4 @@
-(in-package :cleric)
+(in-package :cleric-etf)
;;;;
;;;; Erlang integer
View
@@ -1,4 +1,4 @@
-(in-package :cleric)
+(in-package :cleric-etf)
;;;;
;;;; Erlang list
View
@@ -1,4 +1,4 @@
-(in-package :cleric)
+(in-package :cleric-etf)
;;;;
;;;; Erlang pid
View
@@ -1,4 +1,4 @@
-(in-package :cleric)
+(in-package :cleric-etf)
;;;;
;;;; Erlang port
@@ -1,4 +1,4 @@
-(in-package :cleric)
+(in-package :cleric-etf)
;;;;
;;;; Erlang reference
View
@@ -1,4 +1,4 @@
-(in-package :cleric)
+(in-package :cleric-etf)
;;;;
;;;; Erlang string
View
@@ -1,4 +1,4 @@
-(in-package :cleric)
+(in-package :cleric-etf)
;;;;
;;;; Erlang tuple
@@ -1,4 +1,4 @@
-(in-package :cleric)
+(in-package :cleric-etf)
;;;;
;;;; ENCODE - For encoding Erlang terms
View
@@ -1,6 +1,6 @@
;;;; Depends on the IEEE-Floats library
-(in-package :cleric)
+(in-package :cleric-etf)
(defun double-float-to-bytes (f)
(let ((bits (ieee-floats:encode-float64 f)))
View
@@ -1,4 +1,4 @@
-(in-package :cleric)
+(in-package :cleric-etf)
(defmacro multiple-value-bind* (bind-clauses &body body)
(if (null bind-clauses) `(progn ,@body)
View
@@ -26,6 +26,65 @@
))
+(defpackage #:cleric-etf
+ (:documentation "Erlang External Term Format")
+ (:use #:cl #:cleric-bops)
+ (:export
+
+ ;; Type
+ #:erlang-translatable
+ #:erlang-translatable-p
+
+ ;; Classes
+ #:erlang-binary
+ #:erlang-external-fun
+ #:erlang-old-internal-fun
+ #:erlang-new-internal-fun
+ #:erlang-pid
+ #:erlang-port
+ #:erlang-reference
+ #:erlang-tuple
+
+ ;; Class methods and functions
+ #:encode
+ #:decode
+ #:make-atom
+ #:match-p
+ #:bytes
+ #:bits-in-last-byte
+ #:module
+ #:arity
+ #:size
+ #:elements
+ #:tuple
+ #:binary
+ #:string-to-binary
+ #:bytes-to-binary
+ #:binary-to-string
+ #:node
+ #:make-pid
+ #:make-reference
+
+ ;; Conditions
+ #:not-implemented-error
+ #:malformed-external-erlang-term-error
+ #:untranslatable-lisp-object-error
+ #:unexpected-message-tag-error
+
+ ;; Special variables
+ #:*atom-symbol-package*
+ #:*cached-atoms*
+ #:*lisp-t-is-erlang-true*
+ #:*lisp-nil-is-erlang-empty-list*
+ #:*lisp-nil-is-erlang-false*
+ #:*lisp-nil-at-tail-is-erlang-empty-list*
+ #:*lisp-string-is-erlang-binary*
+ #:*erlang-true-is-lisp-t*
+ #:*erlang-false-is-lisp-nil*
+ #:*erlang-string-is-lisp-string*
+
+ ))
+
(defpackage #:common-lisp-erlang-interface
(:documentation "CLERIC (Common Lisp Erlang Interface) - An implementation of the Erlang distribution protocol.")
(:nicknames #:cleric)
@@ -142,7 +201,7 @@
(defpackage #:cleric-epmd
(:documentation
"Functions for querying the EPMD (Erlang Port Mapper Daemon).")
- (:use #:cl #:cleric #:cleric-bops #:flexi-streams)
+ (:use #:cl #:cleric-bops #:cleric-etf #:flexi-streams)
(:export
#:publish
@@ -1,6 +1,6 @@
;;;; Special variables
-(in-package :cleric)
+(in-package :cleric-etf)
(defvar *atom-symbol-package* :keyword
"The package in which atom symbols are interned. Symbols are uninterned if NIL.")

0 comments on commit dff1690

Please sign in to comment.