finally setup an LSP - fixed all warnings
This commit is contained in:
@@ -3,9 +3,7 @@ module Monpar where
|
||||
|
||||
import qualified Control.Applicative as Ap
|
||||
import Control.Applicative ((<|>), Alternative, many, some)
|
||||
import Data.Char (isDigit, digitToInt)
|
||||
import Control.Monad ( MonadPlus(mzero), void )
|
||||
import Text.Printf (printf)
|
||||
import Control.Monad ( MonadPlus(mzero))
|
||||
newtype Parser a = Parser {runParser :: String -> [(a, String)]}
|
||||
|
||||
instance Functor Parser where
|
||||
@@ -59,8 +57,8 @@ char c = sat (== c)
|
||||
string :: String -> Parser String
|
||||
string "" = return ""
|
||||
string (x:xs) = do
|
||||
char x
|
||||
string xs
|
||||
_ <- char x
|
||||
_ <- string xs
|
||||
return (x:xs)
|
||||
|
||||
eof :: Parser ()
|
||||
@@ -78,4 +76,4 @@ word = neWord <|> return ""
|
||||
return $ x:xs
|
||||
|
||||
manyTill :: Parser a -> Parser b -> Parser [a]
|
||||
manyTill p q = (q >> return []) <++ do { x <- p; xs <- manyTill p q; return $ x:xs }
|
||||
manyTill p q = (q >> return []) <++ do { x <- p; xs <- manyTill p q; return $ x:xs }
|
||||
|
||||
Reference in New Issue
Block a user