From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA27457; Wed, 7 Apr 2004 19:54:13 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 TAA27433 for ; Wed, 7 Apr 2004 19:54:12 +0200 (MET DST) Received: from qrnik.knm.org.pl (paf87.warszawa.sdi.tpnet.pl [217.96.225.87]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i37Ht2jq006606 for ; Wed, 7 Apr 2004 19:55:04 +0200 Received: from qrnik ([192.168.0.1] ident=qrczak) by qrnik.knm.org.pl with esmtp (Exim 3.36 #1) id 1BBHFZ-0002V3-00 for caml-list@inria.fr; Wed, 07 Apr 2004 19:54:09 +0200 Subject: Re: [Caml-list] Function forward declaration? From: "Marcin 'Qrczak' Kowalczyk" To: caml-list@inria.fr In-Reply-To: <20040407173613.GA10291@redhat.com> References: <00cf01c41bd6$391b53a0$0203a8c0@hoedic> <20040406175320.GA19840@redhat.com> <1081279717.16531.6.camel@qrnik> <002901c41c65$b53e4c50$19b0e152@warp> <1081345936.19232.579.camel@pelican> <20040407141519.GA6618@redhat.com> <1081353080.19232.678.camel@pelican> <20040407164122.GA9247@redhat.com> <87r7uzhezt.dlv@vanicat.homelinux.org> <20040407173613.GA10291@redhat.com> Content-Type: text/plain; charset=ISO-8859-2 Message-Id: <1081360448.20356.45.camel@qrnik> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.5.6 Date: Wed, 07 Apr 2004 19:54:08 +0200 Content-Transfer-Encoding: quoted-printable X-Miltered: at nez-perce by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 marcin:01 'qrczak':01 kowalczyk:01 qrczak:01 indent:01 indenting:01 indentation:01 nesting:01 indentation:01 indented:01 marcin:01 kowalczyk:01 qrczak:01 tokens:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk X-Status: X-Keywords: X-UID: 102 W li=B6cie z =B6ro, 07-04-2004, godz. 18:36 +0100, Richard Jones napisa=B3: > Well the very specific problem is that tuareg-mode doesn't indent like > this. The indenting probably should reflect the actual structure of > the code. I believe "let ... in" and "if ... then ... else" should not necessarily increase the indentation level, even though syntactically they open a new level of nesting. It's not Lisp, we don't have an additional ")" to close at the end :-) Unfortunately perfect indentation is not automatically deducible from the list of tokens. The natural OCaml style of finding the right condition among many: if ... then ... else if ... then ... else if ... then ... else ... or with a newline in each "else if" pair, looks better when all branches are indented the same amount. --=20 __("< Marcin Kowalczyk \__/ qrczak@knm.org.pl ^^ http://qrnik.knm.org.pl/~qrczak/ ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners