git.iko.soy/typeable/openapi3
on master help sign in
Add warning to SwaggerMonoid Bool instance
55b6369Nickolay Kudasov
src/Data/Swagger/Internal/Utils.hs+1
@@ -120,6 +120,7 @@ instance SwaggerMonoid (Maybe a) where
120 swaggerMappend x Nothing = x
120 swaggerMappend x Nothing = x
121 swaggerMappend _ y = y
121 swaggerMappend _ y = y
122
122
123+-- | __WARNING:__ not a true monoid (`swaggerMempty` breaks right identity law).
123instance SwaggerMonoid Bool where
124instance SwaggerMonoid Bool where
124 swaggerMempty = False
125 swaggerMempty = False
125 swaggerMappend _ y = y
126 swaggerMappend _ y = y