DTC 1.0.0 → 1.0.1
raw patch · 3 files changed
+13/−3 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- DTC.cabal +9/−3
- Language/Haskell/DTC.hs +2/−0
- Language/Haskell/DTC/Class.hs +2/−0
DTC.cabal view
@@ -1,16 +1,22 @@ Name: DTC -Version: 1.0.0 +Version: 1.0.1 Author: Daniel Diaz Homepage: http://ddiaz.asofilak.es/packages/DTC License: BSD3 License-file: license Maintainer: Daniel Diaz <danieldiaz@asofilak.es> Category: Language -Synopsis: Data To Class. +Synopsis: Data To Class transformation. Description: Transform data declarations to class definitions. . The way is explained in /Data Declarations to Class Definitions/. - You can find these notes in the homepage of the package. + You can find more information in the homepage of the package. + . + Changes from last version: + . + * Modified some documentation. + . + * Fixed a non-exhaustive pattern matching error in @dataToClassWith@. Build-type: Simple Build-depends: base == 4.* , haskell-src
Language/Haskell/DTC.hs view
@@ -7,6 +7,7 @@ , module Language.Haskell.DTC.Class -- * Re-export "Language.Haskell.Pretty" , module Language.Haskell.Pretty + -- * Extra functions ) where import Language.Haskell.DTC.Parser @@ -14,3 +15,4 @@ import Language.Haskell.DTC.Class import Language.Haskell.Pretty +
Language/Haskell/DTC/Class.hs view
@@ -17,8 +17,10 @@ dataToClassWith str (HsDataDecl loc ctx x_T xs_v xs_C xs_Q) = let methods = concatMap (method str xs_v x_T) xs_C in HsClassDecl loc ctx x_T [HsIdent str] methods +dataToClassWith _ d = d -- | Transform a data declaration to a class definition. +-- Equivalent to @dataToClassWith \"t\"@. dataToClass :: HsDecl -> HsDecl dataToClass = dataToClassWith "t"