From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA22731 for caml-redistribution; Mon, 22 Feb 1999 18:08:34 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA08462 for ; Mon, 22 Feb 1999 15:58:38 +0100 (MET) Received: from hades-sle.sharp.co.uk (hades-sle.sharp.co.uk [193.114.241.3]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id PAA09855 for ; Mon, 22 Feb 1999 15:58:36 +0100 (MET) Received: from sharp.co.uk (inca.sle.sharp.co.uk [192.16.16.3]) by hades-sle.sharp.co.uk (8.8.8+Sun/8.8.8) with SMTP id OAA06640 for ; Mon, 22 Feb 1999 14:50:36 GMT Received: from byrd.sharp.co.uk by sharp.co.uk (SMI-8.6/SMI-SVR4) id OAA04709; Mon, 22 Feb 1999 14:53:52 GMT Received: by byrd.sharp.co.uk (SMI-8.6/SMI-SVR4) id OAA15626; Mon, 22 Feb 1999 14:56:01 GMT Date: Mon, 22 Feb 1999 14:56:01 GMT From: akay@sharp.co.uk (Andrew Kay) Message-Id: <199902221456.OAA15626@byrd.sharp.co.uk> To: caml-list@inria.fr Subject: Re: Warnings in ocaml Sender: weis > eg let _ = List.map f > in print_endline "done map..." > > Are there any plans to provide a warning for this in ocaml? To save anyone else the bother, I'll point out the error of my ways myself. I think SML has (had?) a check which stopped you accidentally ignoring a function value before a semi-colon. However, since functions are first class citizens, why shouldn't you want to ignore them just as you might ignore a list or integer value? So instead, I propose you write an explicit ignore function for each type you want to ignore: val ignore_int : int -> unit val ignore_fred : fred -> unit ... Andrew Kay Sharp Labs Europe Ltd, Oxford Science Park, Oxford, UK, OX4 4GA Andrew.Kay@sharp.co.uk Tel:+44 1865 747711 FAX:+44 1865 747717