uuagc-cabal 1.0.0.4 → 1.0.0.5
raw patch · 2 files changed
+7/−8 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
src/Distribution/Simple/UUAGC/Parser.hs view
@@ -1,4 +1,4 @@-{-# OPTIONS_GHC -XScopedTypeVariables #-}+{-# LANGUAGE ScopedTypeVariables #-} module Distribution.Simple.UUAGC.Parser(parserAG, parserAG', scanner,@@ -14,11 +14,10 @@ import System.IO(hPutStr,stderr) import Control.Monad.Error -data (Show a) => ParserError a = ParserError a- | DefParserError String+data ParserError = DefParserError String deriving (Show, Eq, Read) -instance Error (ParserError a) where+instance Error ParserError where strMsg x = DefParserError x -- import Control.Exception@@ -116,7 +115,7 @@ <*> (pKey "options" *> pSep *> pCommas pAnyFlag) pAGFileOption :: Parser Token AGFileOption-pAGFileOption = AGFileOption <$> (pKey "file" *> pSep *> pString) +pAGFileOption = AGFileOption <$> (pKey "file" *> pSep *> pString) <*> pFileClasses <*> (pKey "options" *> pSep *> pCommas pAnyFlag) @@ -130,14 +129,14 @@ parserAG fp = do s <- readFile fp parseIOAction action pAGFileOptions (scanner fp s) -parserAG' :: FilePath -> IO (Either (ParserError String) AGFileOptions)+parserAG' :: FilePath -> IO (Either ParserError AGFileOptions) parserAG' fp = do s <- readFile fp let steps = parse pAGFileOptions (scanner fp s) let (Pair res _, mesg) = evalStepsMessages steps if null mesg then return $ Right res else do let err = foldr (++) [] $ map message2error mesg- return (Left $ ParserError err) + return (Left $ DefParserError err) message2error :: Message Token (Maybe Token) -> String message2error (Msg e p a) = "Expecting: " ++ (show e) ++ " at " ++ action
uuagc-cabal.cabal view
@@ -1,7 +1,7 @@ cabal-version: >=1.8 build-type: Simple name: uuagc-cabal-version: 1.0.0.4+version: 1.0.0.5 license: BSD3 license-file: LICENSE maintainer: Arie Middelkoop <ariem@cs.uu.nl>