1
- # Rock v0.2.0
1
+ # Rock v0.2.1
2
2
3
3
[ ![ Rust] ( https://github.com/Champii/Rock/actions/workflows/rust.yml/badge.svg?branch=master )] ( https://github.com/Champii/Rock/actions/workflows/rust.yml )
4
4
@@ -45,10 +45,10 @@ You will need `clang` somewhere in your $PATH
45
45
46
46
Linux x86_64 only
47
47
48
- [ Rock v0.2.0 ] ( https://github.com/Champii/Rock/releases/download/v0.2.0 /rock ) (Tested on arch, btw)
48
+ [ Rock v0.2.1 ] ( https://github.com/Champii/Rock/releases/download/v0.2.1 /rock ) (Tested on arch, btw)
49
49
50
50
``` sh
51
- wget https://github.com/Champii/Rock/releases/download/v0.2.0 /rock
51
+ wget https://github.com/Champii/Rock/releases/download/v0.2.1 /rock
52
52
chmod +x rock
53
53
./rock -V
54
54
```
@@ -82,15 +82,9 @@ mkdir -P factorial/src && cd factorial
82
82
83
83
Add some files like this:
84
84
85
- - Copy all the stdlib files from [ std/src/\* .rk] ( https://github.com/Champii/Rock/blob/master/std/src ) into ` factorial/src/ `
86
-
87
85
- Create a ` factorial/src/main.rk ` file:
88
86
89
87
``` haskell
90
- mod lib
91
-
92
- use lib:: prelude :: (* )
93
-
94
88
fact a =
95
89
if a <= 1
96
90
then 1
@@ -121,10 +115,6 @@ Note that you currently must be at the project root to run the compiler. (i.e. i
121
115
122
116
123
117
``` haskell
124
- mod lib
125
-
126
- use lib:: prelude :: (* )
127
-
128
118
id a = a
129
119
130
120
main =
@@ -148,10 +138,6 @@ Test
148
138
### Custom infix operator
149
139
150
140
``` haskell
151
- mod lib
152
-
153
- use lib:: prelude :: (* )
154
-
155
141
infix |> 1
156
142
|> x f = f x
157
143
@@ -171,10 +157,6 @@ Prints `6`
171
157
This ` trait ToString ` is redondant with the ` trait Show ` implemented in the lib, and serves as a demonstration only
172
158
173
159
``` haskell
174
- mod lib
175
-
176
- use lib:: prelude :: (* )
177
-
178
160
trait ToString a
179
161
toString :: a -> String
180
162
@@ -204,10 +186,6 @@ Prints
204
186
### Struct instance and Show implementation
205
187
206
188
``` haskell
207
- mod lib
208
-
209
- use lib:: prelude :: (* )
210
-
211
189
struct Player
212
190
level :: Int64
213
191
name :: String
@@ -250,7 +228,7 @@ rock --repl
250
228
```
251
229
252
230
``` sh
253
- Rock: v0.2.0
231
+ Rock: v0.2.1
254
232
----
255
233
256
234
Type ' :?' for help
0 commit comments