doc-src/Codegen/Thy/examples/arbitrary.ML
author blanchet
Wed, 06 Jun 2012 10:35:05 +0200
changeset 48088 c75f36d190df
parent 30226 2f4684e2ea95
permissions -rw-r--r--
generalized monotonic constructor optimisation so that it works with e.g. the product type

structure Codegen = 
struct

val arbitrary_option : 'a option = NONE;

fun dummy_option [] = arbitrary_option
  | dummy_option (x :: xs) = SOME x;

end; (*struct Codegen*)