gendocs 0.1.1 → 0.1.2
raw patch · 5 files changed
+8/−12 lines, 5 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Data.Docs: allValues :: Sample a => Proxy a -> [a]
- Data.Docs: genDocsWithValues :: forall a. (Generic a, GTypeName (Rep a), Selectors (Rep a), Bounded a, Enum a, Show a) => Text -> Proxy a -> Documentation
- Data.Docs.Docs: genDocsWithValues :: forall a. (Generic a, GTypeName (Rep a), Selectors (Rep a), Bounded a, Enum a, Show a) => Text -> Proxy a -> Documentation
- Data.Docs.Sample: allValues :: Sample a => Proxy a -> [a]
+ Data.Docs: genDocsEnum :: forall a. (Generic a, GTypeName (Rep a), Selectors (Rep a), Bounded a, Enum a, Show a) => Text -> Proxy a -> Documentation
+ Data.Docs.Docs: genDocsEnum :: forall a. (Generic a, GTypeName (Rep a), Selectors (Rep a), Bounded a, Enum a, Show a) => Text -> Proxy a -> Documentation
- Data.Docs: class Sample a where samples p = [sample p] allValues _ = []
+ Data.Docs: class Sample a where samples p = [sample p]
- Data.Docs.Sample: class Sample a where samples p = [sample p] allValues _ = []
+ Data.Docs.Sample: class Sample a where samples p = [sample p]
Files
- README.md +3/−3
- gendocs.cabal +1/−1
- src/Data/Docs.hs +1/−1
- src/Data/Docs/Docs.hs +3/−3
- src/Data/Docs/Sample.hs +0/−4
README.md view
@@ -10,7 +10,7 @@ import Data.Aeson (ToJSON) import Data.Proxy (Proxy(..))- import Data.Docs (markdown, Docs(..), Sample(..), genDocs)+ import Data.Docs (markdown, Docs(..), Sample(..), genDocs, genDocsEnum) import Data.Text (Text) import qualified Data.Text as Text import GHC.Generics (Generic)@@ -41,10 +41,10 @@ data Hobby = Haskell | Friends | Movies deriving (Show, Eq, Generic, Enum, Bounded) instance ToJSON Hobby- instance Docs Hobby+ instance Docs Hobby where+ docs = genDocsEnum "Hobby" instance Sample Hobby where sample _ = Haskell- allValues _ = [minBound..] doc :: IO () doc = do
gendocs.cabal view
@@ -1,5 +1,5 @@ name: gendocs-version: 0.1.1+version: 0.1.2 synopsis: Library for generating interface documentation from types description: Please see README.md homepage: https://github.com/seanhess/gendocs#readme
src/Data/Docs.hs view
@@ -3,7 +3,7 @@ , Field(..) , Docs(..) , genDocs- , genDocsWithValues+ , genDocsEnum , genValues , genFields , Sample(..)
src/Data/Docs/Docs.hs view
@@ -9,7 +9,7 @@ , Field(..) , Docs(..) , genDocs- , genDocsWithValues+ , genDocsEnum , genValues , genFields ) where@@ -58,8 +58,8 @@ , enumeratedValues = [] } -genDocsWithValues :: forall a. (Generic a, GTypeName (Rep a), Selectors (Rep a), Bounded a, Enum a, Show a) => Text -> Proxy a -> Documentation-genDocsWithValues d p =+genDocsEnum :: forall a. (Generic a, GTypeName (Rep a), Selectors (Rep a), Bounded a, Enum a, Show a) => Text -> Proxy a -> Documentation+genDocsEnum d p = (genDocs d p) { enumeratedValues = genValues p }
src/Data/Docs/Sample.hs view
@@ -9,7 +9,3 @@ samples :: Proxy a -> [a] samples p = [sample p]-- -- | If the values are bounded (an enum), list all of them- allValues :: Proxy a -> [a]- allValues _ = []