purescript-suggest icon indicating copy to clipboard operation
purescript-suggest copied to clipboard

Some warnings not getting fixed

Open iamnewspecies opened this issue 7 years ago • 3 comments

Warnings mentioned below are not getting fixed

  • There is an existing import of X.Y.Z, consider merging the import lists
  • Import list contains multiple references to type A
  • The import of module B.C contains the following unused references:
  • Duplicate import
  • Export list contains multiple references to type PositiveInt
import Data.Options (Options(..), options)
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  The import of type Options from module Data.Options includes data constructors but only the type is used
  It could be replaced with:

    import Data.Options (Options, options)
  • The import of module Unsafe.Coerce is redundant
Module Prelude has unspecified imports, consider using the explicit form:

    import Prelude (class Applicative, class Apply, class Bind, class Functor, class Monad, class Semigroup, type (~>), Unit, void, (<<<))

Am I missing some flag? I am using the following command pulp build -- --stash --censor-lib --json-errors 2>&1 | ps-suggest --apply

iamnewspecies avatar Sep 27 '18 06:09 iamnewspecies

Some warnings are being fixed though?

nwolverson avatar Sep 27 '18 13:09 nwolverson

I used pscid (which internally uses purescript-suggest). Every time I went to particular file and saved it, it would work. Before this I ran purescript-suggest three times after which it stopped suggesting any changes. And I still got warnings mentioned above.

I am going through my commit history to see what all got fixed in those three runs.

iamnewspecies avatar Sep 28 '18 07:09 iamnewspecies

I think most of the above warnings should be fixable, with the exception of

  • Existing import, merge import lists
  • Duplicates in export list

I'd suggest touching source files/clearing output and running again - redirect the output of the json errors build to a file, and attach an excerpt here of errors that should be fixed. I imagine in most cases if you did what you said above, either the stashed errors are stale, or the compiler is not outputting a fixable error.

nwolverson avatar Sep 28 '18 07:09 nwolverson