diff --git a/src/parz/combinators.gleam b/src/parz/combinators.gleam index 19e45b5..b6556a8 100644 --- a/src/parz/combinators.gleam +++ b/src/parz/combinators.gleam @@ -150,7 +150,7 @@ pub fn map(parser: Parser(a), transform) { fn(input) { case parser(input) { Error(err) -> Error(err) - Ok(ok) -> Ok(#(transform(ok.matched), ok.remaining)) + Ok(ok) -> Ok(ParserState(transform(ok.matched), ok.remaining)) } } } diff --git a/test/combinators_test.gleam b/test/combinators_test.gleam index 8ef1421..c3ddb3d 100644 --- a/test/combinators_test.gleam +++ b/test/combinators_test.gleam @@ -195,11 +195,11 @@ pub fn map_test() { run(parser, "[hello]") |> should.be_ok - |> should.equal(#(Content("[hello]"), "")) + |> should.equal(ParserState(Content("[hello]"), "")) run(parser, "[hello]x") |> should.be_ok - |> should.equal(#(Content("[hello]"), "x")) + |> should.equal(ParserState(Content("[hello]"), "x")) run(parser, "[hellox") |> should.be_error