Simple fix for the error in login parsing.
parent
da2a26825a
commit
409e7246e0
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue