Add test to basename

This commit is contained in:
Julian Ospald 2016-06-13 13:51:53 +02:00
parent 4dec385332
commit f6a5cb8668
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28

View File

@ -336,6 +336,8 @@ dirname (MkPath fp) = MkPath (takeDirectory $ dropTrailingPathSeparator fp)
--
-- >>> basename (MkPath "/abc/def/dod") :: Maybe (Path Fn)
-- Just "dod"
-- >>> basename (MkPath "/abc/def/dod/") :: Maybe (Path Fn)
-- Just "dod"
-- >>> basename (MkPath "/") :: Maybe (Path Fn)
-- Nothing
basename :: MonadThrow m => Path b -> m (Path Fn)