#lang racket/base (require (prefix-in stupid: racket/serialize) "define-provide.ss") (define (implicit? v) (or (string? v) (integer? v) (symbol? v) (bytes? v) (boolean? v) (null? v))) (define/provide (encode v) (cond ((pair? v) (cons (encode (car v)) (encode (cdr v)))) ((implicit? v) v) (else (stupid:serialize v)))) (define/provide (decode v) (cond ((pair? v) (cons (decode (car v)) (decode (cdr v)))) ((implicit? v) v) (stupid:deserialize v))) (provide (rename-out (stupid:serializable? encodable?)))