Changeset 3442

Show
Ignore:
Timestamp:
05/19/05 17:55:30 (4 years ago)
Author:
iblech
svk:copy_cache_prev:
5016
Message:

Like in Perl 5, die "...\n" now doesn't output the file position etc. where the
error has happened.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Pretty.hs

    r3320 r3442  
    113113    format (VCode _) = text "sub {...}" 
    114114    format (VBlock _) = text "{...}" 
    115     format (VError x y@(NonTerm _)) = 
    116         text "*** Error:" <+> (text x <+> (text "at" <+> format y)) 
     115    format (VError x y@(NonTerm _)) 
     116        -- Is this correct? Does this work on win32, too? 
     117        | last x == '\n' = text . init $ x 
     118        | otherwise      = text "*** Error:" <+> (text x <+> (text "at" <+> format y)) 
    117119    format (VError x _) = text "*** Error:" <+> text x 
    118120--  format (VArray x) = format (VList $ Array.elems x)