ndmitchell / extra

Extra Haskell functions
Other
94 stars 37 forks source link

Future-proof against addition of Data.List.!? #101

Closed Bodigrim closed 1 year ago

Bodigrim commented 1 year ago

base-4.19 (and GHC 9.8) will export Data.List.!?, which will clash with Data.List.Extra.!? in https://github.com/ndmitchell/extra/blob/374ebbc12cb4b9580394556c5e5c7b1bf250d817/src/Data/List/Extra.hs#L164-L170

This PR wraps the definition of Data.List.Extra.!? in CPP to prevent the name clash.

See https://github.com/haskell/core-libraries-committee/issues/110#issuecomment-1359037078 for CLC discussion of the change.

ndmitchell commented 1 year ago

Thanks!