BNFC / bnfc

BNF Converter
http://bnfc.digitalgrammars.com/
586 stars 165 forks source link

Haskell printer generator should not use deprecated OverlappingInstances extension #233

Closed andreasabel closed 5 years ago

andreasabel commented 6 years ago

Haskell printer generator should not use the deprecated OverlappingInstances extension on recent GHCs. E.g., on ghc-8.2:

CPP/Print.hs:1:33: warning:
    -XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS
  |
1 | {-# LANGUAGE FlexibleInstances, OverlappingInstances #-}
  |                                 ^^^^^^^^^^^^^^^^^^^^

For backwards compatiblity, we could use #if pragmas.

From ghc-8.6 on, OverlappingInstances may trigger an error.

andreasabel commented 5 years ago

I am changing the Haskell backend to use the {-# OVERLAPPABLE #-} pragma. As a consequence, BNFC-2.8.3 will only work for GHC >= 7.10.