view tests/datatype.ur @ 1556:e1f5d9c4cc20

An abstract type of IDs
author Adam Chlipala <adam@chlipala.net>
date Sat, 03 Sep 2011 12:51:05 -0400
parents f387d12193ba
children
line wrap: on
line source
datatype t = A | B

val a = A
val b = B

datatype foo = C of t

val c = C a

datatype list = Nil | Cons of {Head : int, Tail : list}

val nil = Nil
val l1 = Cons {Head = 0, Tail = nil}

datatype term = App of term * term | Abs of term -> term