ndmitchell / extra

Extra Haskell functions
Other
93 stars 37 forks source link

Hide conflicting strict functions from base-4.15. #67

Closed galenhuntington closed 4 years ago

galenhuntington commented 4 years ago

This package fails to build under GHC 9 because the strict functions added to System.IO in https://gitlab.haskell.org/ghc/ghc/-/merge_requests/1918 conflict with those defined and then used in System.IO.Extra, producing ambiguous occurrence errors. The simple solution is just to hide the functions in question in the import.

In the long run, these Extra functions can probably be deprecated and ultimately removed now that they duplicate functionality available in base, although I guess it's possible their behavior isn't exactly the same. That would of course be a breaking change.

ndmitchell commented 4 years ago

Thanks! The standard strategy is to have System.IO.Extra reexport System.IO, and then make readFile' be the 9.0 version on newer versions, and the old version for older ones. I've just pushed a patch for that. Can you confirm HEAD works with GHC 9.0 HEAD and then I'll make a release.

galenhuntington commented 4 years ago

Yes, HEAD (df1c97c) built without errors on ghc-9.0.0.20200821.

ndmitchell commented 4 years ago

Thanks - I've released 1.7.7 so it works now.