@@ -1,3 +1,5 @@
1+{-# LANGUAGE OverlappingInstances #-}
1module Pkg.PParser where
3module Pkg.PParser where
3import Text.Trifecta hiding (span, stringLiteral, charLiteral, natural, symbol, char, string, whiteSpace)
5import Text.Trifecta hiding (span, stringLiteral, charLiteral, natural, symbol, char, string, whiteSpace)
@@ -27,6 +29,10 @@ data PkgDesc = PkgDesc { pkgname :: String,
28 deriving Show
30 deriving Show
32+instance TokenParsing PParser where
33+ someSpace = many (simpleWhiteSpace <|> singleLineComment <|> multiLineComment) *> pure ()
30defaultPkg = PkgDesc "" [] [] Nothing [] "" [] (sUN "") Nothing
36defaultPkg = PkgDesc "" [] [] Nothing [] "" [] (sUN "") Nothing
32parseDesc :: FilePath -> IO PkgDesc
38parseDesc :: FilePath -> IO PkgDesc
@@ -78,6 +84,4 @@ pClause = do reserved "executable"; lchar '=';
78 mk <- iName []
84 mk <- iName []
80 put (st { makefile = Just (show mk) })
86 put (st { makefile = Just (show mk) })
81− <|> do string "--"; many (satisfy (not . isEol)) ; satisfy isEol