[Haddock] Portability box

Thomas Schilling nominolo at googlemail.com
Sun Aug 29 19:17:45 EDT 2010


On 30 Aug 2010, at 00:14, Mark Lentczner wrote:

> 
> 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

Yes, the message was triggered, but it should be a warning instead of an error.  If the theme directory is broken it should be skipped, not abort the installation.

 / Thomas




More information about the Haddock mailing list