Start converting rs to Typed Racket.
This commit is contained in:
parent
4e90afc638
commit
3821a11d38
2 changed files with 35 additions and 4 deletions
12
rs.rkt
12
rs.rkt
|
@ -1,8 +1,16 @@
|
|||
#lang racket
|
||||
|
||||
;;; dds/rs
|
||||
(module typed typed/racket
|
||||
(require typed/graph "utils.rkt" "dynamics.rkt")
|
||||
|
||||
;;; Definitions for working with reaction systems.
|
||||
(provide
|
||||
Species)
|
||||
|
||||
(module+ test
|
||||
(require typed/rackunit))
|
||||
|
||||
(define-type Species Symbol)
|
||||
)
|
||||
|
||||
(require graph "utils.rkt" "generic.rkt")
|
||||
|
||||
|
|
|
@ -1,14 +1,37 @@
|
|||
#lang scribble/manual
|
||||
@(require (for-label racket graph "../rs.rkt"))
|
||||
@(require scribble/example racket/sandbox
|
||||
(for-label typed/racket/base
|
||||
(submod "../rs.rkt" typed)))
|
||||
|
||||
@(define rs-evaluator
|
||||
(parameterize ([sandbox-output 'string]
|
||||
[sandbox-error-output 'string]
|
||||
[sandbox-memory-limit 500])
|
||||
(make-evaluator 'typed/racket #:requires '((submod "rs.rkt" typed)))))
|
||||
|
||||
@(define-syntax-rule (ex . args)
|
||||
(examples #:eval rs-evaluator . args))
|
||||
|
||||
@(define-syntax-rule (deftypeform . args)
|
||||
(defform #:kind "type" . args))
|
||||
|
||||
@(define-syntax-rule (deftype . args)
|
||||
(defidform #:kind "type" . args))
|
||||
|
||||
@title[#:tag "rs"]{dds/rs: Reaction Systems}
|
||||
|
||||
@defmodule[dds/rs]
|
||||
@defmodule[(submod dds/rs typed)]
|
||||
|
||||
This module defines reaction systems and various tools for working with them.
|
||||
|
||||
@section[#:tag "rs-basics"]{Basic definitions}
|
||||
|
||||
@deftype[Species]{
|
||||
|
||||
A synonym of @racket[Symbol].
|
||||
|
||||
}
|
||||
|
||||
@section{Org-mode interaction}
|
||||
|
||||
This section contains some useful primitives for
|
||||
|
|
Loading…
Reference in a new issue