Show
Ignore:
Timestamp:
05/20/05 23:49:16 (4 years ago)
Author:
theorbtwo
svk:copy_cache_prev:
5107
Message:

More signatures. If I could fiture out a signature for mainCC in
src/Pugs/Compile/Haskell.hs that doesn't make the compiler croak, we could
turn off the option to not warn (and thus error, since we -Werror) on
missing signatures.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Embed/Haskell.hs

    r2159 r3538  
    66#if !defined(PUGS_HAVE_HSPLUGINS) 
    77 
    8 evalHaskell :: String -> IO (Either String String) 
    9 evalHaskell _ = return $ Left "need hs-plugins for eval_haskell" 
     8import Pugs.AST 
     9 
     10evalHaskell :: String -> Eval Val 
     11evalHaskell _ = fail "need hs-plugins for eval_haskell" 
    1012 
    1113#else 
    1214 
    1315import qualified Eval 
     16import Pugs.AST 
    1417 
    15 {- Return is either (left) an error message, or (right) the return of the 
    16 eval) -} 
    17 evalHaskell :: String -> IO (Either String String) 
     18evalHaskell :: String -> Eval Val 
    1819evalHaskell code = do 
    1920    let imports = [] 
     
    2223    ret <- Eval.eval_ code imports [] [] [] 
    2324    case ret of 
    24         Right (Just x) -> return $ Right x 
    25         Right Nothing  -> return $ Left "Something strange happened" 
    26         Left x         -> return $ Left $ unlines x 
     25        Right (Just x) -> return x 
     26        Right Nothing  -> fail "Something strange happened" 
     27        Left x         -> fail $ unlines x 
    2728 
    2829#endif