Don't import Safe ST modules for modern versions of base#23
Conversation
Update .gitignore
|
Hello. Deprecated != unusable. People who opt for deprecated stuff in base should be able to use it with transformers-base. Why not simply guard code that breaks MicroHs with an |
Sure, but it means that it might be removed in the future.
I'm not sure I understand.
I could do that, if you insist, but I don't see why that would be better. |
|
Ah, missed the same types bit. Could you keep the imports inside #if MIN_VERSION_base(4,4,0)
# if MIN_VERSION_base(4,8,0)
import qualified Control.Monad.ST.Lazy as L
import qualified Control.Monad.ST.Strict as S
# else
import qualified Control.Monad.ST.Lazy.Safe as L
import qualified Control.Monad.ST.Safe as S
# endif
#endif? |
|
Like this? |
|
Uploaded new version to Hackage. Thanks. |
Control.Monad.ST.SafeandControl.Monad.ST.Lazy.Safeare deprecated sincebase-4.8, so only import them for olderbaseversions. I think it would be reasonable to drop support forbase < 4.8, as that would allow to get rid of a bunch of CPP, but I have not done that in this PR.With this change,
transformers-basecompiles with MicroHs, so update the.gitignoreto also matchdist-mcabal.