adt-e.scrbl.old (1056B)
1 #lang scribble/manual 2 3 @require["util.rkt" 4 "adt-utils.rkt" 5 (for-label (only-meta-in 0 typed/racket))] 6 @(use-mathjax) 7 8 @title[#:style (with-html5 manual-doc-style) 9 #:version (version-text)]{Expressions} 10 11 @$${ 12 @cases["e" #:first-sep "⩴" 13 @acase{…} 14 @acase{@ctor[@κ e]} 15 @acase{(@ctor-pred[@κ] e)} 16 @acase{(@ctor-val[@κ] e)} 17 @acase{@record[@repeated{@|ɐ|ᵢ = eᵢ}]} 18 @acase{(@record-pred[@repeated{@|ɐ|ᵢ}] e)} 19 @acase{e.@|ɐ|} 20 @acase{@opwith[e @|ɐ| e]} 21 @acase{@opwithout[e @|ɐ|]}] 22 } 23 24 @;{ 25 Note: In the @${@record[@repeated{@|ɐ|ᵢ = eᵢ}]} expression, which builds a 26 new record value, the @${@|ɐ|ᵢ} are ordered, and the field order defines the 27 order of evaluation, as indicated by the extensions to the @${E} contexts 28 which is given below. In other uses, the order of fields within the record is 29 irrelevant, i.e. the record can be assimilated to a set of 2-uples, of which 30 the first element is a field name, and the second a value or type. 31 }