phadej / cabal-extras

A tool suite to aid Haskell development using `cabal-install`
80 stars 18 forks source link

cabal-diff: instance deletions not reported #93

Open harendra-kumar opened 3 years ago

harendra-kumar commented 3 years ago

We deleted all type class instances of the Fold type present in release 0.7.3 except Functor, in the new release on master branch. The Fold type is exported through the Streamly.Data.Fold module. These instance deletions are not reported by cabal-diff.

phadej commented 3 years ago

AFAICS, you also moved the module:

@@@ Streamly.Internal.Data.Fold.Type
++ data Fold m a b
++ data Fold2 m c a b
++ data GenericRunner sL sR bL bR
++ data ManyState s1 s2
++ data Step s b
++ instance (GHC.Show.Show a, GHC.Show.Show b) => GHC.Show.Show (Streamly.Internal.Data.Fold.Type.Tuple'Fused a b) 
++ instance Data.Bifunctor.Bifunctor Streamly.Internal.Data.Fold.Type.Step 
++ instance GHC.Base.Functor (Streamly.Internal.Data.Fold.Type.Step s) 
++ instance GHC.Base.Functor m => GHC.Base.Functor (Streamly.Internal.Data.Fold.Type.Fold m a) 
...
@@@ Streamly.Internal.Data.Fold.Types
-- data Fold m a b
-- data Fold2 m c a b
-- instance (GHC.Base.Monad m, GHC.Float.Floating b) => GHC.Float.Floating (Streamly.Internal.Data.Fold.Types.Fold m a b) 
-- instance (GHC.Base.Monad m, GHC.Num.Num b) => GHC.Num.Num (Streamly.Internal.Data.Fold.Types.Fold m a b) 
-- instance (GHC.Base.Monad m, GHC.Real.Fractional b) => GHC.Real.Fractional (Streamly.Internal.Data.Fold.Types.Fold m a b) 
-- instance (GHC.Base.Semigroup b, GHC.Base.Monad m) => GHC.Base.Semigroup (Streamly.Internal.Data.Fold.Types.Fold m a b) 
-- instance (GHC.Base.Semigroup b, GHC.Base.Monoid b, GHC.Base.Monad m) => GHC.Base.Monoid (Streamly.Internal.Data.Fold.Types.Fold m a b) 
-- instance GHC.Base.Applicative m => GHC.Base.Applicative (Streamly.Internal.Data.Fold.Types.Fold m a) 
-- instance GHC.Base.Functor m => GHC.Base.Functor (Streamly.Internal.Data.Fold.Types.Fold m a) 

For me it looks like the instance removal is reported.

phadej commented 3 years ago

Also, I'm sorry to say that, but I'm overwhelmed by the amount of issues you opened.

harendra-kumar commented 3 years ago

No, the movement is of an internal module. The exposed module is Streamly.Data.Fold which imports the internal module and re-exports the type. The change should also be reported in Streamly.Data.Fold.

harendra-kumar commented 3 years ago

Also, I'm sorry to say that, but I'm overwhelmed by the amount of issues you opened.

I am just trying to use the tool and recording the issues I am facing so that it can be improved. There is no expectation of an immediate response. Thanks for the quick responses though. The tool is already very useful.

harendra-kumar commented 3 years ago

Also, I am not sure why it is showing fully qualified types in instance reporting and not in other signatures.

phadej commented 3 years ago

The change should also be reported in Streamly.Data.Fold.

If they are not recorded in hoogle.txt (and they probably aren't, instances are tricky). I don't know if not_home orhide haddock annotations (https://www.haskell.org/haddock/doc/html/module-attributes.html) would change the fact.

Also, I am not sure why it is showing fully qualified types in instance reporting and not in other signatures.

that's how hoogle.txt works, it qualifies all non-local names so linking would work correctly. I unfortunately don't know the details.

harendra-kumar commented 3 years ago

I don't know if not_home orhide haddock annotations (https://www.haskell.org/haddock/doc/html/module-attributes.html) would change the fact.

I tried they don't work.