diff options
| author | hallgren <hallgren@chalmers.se> | 2014-08-13 22:16:18 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2014-08-13 22:16:18 +0000 |
| commit | cd5193b7e19e7ff5e49cdeafe149fdeec8e19fb0 (patch) | |
| tree | c006a3b453b8b290b09379cf5cb2777421558e70 /src/compiler/GF/Grammar | |
| parent | a06351b6250dd456299565f13eba6ed02dd2a07b (diff) | |
Fix warnings in 16 modules, mostly forward compatibility warnings from GHC 7.8
Diffstat (limited to 'src/compiler/GF/Grammar')
| -rw-r--r-- | src/compiler/GF/Grammar/Lexer.x | 9 |
1 files changed, 9 insertions, 0 deletions
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 |
