Skip to content

Commit 3df0c9d

Browse files
author
Serhii Khoma
committed
purs-tidy format-in-place src/**/*.purs test/**/*.purs
1 parent b0f03a1 commit 3df0c9d

File tree

2 files changed

+19
-17
lines changed

2 files changed

+19
-17
lines changed

src/JS/BigInt.purs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ import Type.Proxy (Proxy(..))
3737
foreign import data BigIntType
3838

3939
-- | FFI wrapper to parse a String into a BigInt.
40-
foreign import fromStringImpl
41-
a.
42-
(a Maybe a)
43-
Maybe a
44-
String
45-
Maybe BigInt
40+
foreign import fromStringImpl
41+
a
42+
. (a Maybe a)
43+
Maybe a
44+
String
45+
Maybe BigInt
4646

4747
-- | Parse a string into a `BigInt`. Returns `Nothing` if the parse fails.
4848
-- | Supports decimal, binary, octal, hexadecimal and exponentiation notations.
@@ -86,12 +86,12 @@ fromStringAs = fromStringAsImpl Just Nothing
8686
foreign import fromInt Int BigInt
8787

8888
-- | FFI wrapper to parse a Number into a BigInt.
89-
foreign import fromNumberImpl
90-
a.
91-
(a Maybe a)
92-
Maybe a
93-
Number
94-
Maybe BigInt
89+
foreign import fromNumberImpl
90+
a
91+
. (a Maybe a)
92+
Maybe a
93+
Number
94+
Maybe BigInt
9595

9696
-- | Convert a Number to a BigInt. The fractional part is truncated.
9797
fromNumber Number Maybe BigInt

test/Test/Main.purs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,12 @@ main = do
8181
assert $ fromString "10000000" == Just (fromInt 10000000)
8282
quickCheck $ \(TestBigInt a) -> (fromString <<< toString) a == Just a
8383

84-
quickCheck $ \(TestBigInt a) ->
85-
let radixes = [binary, octal, decimal, hexadecimal, base36]
86-
in un Conj $ flip foldMap radixes $ \r ->
87-
Conj $ (fromStringAs r $ toStringAs r a) == Just a
84+
quickCheck $ \(TestBigInt a) ->
85+
let
86+
radixes = [ binary, octal, decimal, hexadecimal, base36 ]
87+
in
88+
un Conj $ flip foldMap radixes $ \r ->
89+
Conj $ (fromStringAs r $ toStringAs r a) == Just a
8890

8991
log "Parsing strings with a different base"
9092
assert $ fromString "0b100" == Just four
@@ -98,7 +100,7 @@ main = do
98100
log "Binary relations between integers should hold before and after converting to BigInt"
99101
testBinary (+) (+)
100102
testBinary (-) (-)
101-
-- testBinary (*) (*)
103+
-- testBinary (*) (*)
102104
testBinary mod mod
103105
testBinary (/) (/)
104106

0 commit comments

Comments
 (0)