LIB: remove obsolete code in Zipper

This commit is contained in:
Julian Ospald 2015-12-18 04:15:55 +01:00
parent f2a8f21bf3
commit 0781cbf9d5
No known key found for this signature in database
GPG Key ID: 220CD1C5BDEED020

View File

@ -53,8 +53,6 @@ baseZipper dt = (dt, [])
-- Note that this function can be slow, so it's not supposed to be called
-- over a list of zippers. Use `goAllDown` instead.
goDown :: FileName -> DTZipper a b -> Maybe (DTZipper a b)
goDown ['.'] dtz = Just dtz
goDown ['.', '.'] dtz = Just $ goUp dtz
goDown fn (dtp@(Dir n cs d), xs) =
case mcdt of
Just cdt -> Just (cdt, Dir n (crumb' fn cs) d : xs)
@ -101,18 +99,6 @@ getFullPath dz@(dt, _:_) = getFullPath (goUp dz) </> name dt
getFullPath (dt, []) = name dt
-- |The zipper that describes the ".." file inside a directory. The name
-- is set to ".." too.
upDirZipper :: DTZipper a b -> DTZipper a b
upDirZipper dz = zipMap (\x -> x { name = "..", contents = [] }) $ goUp dz
-- |The zipper that describes the "." file inside a directory. The name
-- is set to "." too.
curDirZipper :: DTZipper a b -> DTZipper a b
curDirZipper dz = zipMap (\x -> x { name = ".", contents = [] }) dz
-- |Retrieve the (current) directory component from the zipper.
unZip :: DTZipper a b -> DirTree a b
unZip = fst