Commit 57825e5f authored by Jan Rasmus Tikovsky 's avatar Jan Rasmus Tikovsky
Browse files

Removed remaining occurrences of Control.Monad.Trans.Either

parent 450f3ced
......@@ -31,9 +31,7 @@ Executable cymake
hs-source-dirs: src
Main-is: cymake.hs
Build-Depends: base == 4.*, curry-base == 0.3.10
, containers, directory, either, mtl, process, transformers, syb
if impl(ghc < 7.4)
Build-Depends: either < 4, contravariant < 0.5, semigroupoids < 3.0.3, transformers < 0.3
, containers, directory, mtl, process, transformers, syb
ghc-options: -Wall
Other-Modules:
Base.CurryTypes
......
......@@ -14,7 +14,6 @@
module Html.CurryHtml (source2html) where
import Control.Monad.Writer
import Control.Monad.Trans.Either
import Data.Maybe (fromMaybe, isJust)
import System.FilePath ((</>), dropFileName, takeBaseName)
......@@ -51,7 +50,7 @@ filename2program :: Options -> String -> CYIO [Code]
filename2program opts f = do
mbModule <- liftIO $ readModule f
case mbModule of
Nothing -> left [message $ text $ "Missing file: " ++ f]
Nothing -> failMessages [message $ text $ "Missing file: " ++ f]
Just src -> do
toks <- liftCYM $ lexSource f src
typed <- fullParse opts f src
......
......@@ -17,7 +17,6 @@ module Imports (importInterfaces, importModules, qualifyEnv) where
import Control.Monad (liftM, unless)
import qualified Control.Monad.State as S (State, gets, modify, runState)
import Control.Monad.Trans.Either
import qualified Data.Map as Map
import Data.Maybe
import qualified Data.Set as Set
......@@ -48,8 +47,8 @@ import CompilerOpts
importModules :: Monad m => Options -> Module -> InterfaceEnv -> CYT m CompilerEnv
importModules opts mdl@(Module _ mid _ imps _) iEnv
= case foldl importModule (initEnv, []) imps of
(e, [] ) -> right $ expandTCValueEnv opts $ importUnifyData e
(_, errs) -> left errs
(e, [] ) -> ok $ expandTCValueEnv opts $ importUnifyData e
(_, errs) -> failMessages errs
where
initEnv = (initCompilerEnv mid)
{ aliasEnv = importAliases imps -- import module aliases
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment