Skip to content

Commit 5aebdad

Browse files
langston-barrettgallais
authored andcommitted
accept unicode minus sign for integers
1 parent 94fdcc9 commit 5aebdad

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Text/Parser/Numbers.agda

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ module _ {M : Set → Set} {{𝕄 : RawMonadPlus M}}
2929
convert = NonEmpty.foldl (λ ih v ih ℕ.* 10 ℕ.+ v) id
3030

3131
decimalℤ : [ Parser Char Chars M ℤ ]
32-
decimalℤ = uncurry convert <$> (exact '-' <?&> decimalℕ) where
32+
decimalℤ = uncurry convert <$> (anyOf ('-''−' ∷ []) <?&> decimalℕ) where
3333
convert = λ s maybe′ (const (-_)) id s ∘′ +_
3434

0 commit comments

Comments
 (0)