Skip to content

Commit

Permalink
Add warning to SwaggerMonoid Bool instance
Browse files Browse the repository at this point in the history
  • Loading branch information
fizruk committed Nov 10, 2015
1 parent 383a1fa commit 55b6369
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Data/Swagger/Internal/Utils.hs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ instance SwaggerMonoid (Maybe a) where
swaggerMappend x Nothing = x
swaggerMappend _ y = y

-- | __WARNING:__ not a true monoid (`swaggerMempty` breaks right identity law).
instance SwaggerMonoid Bool where
swaggerMempty = False
swaggerMappend _ y = y
Expand Down

0 comments on commit 55b6369

Please sign in to comment.