Skip to content

Instantly share code, notes, and snippets.

@Glorp
Created January 6, 2016 13:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Glorp/86e59ced2bd838d2161c to your computer and use it in GitHub Desktop.
Save Glorp/86e59ced2bd838d2161c to your computer and use it in GitHub Desktop.
doesn't seem to work
#lang racket
(module a-sig racket
(provide a^)
(define-signature a^
(a)))
(module a-impl racket
(require (submod ".." a-sig)
(submod "b.rkt" b-sig))
(provide a@)
(define-unit a@
(import b^)
(export a^)
(define (a x)
(if x 'a (b x)))))
#lang racket
(module b-sig racket
(provide b^)
(define-signature b^
(b)))
(module b-impl racket
(require (submod "a.rkt" a-sig)
(submod ".." b-sig))
(provide b@)
(define-unit b@
(import a^)
(export b^)
(define (b x)
(if x (a x) 'b))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment