Examples of ornaments
The running example :
ornament of naturals by lists
and
the generated code
.
Examples of (non-)ornaments in section 2 :
nil
is a valid ornament, but
length2
,
length_div2
,
spine
and
span
are not.
Ornament from map to sets :
the small example presented in the paper
, the
output
,
a larger example from OCaml's standard library
,
the output
.
Refactoring on
a small language
and the
refactored code
.
An example where
removing constructors is not possible
, it is rejected by our implementation.
Ornaments on GADTs
, in the
output
, the last function doesn't typecheck.