unsafeEval :: String -> [Import] -> IO (Maybe a)
unsafeEval src mods = do
    pwd    <- getCurrentDirectory
    tmpf   <- mkUniqueWith wrap src mods
    status <- make tmpf []
    m_rsrc <- case status of
        MakeSuccess _ obj  -> do
           m_v <- load obj [pwd] [] symbol
           case m_v of LoadFailure _      -> return Nothing
                       LoadSuccess _ rsrc -> return $ Just rsrc
        MakeFailure err -> mapM_ putStrLn err >> return Nothing
    makeCleaner tmpf
    return m_rsrc

--
-- | 'unsafeEval_' is a form of 'unsafeEval' with all internal hooks
-- exposed. This is useful for application wishing to return error
-- messages to users, to specify particular libraries to link against
-- and so on.
--
unsafeEval :: String -> [Import] -> IO (Maybe a)
unsafeEval src mods = do
    pwd    <- getCurrentDirectory
    tmpf   <- mkUniqueWith wrap src mods
    status <- make tmpf []
    m_rsrc <- case status of
        MakeSuccess _ obj  -> do
           m_v <- load obj [pwd] [] symbol
           case m_v of LoadFailure _      -> return Nothing
                       LoadSuccess _ rsrc -> return $ Just rsrc
        MakeFailure err -> mapM_ putStrLn err >> return Nothing
    makeCleaner tmpf
    return m_rsrc

--
-- | 'unsafeEval_' is a form of 'unsafeEval' with all internal hooks
-- exposed. This is useful for application wishing to return error
-- messages to users, to specify particular libraries to link against
-- and so on.
--
unsafeEval src mods = do
    pwd    <- getCurrentDirectory
    tmpf   <- mkUniqueWith wrap src mods
    status <- make tmpf []
    m_rsrc <- case status of
        MakeSuccess _ obj  -> do
           m_v <- load obj [pwd] [] symbol
           case m_v of LoadFailure _      -> return Nothing
                       LoadSuccess _ rsrc -> return $ Just rsrc
        MakeFailure err -> mapM_ putStrLn err >> return Nothing
    makeCleaner tmpf
    return m_rsrc

--
-- | 'unsafeEval_' is a form of 'unsafeEval' with all internal hooks
-- exposed. This is useful for application wishing to return error
-- messages to users, to specify particular libraries to link against
-- and so on.
--