Changeset 2449 for src/Main.hs

Show
Ignore:
Timestamp:
04/28/05 23:45:52 (4 years ago)
Author:
autrijus
svk:copy_cache_prev:
3914
Message:

* Eval monad is now a EvalT transformer by itself.
* Much better error reporting on fail "".
* retError now accepts any Show type as the second arg.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Main.hs

    r2433 r2449  
    138138doParseWith :: (Env -> FilePath -> IO a) -> FilePath -> String -> IO a 
    139139doParseWith f name prog = do 
    140     env <- emptyEnv [] 
     140    env <- emptyEnv name [] 
    141141    runRule env f' ruleProgram name $ decodeUTF8 prog 
    142142    where 
     
    149149doParse :: FilePath -> String -> IO () 
    150150doParse name prog = do 
    151     env <- emptyEnv [] 
     151    env <- emptyEnv name [] 
    152152    case runRule env envBody ruleProgram name (decodeUTF8 prog) of 
    153153        (Val err@(VError _ _)) -> putStrLn $ pretty err