From cd5193b7e19e7ff5e49cdeafe149fdeec8e19fb0 Mon Sep 17 00:00:00 2001 From: hallgren Date: Wed, 13 Aug 2014 22:16:18 +0000 Subject: Fix warnings in 16 modules, mostly forward compatibility warnings from GHC 7.8 --- src/compiler/GF/Grammar/Lexer.x | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/compiler/GF/Grammar') diff --git a/src/compiler/GF/Grammar/Lexer.x b/src/compiler/GF/Grammar/Lexer.x index 681ae9024..c2cbb4c47 100644 --- a/src/compiler/GF/Grammar/Lexer.x +++ b/src/compiler/GF/Grammar/Lexer.x @@ -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 -- cgit v1.2.3