logo       

[ ghc-Bugs-782761 ] Wrong line count in parsec under linux on dos-style fil: msg#00012

lang.haskell.glasgow.bugs

Subject: [ ghc-Bugs-782761 ] Wrong line count in parsec under linux on dos-style files

Bugs item #782761, was opened at 2003-08-04 11:32
Message generated for change (Settings changed) made by simonpj
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=782761&group_id=8032

Category: hslibs/text
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Wrong line count in parsec under linux on dos-style files

Initial Comment:
Parsec doubles the line count (reported e.g. in a parse error) when run (at
least on a linux box) on DOS-style files (with DOS-style newlines)

I have GHC 6.0

My e-mail address is nick.name@xxxxxxxxx

Bye

Vincenzo Ciancia

----------------------------------------------------------------------

>Comment By: Simon Peyton Jones (simonpj)
Date: 2003-10-06 12:41

Message:
Logged In: YES
user_id=50165

Daan fixed this.

daan 2003/09/26 06:42:03 PDT

Modified files:
libraries/parsec/Text/ParserCombinators/Parsec Pos.hs
Log:
Fixed line count bug. That is: unix and dos files are correctly
handled by unix, and dos. Old mac files are still not correctly
handled on unix and dos but we feel that this is less of a
problem
now with macosx.

see bug:
http://sourceforge.net/tracker/index.php?
func=detail&aid=782761&group_id=8032&atid=108032

Revision Changes Path
1.2 +0 -1
fptools/libraries/parsec/Text/ParserCombinators/Parsec/Pos.hs


----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2003-08-04 18:16

Message:
Logged In: NO

As a temporary fix, you may comment out the following line in the
ParsecPos.hs file. This fix will make correct line numbers being
displayed on Unix OS's as well as Microsoft's irrespective of where
the text input files are created (this fix will probably result
in a bug on Mac's),

Comment out the line
'\r' -> SourcePos name (line+1) 1
in updatePosChar function in ParsecPos.hs

Keep a local copy of parsec, and pick up parsec from here, instead of
from GHC's text package.

A.P. Rao.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=782761&group_id=8032


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise