;; -*-theme-d-*-

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

;; Expected results: translation and running OK

(define-proper-program (tests test585)

  (import (standard-library core)
	  (standard-library console-io))

  (define-syntax swap
    (syntax-rules ()
      ((_ x y)
       (let ((t x))
	 (set! x y)
	 (set! y t)))))

  (define-simple-proc main (() <none> nonpure)
    (let-mutable ((s <integer> 1)
		  (t <integer> 2))
      (swap s t)
      (console-display-line s)
      (console-display-line t))))


