;; -*-theme-d-*-

;; Copyright (C) 2008-2019 Tommi Höynälänmaa
;; Distributed under GNU Lesser General Public License version 3,
;; see file doc/LGPL-3.

(define-interface (standard-library object-string-conversion)

  (import (standard-library core))

  (define-generic-proc object->string)

  (declare integer->string
	   (:procedure (<integer>) <string> pure))

  (declare real->string
	   (:procedure (<real>) <string> pure))

  (declare symbol->string
	   (:procedure (<symbol>) <string> pure))

  (declare null->string
	   (:procedure (<null>) <string> pure))

  (declare character->string
	   (:procedure (<character>) <string> pure))

  (declare string->string
	   (:procedure (<string>) <string> pure))

  (declare boolean->string
	   (:procedure (<boolean>) <string> pure))

  (declare general-object->string
	   (:procedure (<object>) <string> pure))

  (declare pair->string
	   (:procedure (<pair>) <string> pure))
  
  (declare-method object->string
		  (:simple-proc (<object>) <string> pure))

  (declare-method object->string
		  (:simple-proc (<integer>) <string> pure))

  (declare-method object->string
		  (:simple-proc (<real>) <string> pure))

  (declare-method object->string
		  (:simple-proc (<string>) <string> pure))

  (declare-method object->string
		  (:simple-proc (<symbol>) <string> pure))

  (declare-method object->string
		  (:simple-proc (<null>) <string> pure))

  (declare-method object->string
		  (:simple-proc (<character>) <string> pure))

  (declare-method object->string
		  (:simple-proc (<boolean>) <string> pure))

  (declare-method object->string
		  (:simple-proc (<pair>) <string> pure))

  (declare string->symbol (:simple-proc (<string>) <symbol> pure))

  (declare string->integer (:simple-proc (<string>) <integer> pure))

  (declare string->real (:simple-proc (<string>) <real> pure)))
