SteParser.Lex: small simplification

fogti
Aug 22, 2024, 3:15 PM
TF4RCKCB6OSEDPP37HZUNY6EN5NLYVAQYSMLH3GYF55YP7ZDPMGAC

Dependencies

  • [2] GMGXNJEP add back more stuff from yanais
  • [3] BHEGMMXQ SteParser.Lex: use Natural instead of Int

Change contents

  • edit in core/lib/GardGround/Utils/SteParser/Lex.hs at line 39
    [2.4480]
    [2.4480]
    import Data.Maybe (isJust)
  • replacement in core/lib/GardGround/Utils/SteParser/Lex.hs at line 157
    [2.7992][2.7992:8051]()
    skipWhiteSpace = takeWithProperty IC.WhiteSpace >> pure ()
    [2.7992]
    [2.8051]
    skipWhiteSpace = fmap (const ()) $ takeWithProperty IC.WhiteSpace
  • replacement in core/lib/GardGround/Utils/SteParser/Lex.hs at line 165
    [2.8244][2.8244:8274]()
    Nothing -> return Nothing
    [2.8244]
    [2.8274]
    Nothing -> pure Nothing
  • replacement in core/lib/GardGround/Utils/SteParser/Lex.hs at line 169
    [2.8404][2.8404:8547]()
    case f fi of
    Nothing -> return Nothing
    Just x -> do
    shiftEnv (slen l, r)
    return . Just $ x
    [2.8404]
    [2.8547]
    do
    let fres = f fi
    (if isJust fres then shiftEnv (slen l, r) else pure ())
    pure fres