purescript icon indicating copy to clipboard operation
purescript copied to clipboard

Remove base-compat as a dependency

Open purefunctor opened this issue 3 years ago • 4 comments

Summary

If I understand correctly, base-compat was originally introduced as it was possible to compile PureScript over a range of GHC versions. More specifically, it gets rid of the CPP directives needed to get the compiler to build with both GHC 7.x and 8.x (#1610); currently though, we only build the compiler using 9.2.3 and a specific version of the package set, effectively nullfying base-compat's use case.

Are there any other implications that this change would entail?

purefunctor avatar Aug 03 '22 08:08 purefunctor

I wouldn't know. If there aren't any other implications, then this change should be made.

JordanMartinez avatar Aug 03 '22 18:08 JordanMartinez

I guess one thing to consider is cleaning up imports now that we'll be using Protolude everywhere. There's also some code that'd have to be changed but I don't think it's necessarily drastic.

purefunctor avatar Aug 04 '22 16:08 purefunctor

There's also some code that'd have to be changed but I don't think it's necessarily drastic.

Which code is that?

JordanMartinez avatar Aug 04 '22 23:08 JordanMartinez

Protolude defines some functions differently, like show, so some usages of it need a type annotation to build like the following: https://github.com/purescript/purescript/blob/0b5a87e08f77ce90884a8696f15ef87d725879c9/src/Language/PureScript/Bundle.hs#L114-L119

Protolude also re-exports a lot more stuff by default so some modules would complain about redundant imports as well.

purefunctor avatar Aug 05 '22 01:08 purefunctor