Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Conversation

@patrickt
Copy link
Contributor

@patrickt patrickt commented Jun 12, 2019

Test cases are a good use of -XImplicitParams, because often one
finds oneself plumbing a bunch of parameters obtained from IO through
a dozen layers of pure functions. Implicit parameters make this sort
of passing significantly easier.

Fixes #128.

Test cases are a good use of `-XImplicitParams`, because often one
finds oneself plumbing a bunch of parameters obtained from IO through
a dozen layers of pure functions. Implicit parameters make this sort
of passing significantly easier.

Fixes #128.
@patrickt patrickt requested a review from a team June 12, 2019 17:57

spec :: TaskSession -> Spec
spec session = parallel $ do
spec :: (?session :: TaskSession) => Spec
Copy link
Contributor

Choose a reason for hiding this comment

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

You could define this as a constraint synonym somewhere and lose the LANGUAGE pragma as well as simplifying the syntax, rather like HasCallStack. (You’d also need a currentSession binding which uses it.)

@patrickt patrickt changed the base branch from tasty-golden-scrumptious-tests to master June 12, 2019 21:20
@patrickt patrickt merged commit e4fdb7f into master Jun 13, 2019
@patrickt patrickt deleted the cleaner-implicit-params branch June 13, 2019 03:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clean up TaskSession parameter in specs.

3 participants