diff --git a/yesod-core/ChangeLog.md b/yesod-core/ChangeLog.md index 8234e978..443649a7 100644 --- a/yesod-core/ChangeLog.md +++ b/yesod-core/ChangeLog.md @@ -1,3 +1,8 @@ +## 1.6.2 + +* Derive a `Show` instance for `ResourceTree` and `FlatResource` [#1492](https://github.com/yesodweb/yesod/pull/1492) + * Some third party packages, like `yesod-routes-flow` derive their own `Show` instance, and this will break those packages. + ## 1.6.1 * Add a `Semigroup LiteApp` instance, and explicitly define `(<>)` in the diff --git a/yesod-core/Yesod/Routes/TH/Types.hs b/yesod-core/Yesod/Routes/TH/Types.hs index 369598e6..eeb70bbd 100644 --- a/yesod-core/Yesod/Routes/TH/Types.hs +++ b/yesod-core/Yesod/Routes/TH/Types.hs @@ -21,7 +21,7 @@ import Language.Haskell.TH.Syntax data ResourceTree typ = ResourceLeaf (Resource typ) | ResourceParent String CheckOverlap [Piece typ] [ResourceTree typ] - deriving Functor + deriving (Show, Functor) resourceTreePieces :: ResourceTree typ -> [Piece typ] resourceTreePieces (ResourceLeaf r) = resourcePieces r @@ -90,7 +90,7 @@ data FlatResource a = FlatResource , frPieces :: [Piece a] , frDispatch :: Dispatch a , frCheck :: Bool - } + } deriving (Show) flatten :: [ResourceTree a] -> [FlatResource a] flatten = diff --git a/yesod-core/yesod-core.cabal b/yesod-core/yesod-core.cabal index 38e27c93..7dd1a9dc 100644 --- a/yesod-core/yesod-core.cabal +++ b/yesod-core/yesod-core.cabal @@ -1,5 +1,5 @@ name: yesod-core -version: 1.6.1 +version: 1.6.2 license: MIT license-file: LICENSE author: Michael Snoyman