[Pkg-haskell-commits] [SCM] haskell-testpack branch, master, updated. debian/1.0.2-1-4-gb0d6b36
John Goerzen
jgoerzen at complete.org
Fri Apr 23 14:49:18 UTC 2010
The following commit has been merged in the master branch:
commit 7cb57e6bee8b4ab01d45bbbc164466b0e4c8e44c
Author: John Goerzen <jgoerzen at complete.org>
Date: Fri Dec 3 22:25:59 2004 +0100
Applied first of Einar's patches
Keywords:
(jgoerzen at complete.org--projects/missingh--head--0.7--patch-1)
diff --git a/libsrc/MissingH/Cmd.hs b/libsrc/MissingH/Cmd.hs
index 22a5286..4efd5ed 100644
--- a/libsrc/MissingH/Cmd.hs
+++ b/libsrc/MissingH/Cmd.hs
@@ -36,6 +36,8 @@ module MissingH.Cmd(PipeMode(..),
pOpen, pOpen3)
where
+-- FIXME - largely obsoleted by 6.4 - convert to wrappers.
+
import System.Exit
import System.Cmd
import MissingH.Logging.Logger
diff --git a/libsrc/MissingH/ConfigParser.hs b/libsrc/MissingH/ConfigParser.hs
index e0203b9..c465dd6 100644
--- a/libsrc/MissingH/ConfigParser.hs
+++ b/libsrc/MissingH/ConfigParser.hs
@@ -201,26 +201,19 @@ interpolatingAccess :: MonadError CPError m =>
Int ->
ConfigParser -> SectionSpec -> OptionSpec
-> m String
+
interpolatingAccess maxdepth cp s o =
- let lookupfunc :: MonadError CPError m => String -> m String
- lookupfunc = interpolatingAccess (maxdepth - 1) cp s
- error2str :: ParseError -> String
- error2str = messageString . head . errorMessages
- in
- if maxdepth < 1
- then throwError $
- (InterpolationError "maximum interpolation depth exceeded",
- "interpolatingAccess")
- else do
- x <- simpleAccess cp s o
- case parse (interpmain lookupfunc) (s ++ "/" ++ o) x of
- Left y -> case (head (errorMessages y)) of
- Message z -> throwError $
- (InterpolationError z,
- "interpolatingAccess")
- _ -> throwError $ (InterpolationError (show y),
- "interpolatingAccess")
- Right y -> return y
+ if maxdepth < 1
+ then interError "maximum interpolation depth exceeded"
+ else do x <- simpleAccess cp s o
+ case parse (interpmain $ lookupfunc) (s ++ "/" ++ o) x of
+ Left y -> case head (errorMessages y) of
+ Message z -> interError z
+ _ -> interError (show y)
+ Right y -> return y
+ where
+ lookupfunc = interpolatingAccess (maxdepth - 1) cp s
+ interError x = throwError (InterpolationError x, "interpolatingAccess")
-- internal function: default handler
defdefaulthandler :: MonadError CPError m =>
--
haskell-testpack
More information about the Pkg-haskell-commits
mailing list