Changeset 4393 for src/Pugs/Prim/Eval.hs

Show
Ignore:
Timestamp:
06/05/05 10:22:56 (4 years ago)
Author:
gaal
svk:copy_cache_prev:
6052
Message:

"critical" evals (use, require, prelude) now raise exceptions on comilation errors (autrijus)++
TODO: figure out why error coordinates for Prelude are wrong;
Have the build process sanity-test the Prelude

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Prim/Eval.hs

    r4376 r4393  
    1212import Pugs.Embed 
    1313import Pugs.Internals 
     14import Pugs.Pretty 
    1415 
    1516data EvalError = EvalErrorFatal 
     
    7677    errSV <- findSymRef "$!" glob 
    7778    case val of 
    78         VError str _ -> do 
     79        err@(VError str _) -> do 
    7980            writeRef errSV (VStr str) 
    8081            when (evalError style == EvalErrorFatal) $ do 
    8182                --trace ("fatal error" ++ str) $ return () 
    8283                --FIXME: this should be made to throw an exception. 
    83                 fail str 
     84                liftIO $ fail $ pretty err 
    8485            retEmpty 
    8586        _ -> do