Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warnings revealed by PureScript v0.14.1 #68

Merged
merged 5 commits into from
May 6, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
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
15 changes: 14 additions & 1 deletion spago.dhall
Original file line number Diff line number Diff line change
@@ -1,17 +1,30 @@
{ name = "formatters"
, dependencies =
[ "aff"
, "arrays"
, "assert"
, "bifunctors"
, "console"
, "control"
, "datetime"
, "effect"
, "fixed-points"
, "either"
, "enums"
, "foldable-traversable"
, "integers"
, "lists"
, "math"
, "maybe"
, "newtype"
, "numbers"
, "ordered-collections"
, "parsing"
, "partial"
, "prelude"
, "psci-support"
, "strings"
, "transformers"
, "tuples"
]
, packages = ./packages.dhall
, sources = [ "src/**/*.purs", "test/**/*.purs" ]
Expand Down
2 changes: 1 addition & 1 deletion src/Data/Formatter/Internal.purs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repeat ∷ ∀ a. Monoid a ⇒ a → Int → a
repeat = repeat' mempty
where
repeat' ∷ a → a → Int → a
repeat' accum part count
repeat' accum _ count
| count < one = accum
repeat' accum part count =
repeat' (accum <> part) part (count - one)
4 changes: 2 additions & 2 deletions test/src/Interval.purs
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ intervalTest = describe "Data.Formatter.Interval" do
prop "should unformat RecurringInterval" arbRecurringInterval \({ str, interval }) → do
(unformatRecurringInterval str) `shouldEqual` (Right interval)

prop "format (unformat s) = s" arbRecurringInterval \({ str, interval, formatedStr }) → do
prop "format (unformat s) = s" arbRecurringInterval \({ str, formatedStr }) → do
(formatRecurringInterval <$> (unformatRecurringInterval str)) `shouldEqual` (Right formatedStr)

prop "unformat (format s) = s" arbRecurringInterval \({ str, interval, formatedStr }) → do
prop "unformat (format s) = s" arbRecurringInterval \({ interval }) → do
(unformatRecurringInterval $ formatRecurringInterval interval) `shouldEqual` (Right interval)


Expand Down