Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion beeline-params/beeline-params.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cabal-version: 1.12
-- see: https://github.com/sol/hpack

name: beeline-params
version: 0.2.0.0
version: 0.2.1.0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this be a major version bump since it changes the behaviour of an exported function?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, thank you! Bumped in e31206f.

description: Please see the README on GitHub at <https://github.com/flipstone/beeline#readme>
homepage: https://github.com/flipstone/beeline#readme
bug-reports: https://github.com/flipstone/beeline/issues
Expand Down
2 changes: 1 addition & 1 deletion beeline-params/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: beeline-params
version: 0.2.0.0
version: 0.2.1.0
github: "flipstone/beeline/beeline-params"
author: Flipstone Technology Partners
maintainer: development@flipstone.com
Expand Down
2 changes: 1 addition & 1 deletion beeline-params/src/Beeline/Params/ParameterDefinition.hs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ booleanParam =
parseBool = parseTrue <|> parseFalse

renderBool =
bool trueText falseText
bool falseText trueText
in
parsedParam ParameterBoolean Nothing parseBool renderBool

Expand Down
8 changes: 8 additions & 0 deletions beeline-params/test/Test/ParameterDefinition.hs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ tests =
, ("prop_scientificParam", prop_scientificParam)
, ("prop_doubleParam", prop_doubleParam)
, ("prop_floatParam", prop_floatParam)
, ("prop_booleanParam", prop_booleanParam)
]

prop_textParam :: HH.Property
Expand Down Expand Up @@ -114,6 +115,13 @@ prop_floatParam =
(Gen.float (Range.linearFracFrom 0 (-bigFloat) bigFloat))
(P.floatParam "foo")

prop_booleanParam :: HH.Property
prop_booleanParam =
HH.property $
trippingParam
Gen.bool
(P.booleanParam "foo")

trippingParam ::
(Show a, Eq a) =>
HH.Gen a ->
Expand Down
Loading