forked from GitHub/gf-core
Fix warnings in 16 modules, mostly forward compatibility warnings from GHC 7.8
This commit is contained in:
@@ -6,6 +6,8 @@ module GF.Grammar.Lexer
|
||||
, isReservedWord
|
||||
) where
|
||||
|
||||
import Control.Applicative
|
||||
import Control.Monad(ap)
|
||||
import GF.Infra.Ident
|
||||
--import GF.Data.Operations
|
||||
import qualified Data.ByteString.Char8 as BS
|
||||
@@ -258,6 +260,13 @@ data ParseResult a
|
||||
|
||||
newtype P a = P { unP :: AlexInput -> ParseResult a }
|
||||
|
||||
instance Functor P where
|
||||
fmap = (<$>)
|
||||
|
||||
instance Applicative P where
|
||||
pure = return
|
||||
(<*>) = ap
|
||||
|
||||
instance Monad P where
|
||||
return a = a `seq` (P $ \s -> POk a)
|
||||
(P m) >>= k = P $ \ s -> case m s of
|
||||
|
||||
Reference in New Issue
Block a user