Some minor nitpicking:

[email protected] writes:
> Sat Mar 28 00:18:21 CET 2009  [email protected]
>   * Resolve issue1162: makeAbsolute is now a total function

AFAICT this should also move bugs/issue1162_add_nonexistent_slash.sh
into tests/.

>  simpleSubPath :: FilePath -> Maybe SubPath
> -simpleSubPath x | is_relative x = Just $ SubPath $ FilePath.normalise $ map 
> cleanup x
> +simpleSubPath x | null x = bug "simpleSubPath called with empty path"
> +                | is_relative x = Just $ SubPath $ FilePath.normalise $ map 
> cleanup x
>                  | otherwise = Nothing
>  
>  
>  makeAbsolute :: AbsolutePath -> FilePath -> AbsolutePath
> -makeAbsolute a dir = if is_absolute dir
> +makeAbsolute a dir = if not (null dir) && is_absolute dir
>                       then AbsolutePath $
>                            slashes ++ FilePath.normalise cleandir
>                       else ma a $ FilePath.normalise cleandir

Would makeAbsolute be more readable if it used guard style, as
simpleSubPath does above?

Finally, if you understand the functions you're modifying, adding a
haddock comment for each one would be greatly appreciated.

_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to