Skip to content

Remove nonEmptyOrFail function from recent tests#1237

Merged
parsonsmatt merged 4 commits intoyesodweb:masterfrom
danbroooks:simplify-line-test-cleanup
Apr 26, 2021
Merged

Remove nonEmptyOrFail function from recent tests#1237
parsonsmatt merged 4 commits intoyesodweb:masterfrom
danbroooks:simplify-line-test-cleanup

Conversation

@danbroooks
Copy link
Contributor

@danbroooks danbroooks commented Apr 20, 2021

Before submitting your PR, check that you've:

  • Documented new APIs with Haddock markup
  • Added @since declarations to the Haddock
  • Ran stylish-haskell on any changed files.
  • Adhered to the code style (see the .editorconfig file for details)

After submitting your PR:

  • Update the Changelog.md file with a link to your PR
  • Bumped the version number if there isn't an (unreleased) on the Changelog
  • Check that CI passes (or if it fails, for reasons unrelated to your change, like CI timeouts)

Removes the nonEmptyOrFail function in favour of making use of OverloadedLists after changes in #1231

`shouldBe`
( [NEL.toList helloWorldTokens, NEL.toList foobarbazTokens], mempty )
it "works4" $ do
let foobarbarz = ["foo", "Bar", "baz"]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These were also causing some type ambiguity errors, where with OverloadedLists we want to use this value here both as a [Text] and NonEmpty Text, so I have opted to re-writing the test with literals rather than trying to re-use the values. I've tried to include some more realworld looking values too while changing things here.

@danbroooks danbroooks marked this pull request as draft April 20, 2021 22:15
@danbroooks danbroooks marked this pull request as ready for review April 21, 2021 18:14
Copy link
Collaborator

@parsonsmatt parsonsmatt left a comment

Choose a reason for hiding this comment

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

looks great thanks!

@parsonsmatt parsonsmatt merged commit 2fd0e9b into yesodweb:master Apr 26, 2021
@danbroooks danbroooks deleted the simplify-line-test-cleanup branch April 27, 2021 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants