snoyberg / mono-traversable

Type classes for mapping, folding, and traversing monomorphic containers
152 stars 61 forks source link

ListT should be deprecated #203

Open ocramz opened 2 years ago

ocramz commented 2 years ago

Getting deprecation warnings when compiling with GHC 8.10.7

mono-traversable      > /private/var/folders/jt/62x9h30j52qbj_r1t6708mx40000gn/T/stack-8f5626c1176b4af3/mono-traversable-1.0.15.3/src/Data/MonoTraversable.hs:213:36: warning: [-Wdeprecations]
mono-traversable      >     In the use of type constructor or class ‘ListT’
mono-traversable      >     (imported from Control.Monad.Trans.List):
mono-traversable      >     Deprecated: "This transformer is invalid on most monads"
mono-traversable      >     |   
mono-traversable      > 213 | instance Functor m => MonoFunctor (ListT m a)
mono-traversable      >     |                                    ^^^^^
mono-traversable      >         
mono-traversable      > /private/var/folders/jt/62x9h30j52qbj_r1t6708mx40000gn/T/stack-8f5626c1176b4af3/mono-traversable-1.0.15.3/src/Data/MonoTraversable.hs:793:40: warning: [-Wdeprecations]
mono-traversable      >     In the use of type constructor or class ‘ListT’
mono-traversable      >     (imported from Control.Monad.Trans.List):
mono-traversable      >     Deprecated: "This transformer is invalid on most monads"
mono-traversable      >     |   
mono-traversable      > 793 | instance F.Foldable f => MonoFoldable (ListT f a)
mono-traversable      >     |                                        ^^^^^
mono-traversable      >         
mono-traversable      > /private/var/folders/jt/62x9h30j52qbj_r1t6708mx40000gn/T/stack-8f5626c1176b4af3/mono-traversable-1.0.15.3/src/Data/MonoTraversable.hs:1056:44: warning: [-Wdeprecations]
mono-traversable      >     In the use of type constructor or class ‘ListT’
mono-traversable      >     (imported from Control.Monad.Trans.List):
mono-traversable      >     Deprecated: "This transformer is invalid on most monads"
mono-traversable      >      |  
mono-traversable      > 1056 | instance Traversable f => MonoTraversable (ListT f a)
andreasabel commented 2 years ago

I suppose the end-user of ListT will also get such warnings. If they choose to ignore them, they should still be able to mono-traverse ListT.
I would think it is sufficient to remove support for ListT once it is actually removed upstream (rather than just being deprecated).