Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Commit 521d58a

Browse files
committed
Add comment for parseNat, export parseHugeIntLiteral
1 parent ae6e154 commit 521d58a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Data/Json/Extended/Signature/Parse.purs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ module Data.Json.Extended.Signature.Parse
44
, parseBooleanLiteral
55
, parseDecimalLiteral
66
, parseIntLiteral
7+
, parseHugeIntLiteral
78
, parseStringLiteral
89
, parseArrayLiteral
910
, parseMapLiteral
@@ -105,6 +106,11 @@ parse1000
105106
hundreds x y z = x * 100 + y * 10 + z
106107
tens x y = x * 10 + y
107108

109+
-- | This is used for parsing both `Int` and `HugeInt` values so has some extra
110+
-- | arguments. The `n` value should be 10 in the appropriate type, used to
111+
-- | move the place of each digit that is parsed. The `Int -> n` function
112+
-- | should convert a digit to the appropriate type. The `Int` provided will
113+
-- | always be in the range 0 to 9 inclusive.
108114
parseNat
109115
m n
110116
. Monad m

0 commit comments

Comments
 (0)