-
Notifications
You must be signed in to change notification settings - Fork 841
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
Use a concrete monad in some places? #1297
Comments
I kind of like the idea, though only for big important functions that aren't moving anywhere, e.g. For smaller functions I like the current setup, it means they can be shared and called in different contexts. |
This (ongoing) discussion on r/haskell is pretty related.
This has changed now with GHC-8's redundant constraint warnings |
There are two aspects to this that I see:
The general refactorings I've been doing are naturally encroaching on this, so I'll likely open a PR after the Stack.Prelude change is merged in. |
As pointed out by mrkkrp here, many functions with rather generic signatures could instead specify a concrete monad.
I'm thinking this could aid in clarity and probably run a little faster (though I doubt it'd make a substantial difference). While it's cool that you can tell which aspects of the reader environment a function depends on, we don't always use a minimal set of constraints, and there are no warnings for unnecessary constraints. In practice, I don't really find myself consulting the list much, I mostly ignore it.
The text was updated successfully, but these errors were encountered: