Simple fix for the error in login parsing.

caa
Philippe Pittoli 2024-11-08 00:37:57 +01:00
parent da2a26825a
commit 409e7246e0
1 changed files with 2 additions and 1 deletions

View File

@ -4,6 +4,7 @@ import Prelude
import Control.Alt ((<|>)) import Control.Alt ((<|>))
import Data.Either (Either(..)) import Data.Either (Either(..))
import Data.Array as A
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
import Data.Validation.Semigroup (V, invalid, toEither) import Data.Validation.Semigroup (V, invalid, toEither)
@ -33,7 +34,7 @@ login_parser :: G.Parser LoginParsingError String
login_parser = do login_parser = do
input <- G.current_input input <- G.current_input
_ <- (alpha <|> digit) G.<:> \_ -> CannotParse _ <- (alpha <|> digit) G.<:> \_ -> CannotParse
_ <- G.many1 (alpha <|> digit <|> G.char ' ' <|> G.char '_' <|> G.char '\'' <|> G.char '-') G.<:> \_ -> CannotParse _ <- A.many (alpha <|> digit <|> G.char ' ' <|> G.char '_' <|> G.char '\'' <|> G.char '-')
_ <- SomeParsers.eof G.<:> \_ -> CannotEntirelyParse _ <- SomeParsers.eof G.<:> \_ -> CannotEntirelyParse
let last_char_correct = G.parse_last_char input.string (alpha <|> digit) let last_char_correct = G.parse_last_char input.string (alpha <|> digit)
pos <- G.current_position pos <- G.current_position