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

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

cosmetics

Files:
1 modified

Legend:

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

    r4393 r4394  
    3232    requireInc incs file (errMsg file incs) 
    3333    where 
    34     style = MkEvalStyle{ evalError  = EvalErrorFatal 
    35                        , evalResult = (if dumpEnv == True then EvalResultEnv else EvalResultLastValue)} 
     34    style = MkEvalStyle 
     35        { evalError  = EvalErrorFatal 
     36        , evalResult = (if dumpEnv == True then EvalResultEnv 
     37                                           else EvalResultLastValue)} 
    3638    errMsg file incs = "Can't locate " ++ file ++ " in @INC (@INC contains: " ++ unwords incs ++ ")." 
    3739    requireInc [] _ msg = fail msg 
     
    5254        else do 
    5355            contents <- liftIO $ readFile filename 
    54             opEval MkEvalStyle{ evalError=EvalErrorUndef, evalResult=EvalResultLastValue} filename $ decodeUTF8 contents 
     56            opEval style filename $ decodeUTF8 contents 
     57    where 
     58    style = MkEvalStyle{ evalError=EvalErrorUndef 
     59                       , evalResult=EvalResultLastValue} 
    5560 
    5661op1EvalHaskell :: Val -> Eval Val 
     
    5863    str     <- fromVal cv 
    5964    val     <- resetT $ evalHaskell str 
    60     retEvalResult MkEvalStyle{ evalError=EvalErrorUndef, evalResult=EvalResultLastValue} val 
     65    retEvalResult style val 
     66    where 
     67    style = MkEvalStyle{ evalError=EvalErrorUndef 
     68                       , evalResult=EvalResultLastValue} 
    6169 
    6270opEval :: EvalStyle -> FilePath -> String -> Eval Val 
     
    8088            writeRef errSV (VStr str) 
    8189            when (evalError style == EvalErrorFatal) $ do 
    82                 --trace ("fatal error" ++ str) $ return () 
    83                 --FIXME: this should be made to throw an exception. 
    8490                liftIO $ fail $ pretty err 
    8591            retEmpty