@@ -17,6 +17,7 @@ import Util.DynamicLinker
1717import System.Console.Haskeline
1818import System.IO
1919
20+import Control.Applicative
2021import Control.Monad.State
2122import Control.Monad.Error(throwError)
2223
@@ -1663,7 +1664,11 @@ findStatics ist tm = trace (show tm) $
16631664 pos ns ss t = return t
16641665
16651666-- for 6.12/7 compatibility
1666−data EitherErr a b = LeftErr a | RightOK b
1667+data EitherErr a b = LeftErr a | RightOK b deriving ( Functor )
1668+
1669+instance Applicative (EitherErr a) where
1670+ pure = return
1671+ (<*>) = ap
16671672
16681673instance Monad (EitherErr a) where
16691674 return = RightOK