Simple fix for the error in login parsing.

This commit is contained in:
Philippe Pittoli 2024-11-08 00:37:57 +01:00
parent da2a26825a
commit 409e7246e0

View File

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