[Haddock] Portability box

Mark Lentczner markl at glyphic.com
Sun Aug 29 19:14:04 EDT 2010

On Aug 29, 2010, at 3:54 PM, Thomas Schilling wrote:

> I had an empty Snappy.theme directory in my installed ~/.cabal/share/haddock-2.7.2/html/ which apparently aborted the install process. We should probably intercept such errors.

Huh - I thought it did! Perhaps the message isn't propagating out to the user when called from cabal?

> -- | Build a theme from a directory
> directoryTheme :: FilePath -> IO PossibleTheme
> directoryTheme path = do
>   items <- getDirectoryItems path
>   case filter isCssFilePath items of
>     [cf] -> retRight $ Theme (takeBaseName path) (takeFileName cf) items
>     [] -> errMessage "No .css file in theme directory" path
>     _ -> errMessage "More than one .css file in theme directory" path

Should have triggered the "No .css file" message

	- Mark

More information about the Haddock mailing list