git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Merge pull request #2120 from hdgarrood/update-parsec
083dbf5Harry Garrood
examples/passing/NumberLiterals.pursnew file+39
@@ -0,0 +1,39 @@
1+module Main where
2+
3+-- See issue #2115.
4+
5+import Prelude
6+import Test.Assert (assert')
7+import Control.Monad.Eff.Console (log)
8+
9+main = do
10+ test "0.17" 0.17
11+ test "0.25996181067141905" 0.25996181067141905
12+ test "0.3572019862807257" 0.3572019862807257
13+ test "0.46817723004874223" 0.46817723004874223
14+ test "0.9640035681058178" 0.9640035681058178
15+ test "4.23808622486133" 4.23808622486133
16+ test "4.540362294799751" 4.540362294799751
17+ test "5.212384849884261" 5.212384849884261
18+ test "13.958257048123212" 13.958257048123212
19+ test "32.96176575630599" 32.96176575630599
20+ test "38.47735512322269" 38.47735512322269
21+
22+ test "10000000000" 1e10
23+ test "10000000000" 1.0e10
24+ test "0.00001" 1e-5
25+ test "0.00001" 1.0e-5
26+ test "1.5339794352098402e-118" 1.5339794352098402e-118
27+ test "2.108934760892056e-59" 2.108934760892056e-59
28+ test "2.250634744599241e-19" 2.250634744599241e-19
29+ test "5.960464477539063e-8" 5.960464477539063e-8
30+ test "5e-324" 5e-324
31+ test "5e-324" 5.0e-324
32+
33+ log "Done"
34+
35+test str num =
36+ if (show num == str)
37+ then pure unit
38+ else flip assert' false $
39+ "Expected " <> show str <> ", got " <> show (show num) <> "."
purescript.cabal+1−1
@@ -109,7 +109,7 @@ library
109 monad-logger >= 0.3 && < 0.4,
109 monad-logger >= 0.3 && < 0.4,
110 mtl >= 2.1.0 && < 2.3.0,
110 mtl >= 2.1.0 && < 2.3.0,
111 parallel >= 3.2 && < 3.3,
111 parallel >= 3.2 && < 3.3,
112− parsec -any,
112+ parsec >=3.1.10,
113 pattern-arrows >= 0.0.2 && < 0.1,
113 pattern-arrows >= 0.0.2 && < 0.1,
114 pipes >= 4.0.0 && < 4.2.0,
114 pipes >= 4.0.0 && < 4.2.0,
115 pipes-http -any,
115 pipes-http -any,
stack.yaml+1
@@ -4,4 +4,5 @@ packages:
4extra-deps:
4extra-deps:
5- bower-json-0.8.0
5- bower-json-0.8.0
6- language-javascript-0.6.0.4
6- language-javascript-0.6.0.4
7+- parsec-3.1.11
7flags: {}
8flags: {}