Skip to content

Commit 8074f67

Browse files
Maintenance: Improve compatibility with GCH 7.8
Define `displayException` for package `base` < 4.8 .
1 parent 1fbb815 commit 8074f67

File tree

1 file changed

+7
-0
lines changed
  • haskell/hyper-haskell-server

1 file changed

+7
-0
lines changed

haskell/hyper-haskell-server/Main.hs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{-----------------------------------------------------------------------------
22
HyperHaskell
33
------------------------------------------------------------------------------}
4+
{-# LANGUAGE CPP #-}
45
{-# LANGUAGE GADTSyntax, ExistentialQuantification, RankNTypes, ScopedTypeVariables #-}
56
{-# LANGUAGE OverloadedStrings #-}
67
module Main where
@@ -126,6 +127,12 @@ toInterpreterError e = case fromException e of
126127
Just e -> e
127128
Nothing -> UnknownError (displayException e)
128129

130+
#if MIN_VERSION_base(4,8,0)
131+
#else
132+
displayException :: SomeException -> String
133+
displayException = show
134+
#endif
135+
129136
-- | Haskell Interpreter.
130137
data Hint = Hint
131138
{ run :: forall a. Interpreter a -> IO (Result a)

0 commit comments

Comments
 (0)