summaryrefslogtreecommitdiff
path: root/src/GF/Data
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2009-01-31 20:36:41 +0000
committerkrasimir <krasimir@chalmers.se>2009-01-31 20:36:41 +0000
commit0e1215a8f1885997464a5c326b0fc09e493e1f09 (patch)
treedc1d5e0bd9a20a894cacb165b07c1d200a87afc8 /src/GF/Data
parent6133fcbb5fb8f5ed3f45d691ec981b4ea95f3538 (diff)
some dead code elimination in UseIO and ReadFiles
Diffstat (limited to 'src/GF/Data')
-rw-r--r--src/GF/Data/Operations.hs7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/GF/Data/Operations.hs b/src/GF/Data/Operations.hs
index 9b8f30fe1..bd5d6f452 100644
--- a/src/GF/Data/Operations.hs
+++ b/src/GF/Data/Operations.hs
@@ -21,7 +21,7 @@ module GF.Data.Operations (-- * misc functions
Err(..), err, maybeErr, testErr, errVal, errIn,
lookupErr,
mapPairListM, mapPairsM, pairM,
- (!?), singleton, mapsErr, mapsErrTree,
+ singleton, mapsErr, mapsErrTree,
-- ** checking
checkUnique,
@@ -77,7 +77,6 @@ infixr 5 +++
infixr 5 ++-
infixr 5 ++++
infixr 5 +++++
-infixl 9 !?
ifNull :: b -> ([a] -> b) -> [a] -> b
ifNull b f xs = if null xs then b else f xs
@@ -118,10 +117,6 @@ mapPairsM f xys = mapM (\ (x,y) -> liftM ((,) x) (f y)) xys
pairM :: Monad a => (b -> a c) -> (b,b) -> a (c,c)
pairM op (t1,t2) = liftM2 (,) (op t1) (op t2)
--- @!!@ with the error monad
-(!?) :: [a] -> Int -> Err a
-xs !? i = foldr (const . return) (Bad "too few elements in list") $ drop i xs
-
singleton :: a -> [a]
singleton = (:[])