finally setup an LSP - fixed all warnings

This commit is contained in:
2025-09-12 00:08:22 +01:00
parent e440585f90
commit ee1b739c0f
6 changed files with 32 additions and 38 deletions

View File

@@ -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 }