Remove private tags from parser package

This commit is contained in:
Ayaz Hafiz 2022-04-22 17:11:01 -04:00
parent ee30b85430
commit f630536f5c
No known key found for this signature in database
GPG Key ID: 0E2A37416A25EF58
2 changed files with 8 additions and 14 deletions

View File

@ -17,10 +17,7 @@ interface Parser
exposes [ Parser ]
imports []
Parser a :
[
@Parser (Bytes -> Result { answer : a, rest : Bytes } Problem)
]
Parser a := Bytes -> Result { answer : a, rest : Bytes } Problem
Problem :
[

View File

@ -19,10 +19,7 @@ interface Parser
exposes [ Parser ]
imports []
Parser a :
[
@Parser (Str -> Result { answer : a, rest : Str } RawProblem),
]
Parser a := Str -> Result { answer : a, rest : Str } RawProblem
Problem :
[
@ -51,16 +48,16 @@ keep : Parser a, (a -> Parser b) -> Parser b
skip : Parser *, ({} -> Parser b) -> Parser b
symbol : Str -> Parser {}
symbol = \symbol -> @Parser Str.chompStr symbol
symbol = \symbol -> $Parser Str.chompStr symbol
u8 : Parser U8
u8 = @Parser Str.parseU8
u8 = $Parser Str.parseU8
i8 : Parser I8
i8 = @Parser Str.parseI8
i8 = $Parser Str.parseI8
end : Parser {}
end = @Parser \str ->
end = $Parser \str ->
if Str.isEmpty str then
Ok {}
else
@ -68,7 +65,7 @@ end = @Parser \str ->
lazy : ({} -> Parser a) -> Parser a
lazy = \thunk ->
@Parser \str ->
@Parser parse = thunk {}
$Parser \str ->
$Parser parse = thunk {}
parse str