X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Text%2FParserCombinators%2FReadPrec.hs;h=f282d1af45e46d4e56617899a0c80921b3cfa068;hb=41e8fba828acbae1751628af50849f5352b27873;hp=88b5678be29ed845a57ffc0db6055ceb3be5ad58;hpb=10de2c656f74562b662c22928be85e1b3ccda796;p=ghc-base.git diff --git a/Text/ParserCombinators/ReadPrec.hs b/Text/ParserCombinators/ReadPrec.hs index 88b5678..f282d1a 100644 --- a/Text/ParserCombinators/ReadPrec.hs +++ b/Text/ParserCombinators/ReadPrec.hs @@ -1,4 +1,5 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Text.ParserCombinators.ReadPrec @@ -68,7 +69,7 @@ import GHC.Base -- --------------------------------------------------------------------------- -- The readPrec type -newtype ReadPrec a = P { unP :: Prec -> ReadP a } +newtype ReadPrec a = P (Prec -> ReadP a) -- Functor, Monad, MonadPlus @@ -104,7 +105,7 @@ step (P f) = P (\n -> f (n+1)) reset :: ReadPrec a -> ReadPrec a -- ^ Resets the precedence context to zero. -reset (P f) = P (\n -> f minPrec) +reset (P f) = P (\_ -> f minPrec) prec :: Prec -> ReadPrec a -> ReadPrec a -- ^ @(prec n p)@ checks whether the precedence context is