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

Add support for user defined warnings via the Warn type class #2569

Merged
merged 2 commits into from
Jan 15, 2017
Merged

Add support for user defined warnings via the Warn type class #2569

merged 2 commits into from
Jan 15, 2017

Conversation

LiamGoodacre
Copy link
Member

For #2564

[ "The Warn type class allows a custom compiler warning to be displayed."
, ""
, "For more information, see"
, "[the Custom Type Errors guide](https://github.com/purescript/documentation/blob/master/guides/Custom-Type-Errors.md)."
Copy link
Member Author

Choose a reason for hiding this comment

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

I'm currently writing a quick overview of the feature for this page - I'll submit a PR to the docs repo when this one is merged.

Copy link
Member Author

Choose a reason for hiding this comment

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

@LiamGoodacre
Copy link
Member Author

Example output:

Compiling Main
[1/1 UserDefinedWarning] src/Main.purs:10:1

  10  bar :: Int
      ^^^^^^^^^^

  A custom warning occurred while solving type class constraints:

    "Bananas"

  in value declaration bar

           Src   Lib   All
Warnings   1     0     1
Errors     0     0     0
* Build successful.

Note that the message isn't printing in the right format due to #2568

@damncabbage
Copy link
Contributor

Nice!

Copy link
Contributor

@paf31 paf31 left a comment

Choose a reason for hiding this comment

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

Thanks, this looks great!

@paf31 paf31 merged commit b70aabf into purescript:master Jan 15, 2017
@LiamGoodacre LiamGoodacre deleted the feature/user-defined-warnings branch January 15, 2017 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants