src/HOL/Option.thy
author oheimb
Mon Nov 10 14:57:31 1997 +0100 (1997-11-10)
changeset 4192 c38ab5af38b5
parent 4133 0a08c2b9b1ed
child 4752 1c334bd00038
permissions -rw-r--r--
replaced 8bit characters
     1 (*  Title:      Option.thy
     2     ID:         $Id$
     3     Author:     Tobias Nipkow
     4     Copyright   1994  TU Muenchen
     5 
     6 Datatype 'a option
     7 *)
     8 
     9 Option = Arith +
    10 
    11 datatype 'a option = None | Some 'a
    12 
    13 constdefs
    14 
    15   the		:: "'a option => 'a"
    16  "the == %y. case y of None => arbitrary | Some x => x"
    17 
    18   option_map	:: "('a => 'b) => ('a option => 'b option)"
    19  "option_map == %f y. case y of None => None | Some x => Some (f x)"
    20 
    21 end