Article View: comp.lang.functional
Article #670Re: SML Pretty-printing
From: Thomas M. Breuel
Date: Wed, 07 Oct 1992 22:31
Date: Wed, 07 Oct 1992 22:31
24 lines
1224 bytes
1224 bytes
In article <91849@netnews.upenn.edu> freeman@linc.cis.upenn.edu (Jon Freeman) writes: I never even thought that writing a pretty-printer for SML was a feasible undertaking. Consider the following program: [...] Well, Jon's example didn't work, but what about the following: the interpretation of a curried call like f 3 foo 4 depends on whether "foo" is an "infix" operator (e.g., "before") or not. This may perhaps not affect indentation, but it may trip up other tools. Thomas. PS: the "problem" goes away if you require all arguments to be parenthesized, like other languages do (or, at least, adopt this as a convention): f(3)(foo)(4) is unambiguous.
Technical Details
Message-ID:
<TMB.92Oct7183120@arolla.idiap.ch>Path:
arc1-ca.pugleaf.net!sparky!uunet!snorkelwacker.mit.edu!ai-lab!life.ai.mit.edu!tmbReferences:
<91849@netnews.upenn.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!snorkelwacker.mit.edu!ai-lab!life.ai.mit.edu!tmb From: tmb@arolla.idiap.ch (Thomas M. Breuel) Newsgroups: comp.lang.functional Subject: Re: SML Pretty-printing Message-ID: <TMB.92Oct7183120@arolla.idiap.ch> Date: 7 Oct 92 22:31:20 GMT References: <91849@netnews.upenn.edu> Sender: news@ai.mit.edu Reply-To: tmb@idiap.ch Organization: IDIAP (Institut Dalle Molle d'Intelligence Artificielle Perceptive) Lines: 24 In-reply-to: freeman@linc.cis.upenn.edu's message of 6 Oct 92 16:20:53 GMT