Version française
Home     About     Download     Resources     Contact us    
Browse thread
type t = ()
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Richard Jones <rich@a...>
Subject: type t = ()
I had a program where a type was accidentally defined as (), and the
error messages confused me for ages until I worked out what was going
on ...

$ ocaml
        Objective Caml version 3.08.3

# type dummy = ();;
type dummy = ()
# let () = Printf.printf "hello";;
This expression has type unit but is here used with type dummy

Rich.

-- 
Richard Jones, CTO Merjis Ltd.
Merjis - web marketing and technology - http://merjis.com
Team Notepad - intranets and extranets for business - http://team-notepad.com