Skip to content

Instantly share code, notes, and snippets.

@otherjoel
Created January 25, 2026 03:05
Show Gist options
  • Select an option

  • Save otherjoel/c0112a969ff0de222cbc3d47e4b091cf to your computer and use it in GitHub Desktop.

Select an option

Save otherjoel/c0112a969ff0de222cbc3d47e4b091cf to your computer and use it in GitHub Desktop.
Testing defhashview
#lang scribble/manual
@require[@for-label[boofus
racket/base]
hash-view/scribble]
@title[#:style 'toc]{boofus}
@author{joel}
@section{Definition}
@defmodule[boofus]
Package Description Here
@defhashview[foo ([password bytes?] [sigil string?]) #:immutable]{
A very very special hash table.
}
@defhashview[very-long-hash-view-name
([field-with-a-long-name string? #:default "X"]
[another-long-field-name real? #:default/omit 1.0]
[yet-another-field boolean?])]{
Tired of typing? @emph{Too bad.}
}
@section{Examples}
@racketblock[
(define x (foo "1" "2"))
(foo? x)
(foo-sigil x)
(foo-password x)
(make-mutable-very-long-hash-view-name)
]
#lang racket/base
(require hash-view)
(provide (hash-view-out foo)
(hash-view-out very-long-hash-view-name))
(hash-view foo (password sigil) #:immutable)
(hash-view very-long-hash-view-name
(field-with-a-long-name
another-long-field-name
yet-another-field))
#lang info
(define collection "boofus")
(define deps '("base"))
(define build-deps '("scribble-lib" "racket-doc" "rackunit-lib"))
(define scribblings '(("boofus.scrbl" ())))
(define pkg-desc "Description Here")
(define version "0.0")
(define pkg-authors '(joel))
(define license '(Apache-2.0 OR MIT))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment