Skip to content

Prevent stylish-haskell errors #401

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

Closed
ivan-m opened this issue Dec 18, 2014 · 3 comments · Fixed by #557
Closed

Prevent stylish-haskell errors #401

ivan-m opened this issue Dec 18, 2014 · 3 comments · Fixed by #557
Assignees

Comments

@ivan-m
Copy link
Contributor

ivan-m commented Dec 18, 2014

With haskell-stylish-on-save set to t and something that stylish-haskell can't parse (via haskell-src-exts) in a buffer, e.g.

{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE MultiParamTypeClasses #-}

class Foo c a where

  bar :: (c a) => a -> a

every time the buffer is saved the *Warnings* buffer pops up (typically overriding another buffer I had open, thus forcing me to change it back) with a parse error from stylish-haskell.

Is there a way to prevent this? It seems that this is because of the explicit call to display-warnings in

(display-warning cmd (apply 'format fmt args) :warning))))

@purcell
Copy link
Member

purcell commented Dec 18, 2014

Yeah, I want this myself. I think it's reasonable to just ignore error output from stylish because if the buffer is unparsable, the user is going to be getting clearer feedback about it from another tool, e.g. flycheck, or trying to load it in ghci.

@rietmann
Copy link
Contributor

rietmann commented Jan 7, 2015

I figured out a fix for this: M-x customize-group, warnings

Then switch the Warning Minimum Level: from :warning to :error.

Or in init.el
(custom-set-variables
`(warning-minimum-level :error))

@gracjan
Copy link
Contributor

gracjan commented Mar 27, 2015

@ivan-m, @purcell, @rietmann: can you check if referenced commit fixes your issue?

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 a pull request may close this issue.

5 participants