Merge pull request #1492 from yesodweb/showRoutes

Derive Show instances for route data structures
This commit is contained in:
Michael Snoyman 2018-03-05 10:17:39 +02:00 committed by GitHub
commit cb229cf84c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 3 deletions

View File

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

View File

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

View File

@ -1,5 +1,5 @@
name: yesod-core
version: 1.6.1
version: 1.6.2
license: MIT
license-file: LICENSE
author: Michael Snoyman <michael@snoyman.com>