mirror of
https://github.com/IHaskell/IHaskell.git
synced 2025-04-15 19:06:06 +00:00
Only import and run htmlify for GHC >= 8.4.0
This commit is contained in:
parent
7a8d728ad1
commit
57fa0fe504
@ -61,6 +61,7 @@ library
|
||||
|
||||
if impl (ghc >= 8.4)
|
||||
ghc-options: -Wpartial-fields
|
||||
build-depends: ghc-syntax-highlighter
|
||||
|
||||
build-depends:
|
||||
base >=4.9 && <4.19,
|
||||
@ -72,7 +73,6 @@ library
|
||||
filepath ,
|
||||
ghc >=8.0 && <9.7,
|
||||
ghc-boot ,
|
||||
ghc-syntax-highlighter,
|
||||
haskeline ,
|
||||
parsec ,
|
||||
process ,
|
||||
|
@ -98,7 +98,6 @@ import IHaskell.Types
|
||||
import IHaskell.IPython
|
||||
import IHaskell.Eval.Parser
|
||||
import IHaskell.Display
|
||||
import IHaskell.Eval.Evaluate.HTML (htmlify)
|
||||
import qualified IHaskell.Eval.Hoogle as Hoogle
|
||||
import IHaskell.Eval.Util
|
||||
import IHaskell.BrokenPackages
|
||||
@ -108,6 +107,10 @@ import StringUtils (replace, split, strip, rstrip)
|
||||
import IHaskell.Eval.Lint
|
||||
#endif
|
||||
|
||||
#if MIN_VERSION_ghc(8,4,0)
|
||||
import IHaskell.Eval.Evaluate.HTML (htmlify)
|
||||
#endif
|
||||
|
||||
#if MIN_VERSION_ghc(9,0,0)
|
||||
import GHC.Data.FastString
|
||||
#elif MIN_VERSION_ghc(8,2,0)
|
||||
@ -938,9 +941,11 @@ evalCommand _ (Directive GetInfo str) state = safely state $ do
|
||||
{ evalStatus = Success
|
||||
, evalResult = Display [
|
||||
plain strings
|
||||
#if MIN_VERSION_ghc(8,4,0)
|
||||
, htmlify (Text.pack <$> htmlCodeWrapperClass state)
|
||||
(Text.pack $ htmlCodeTokenPrefix state)
|
||||
strings
|
||||
#endif
|
||||
]
|
||||
, evalState = state
|
||||
, evalPager = []
|
||||
|
Loading…
x
Reference in New Issue
Block a user