Skip to content

Commit 941f563

Browse files
committed
use psc 0.2.0
1 parent 218d55f commit 941f563

File tree

2 files changed

+19
-15
lines changed

2 files changed

+19
-15
lines changed

Main.hs

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,11 @@ examples =
114114
, ("arrays",
115115
("Arrays",
116116
unlines [ "sum = \\arr -> case arr of"
117-
, " [x:xs] -> x + sum xs"
117+
, " x : xs -> x + sum xs"
118118
, " [] -> 0"
119119
, ""
120120
, "sumOfProducts = \\arr -> case arr of"
121-
, " [x,y:xs] -> x * y + sum xs"
121+
, " x : y : xs -> x * y + sum xs"
122122
, " _ -> 0"
123123
]))
124124
, ("rows",
@@ -136,16 +136,20 @@ examples =
136136
, ("blocks",
137137
("Mutable Variables",
138138
unlines [ "collatz :: Number -> Number"
139-
, "collatz = \\n -> do"
140-
, " var m = n"
141-
, " var count = 0"
142-
, " while m > 1:"
143-
, " if m % 2 == 0:"
144-
, " m = m / 2"
145-
, " else:"
146-
, " m = 3 * m + 1"
147-
, " count = count + 1"
148-
, " return count"
139+
, "collatz = \\n -> "
140+
, " { "
141+
, " var m = n;"
142+
, " var count = 0;"
143+
, " while (m > 1) {"
144+
, " if (m % 2 == 0) {"
145+
, " m = m / 2;"
146+
, " } else {"
147+
, " m = 3 * m + 1;"
148+
, " }"
149+
, " count = count + 1;"
150+
, " }"
151+
, " return count;"
152+
, " }"
149153
]))
150154
, ("modules",
151155
("Modules",
@@ -154,7 +158,7 @@ examples =
154158
, " incr :: Number -> Number"
155159
, " incr = \\x -> x + 1"
156160
, ""
157-
, "test = Test:incr 10"
161+
, "test = Test.incr 10"
158162
]))
159163
, ("rank2",
160164
("Rank N Types",

trypurescript.cabal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: trypurescript
2-
version: 0.1.0.0
2+
version: 0.2.0.0
33
cabal-version: >=1.8
44
build-type: Simple
55
license: MIT
@@ -13,7 +13,7 @@ author: Phil Freeman
1313
data-dir: ""
1414

1515
executable trypurescript
16-
build-depends: base ==4.*, scotty -any, purescript ==0.1.14, containers -any,
16+
build-depends: base ==4.*, scotty -any, purescript ==0.2.0, containers -any,
1717
mtl -any, blaze-html -any, cmdtheline -any
1818
main-is: Main.hs
1919
buildable: True

0 commit comments

Comments
 (0)