[Haskell-beginners] haskell-src

jean verdier verdier.jean at gmail.com
Mon Oct 17 09:18:10 CEST 2011


Thanks for your reply.

Haskell-src parses enough haskell for my needs so extended haskell
parsing is not the problem atm. I am looking for parser that outputs
better errors. I have run some quick parsing tests using
haskell-src-exts using ghc and the error reporting is not better for me
as it outputs the same wrong offset for unterminated comments and the
parse errors are not much more informative:"Parse error: ;" but there
are no semi in the original text, and some looks like overkill in simple
haskell sources:"TemplateHaskell is not enabled" that is output for some
unterminated root decl.
I will keep haskell src for the time being, hoping that there is some
already written parser that i can use but in the worst case i will write
one myself.



On Sun, 2011-10-16 at 12:50 -0400, Brent Yorgey wrote:
> As I understand it, haskell-src-exts is to be preferred to haskell-src
> since it is more actively maintained and parses more programs
> (including some GHC extensions).  You may want to try switching to
> haskel-src-exts and see if that solves your problem.
> 
> -Brent
> 
> On Sun, Oct 16, 2011 at 06:27:47PM +0200, jean verdier wrote:
> > I'm using haskell-src to build a haskell compiler. I've compiled
> > hscolour and haskell-src to java classes and used the result to colorize
> > and report parsing errors in an eclipse editor. I use 1.0.1.3 and it
> > reports unterminated comments on the token before the {- token so it is
> > mildy informative and possibly an error in the implementation.
> > haskell-src serves me well but i would like some better error reporting
> > as "parse error" is quite non informative. I would like to avoid
> > building my own parser and so would like to know what the options are
> > for parsing haskell sources with an improved error reporting.
> > 
> > I've no idea how i should share screenshots so i've uploaded to the
> > first site i've found:
> > http://imageshack.us/photo/my-images/853/scr1g.png/
> > http://imageshack.us/photo/my-images/706/scr2a.png/
> > 
> > 
> > 
> > _______________________________________________
> > Beginners mailing list
> > Beginners at haskell.org
> > http://www.haskell.org/mailman/listinfo/beginners
> 
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners





More information about the Beginners mailing list