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
Add a bunch of warnings flags, expose an Internal module #99
Conversation
#if MIN_VERSION_servant(0,16,0) | ||
import Servant.Client.Core (AuthClientData, AuthenticatedRequest, Request, mkAuthenticatedRequest, addHeader) | ||
#else | ||
import Servant.Client.Core.Internal.Auth | ||
import Servant.Client.Core (Request, addHeader) | ||
#endif | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dropped the old versions since I don't sincerely believe that we are likely to correctly support them.
@@ -369,50 +328,6 @@ apiTest_ | |||
= | |||
client (Proxy :: Proxy Api) | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this code block was moved to Web.Slack.Internal
-- Requires explicit imports of _every_ function (e.g. '$'); too strict | ||
-Wno-missing-import-lists |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Purescript they thought about this. They allow you to have exactly zero or one unqualified import that doesn't have an explicit import list 😆
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clever!
I just copied the Mercury list :p
, mono-traversable | ||
, classy-prelude |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i really hate these libraries <.<
@@ -1,7 +1,6 @@ | |||
{-# LANGUAGE DataKinds #-} | |||
{-# LANGUAGE OverloadedStrings #-} | |||
{-# LANGUAGE TypeFamilies #-} | |||
{-# LANGUAGE CPP #-} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yay!
{-# LANGUAGE DataKinds #-} | ||
{-# LANGUAGE OverloadedStrings #-} | ||
{-# LANGUAGE TypeFamilies #-} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think hlint
will tell you when a file has redundant language extensions. I'm not sure if it takes your `default-extensions into account.
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE TypeFamilies #-} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. Sorry I took a while, kept getting pulled away.
This is based on #99. This code is copied (with approval) from the Mercury codebase, with no code modifications except for making `SlackActionId` a `newtype` rather than a sum type.
The internal module is necessary to allow extending the library, and the warnings improve reliability.