packages feed

richreports 0.0.0.1 → 0.0.0.2

raw patch · 2 files changed

+12/−8 lines, 2 filesPVP: minor bump suggested

API additions: PVP suggests at least a minor version bump

API changes (from Hackage documentation)

+ Text.RichReports: instance ToReport a => ToReport (Maybe a)

Files

Text/RichReports.hs view
@@ -1,8 +1,9 @@ ----------------------------------------------------------------
 --
--- Rich Reports
+-- | Rich Reports
 --
--- RichReports.hs
+-- @Text\/RichReports.hs@
+--
 --   Definitions for the representation and construction of a
 --   data structure corresponding to a structured representation
 --   of the concrete syntax of a programming language, with
@@ -22,8 +23,8 @@ import qualified Text.Ascetic.HTML as H
 
 ----------------------------------------------------------------
--- Data structures (also used for report construction process)
--- and class.
+-- | Data structures (also used for report construction process)
+--   and classes.
 
 type Message = Report
 
@@ -74,13 +75,16 @@   messages :: a -> [Message]
 
 ----------------------------------------------------------------
--- Default class members.
+-- | Default class members.
 
 instance ToReport a => ToReport [a] where
   report xs = Conc $ map report xs
+  
+instance ToReport a => ToReport (Maybe a) where
+  report x = Conc $ maybe [] (\r -> [report r]) x
 
 ----------------------------------------------------------------
--- Concise synonyms.
+-- | Concise synonyms.
 
 keyword = C Keyword [] []
 keyword_ = C Keyword
@@ -108,7 +112,7 @@ err_ = C Error
 
 ----------------------------------------------------------------
--- Generation of an interactive HTML version of the report.
+-- | Generation of an interactive HTML version of the report.
 
 highlight :: Highlight -> [H.Class]
 highlight h = case h of
richreports.cabal view
@@ -1,5 +1,5 @@ Name:              richreports
-Version:           0.0.0.1
+Version:           0.0.0.2
 Cabal-Version:     >= 1.6
 License:           GPL-3
 License-File:      LICENSE