Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] syntax of private constructors in CVS version
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Hendrik Tews <tews@t...>
Subject: Re: [Caml-list] syntax of private constructors in CVS version
Pierre Weis writes:
   As you should already know, usual sum and product types in Caml
   correspond to the mathematical notion of free algebraic data

If you consider the ocaml fragment without recursive values.
For instance:

   type nat =
      | Zero
      | Succ of nat;;
   let rec x = Succ x;;

This x does not belong to the free algebra. 

(And BTW, the product types are not free, they are cofree or
terminal or final, whatever terminology you prefer.)

Sorry for nitpicking,

Hendrik Tews

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: