Adapt to new GHC modules organization
parent
1063a72bdb
commit
0121227a1a
|
@ -33,7 +33,13 @@ import qualified Lexer as GHC
|
|||
import qualified StringBuffer as GHC
|
||||
import qualified Outputable as GHC
|
||||
import qualified CmdLineParser as GHC
|
||||
|
||||
#if MIN_VERSION_ghc(8,10,1) /* ghc-8.10.1 */
|
||||
import GHC.Hs
|
||||
#else
|
||||
import HsSyn
|
||||
#endif
|
||||
|
||||
import SrcLoc ( SrcSpan, Located )
|
||||
|
||||
|
||||
|
|
|
@ -13,9 +13,13 @@ where
|
|||
|
||||
-- rather project-specific stuff:
|
||||
---------------------------------
|
||||
#if MIN_VERSION_ghc(8,10,1) /* ghc-8.10.1 */
|
||||
import GHC.Hs.Extension as E ( GhcPs )
|
||||
#else
|
||||
# if MIN_VERSION_ghc(8,4,0) /* ghc-8.4 */
|
||||
import HsExtension as E ( GhcPs )
|
||||
#endif
|
||||
# endif /* ghc-8.4 */
|
||||
#endif /* ghc-8.10.1 */
|
||||
|
||||
import RdrName as E ( RdrName )
|
||||
#if MIN_VERSION_ghc(8,8,0)
|
||||
|
|
|
@ -59,9 +59,13 @@ import Language.Haskell.Brittany.Internal.Config.Types
|
|||
import Language.Haskell.Brittany.Internal.Types
|
||||
|
||||
import qualified Data.Generics.Uniplate.Direct as Uniplate
|
||||
#if MIN_VERSION_ghc(8,10,1) /* ghc-8.10.1 */
|
||||
import qualified GHC.Hs.Extension as HsExtension
|
||||
#else
|
||||
# if MIN_VERSION_ghc(8,4,0) /* ghc-8.4 */
|
||||
import qualified HsExtension
|
||||
#endif
|
||||
# endif /* ghc-8.4 */
|
||||
#endif /* ghc-8.10.1 */
|
||||
|
||||
|
||||
|
||||
|
@ -299,6 +303,10 @@ lines' s = case break (== '\n') s of
|
|||
(s1, [_]) -> [s1, ""]
|
||||
(s1, (_:r)) -> s1 : lines' r
|
||||
|
||||
#if MIN_VERSION_ghc(8,10,1) /* ghc-8.10.1 */
|
||||
absurdExt :: HsExtension.NoExtField -> a
|
||||
absurdExt = error "cannot construct NoExtField"
|
||||
#else
|
||||
#if MIN_VERSION_ghc(8,6,0) /* ghc-8.6 */
|
||||
-- | A method to dismiss NoExt patterns for total matches
|
||||
absurdExt :: HsExtension.NoExt -> a
|
||||
|
@ -306,4 +314,5 @@ absurdExt = error "cannot construct NoExt"
|
|||
#else
|
||||
absurdExt :: ()
|
||||
absurdExt = ()
|
||||
#endif
|
||||
#endif /* ghc-8.6 */
|
||||
#endif /* ghc-8.10.1 */
|
||||
|
|
Loading…
Reference in New Issue