-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.rkt
More file actions
executable file
·27 lines (20 loc) · 857 Bytes
/
main.rkt
File metadata and controls
executable file
·27 lines (20 loc) · 857 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#! /usr/bin/env racket
#lang racket
;; This project requires the following packages
;; lens libuuid reloadable sha threading
;; Install using `raco pkg install --skip-installed`
;; This module sets up a reloadable entry point.
;; The reloadable entry point and all its children will
;; automatically be reloaded when their files are updated.
;; The 'reloadable' library used to automatically reload
(require reloadable)
;; Macro to remove 'core' boilerplate
(define-syntax-rule (reloadable name)
(define name (reloadable-entry-point->procedure (make-reloadable-entry-point 'name (build-path "source" (string-append (symbol->string 'name) ".rkt"))))))
;; Create a reloadable entry point
(reloadable core)
;; We must reload once, reloads are automatic afterwards
(reload!)
;; Main loop of the program
(let loop ([state empty])
(loop (core state)))