Skip to content

Commit 3582c70

Browse files
committed
Merge pull request #28 from flipstone/0.7_updates
Updates for 0.7
2 parents a21b29f + d9a1473 commit 3582c70

25 files changed

+222
-396
lines changed

.travis.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ language: node_js
22
node_js:
33
- 0.10
44
env:
5-
- TAG=v0.6.9.3
5+
- TAG=v0.7.0
66
install:
77
- wget -O $HOME/purescript.tar.gz https://github.com/purescript/purescript/releases/download/$TAG/linux64.tar.gz
8-
- sudo tar zxvf $HOME/purescript.tar.gz -C /usr/local/bin purescript/psc{,i,-docs,-make} --strip-components=1
9-
- sudo chmod a+x /usr/local/bin/psc{,i,-docs,-make}
8+
- sudo tar zxvf $HOME/purescript.tar.gz -C /usr/local/bin purescript/psc{,i,-docs,-bundle,-publish} --strip-components=1
9+
- sudo chmod a+x /usr/local/bin/psc{,i,-docs,-bundle,-publish}
1010
- npm install bower gulp -g
1111
- npm install && bower install
1212
script:

bower.json

+8-5
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,14 @@
1919
"package.json"
2020
],
2121
"dependencies": {
22-
"purescript-aff": "~0.10.1",
23-
"purescript-arraybuffer-types": "~0.1.1",
22+
"purescript-aff": "~0.11.0",
23+
"purescript-arraybuffer-types": "~0.2.0",
2424
"purescript-dom": "~0.1.2",
25-
"purescript-foreign": "~0.4.2",
26-
"purescript-integers": "~0.1.0",
27-
"purescript-nullable": "~0.1.1"
25+
"purescript-foreign": "~0.5.0",
26+
"purescript-integers": "~0.2.0",
27+
"purescript-nullable": "~0.2.0"
28+
},
29+
"devDependencies": {
30+
"purescript-console": "~0.1.0"
2831
}
2932
}

docs/Network.HTTP.Affjax.Request.md

+15-99
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Module Documentation
2-
31
## Module Network.HTTP.Affjax.Request
42

53
#### `RequestContent`
@@ -11,6 +9,11 @@ data RequestContent :: *
119
Type representing all content types that be sent via XHR (ArrayBufferView,
1210
Blob, Document, String, FormData).
1311

12+
##### Instances
13+
``` purescript
14+
instance requestableRequestContent :: Requestable RequestContent
15+
```
16+
1417
#### `Requestable`
1518

1619
``` purescript
@@ -21,110 +24,23 @@ class Requestable a where
2124
A class for types that can be converted to values that can be sent with
2225
XHR requests.
2326

24-
#### `requestableRequestContent`
25-
27+
##### Instances
2628
``` purescript
2729
instance requestableRequestContent :: Requestable RequestContent
28-
```
29-
30-
31-
#### `requestableInt8Array`
32-
33-
``` purescript
34-
instance requestableInt8Array :: Requestable (A.ArrayView A.Int8)
35-
```
36-
37-
38-
#### `requestableInt16Array`
39-
40-
``` purescript
41-
instance requestableInt16Array :: Requestable (A.ArrayView A.Int16)
42-
```
43-
44-
45-
#### `requestableInt32Array`
46-
47-
``` purescript
48-
instance requestableInt32Array :: Requestable (A.ArrayView A.Int32)
49-
```
50-
51-
52-
#### `requestableUint8Array`
53-
54-
``` purescript
55-
instance requestableUint8Array :: Requestable (A.ArrayView A.Uint8)
56-
```
57-
58-
59-
#### `requestableUint16Array`
60-
61-
``` purescript
62-
instance requestableUint16Array :: Requestable (A.ArrayView A.Uint16)
63-
```
64-
65-
66-
#### `requestableUint32Array`
67-
68-
``` purescript
69-
instance requestableUint32Array :: Requestable (A.ArrayView A.Uint32)
70-
```
71-
72-
73-
#### `requestableUint8ClampedArray`
74-
75-
``` purescript
76-
instance requestableUint8ClampedArray :: Requestable (A.ArrayView A.Uint8Clamped)
77-
```
78-
79-
80-
#### `requestableFloat32Array`
81-
82-
``` purescript
83-
instance requestableFloat32Array :: Requestable (A.ArrayView A.Float32)
84-
```
85-
86-
87-
#### `requestableFloat64Array`
88-
89-
``` purescript
90-
instance requestableFloat64Array :: Requestable (A.ArrayView A.Float64)
91-
```
92-
93-
94-
#### `requestableBlob`
95-
96-
``` purescript
30+
instance requestableInt8Array :: Requestable (ArrayView Int8)
31+
instance requestableInt16Array :: Requestable (ArrayView Int16)
32+
instance requestableInt32Array :: Requestable (ArrayView Int32)
33+
instance requestableUint8Array :: Requestable (ArrayView Uint8)
34+
instance requestableUint16Array :: Requestable (ArrayView Uint16)
35+
instance requestableUint32Array :: Requestable (ArrayView Uint32)
36+
instance requestableUint8ClampedArray :: Requestable (ArrayView Uint8Clamped)
37+
instance requestableFloat32Array :: Requestable (ArrayView Float32)
38+
instance requestableFloat64Array :: Requestable (ArrayView Float64)
9739
instance requestableBlob :: Requestable Blob
98-
```
99-
100-
101-
#### `requestableDocument`
102-
103-
``` purescript
10440
instance requestableDocument :: Requestable Document
105-
```
106-
107-
108-
#### `requestableString`
109-
110-
``` purescript
11141
instance requestableString :: Requestable String
112-
```
113-
114-
115-
#### `requestableFormData`
116-
117-
``` purescript
11842
instance requestableFormData :: Requestable FormData
119-
```
120-
121-
122-
#### `requestableUnit`
123-
124-
``` purescript
12543
instance requestableUnit :: Requestable Unit
12644
```
12745

12846

129-
130-

docs/Network.HTTP.Affjax.Response.md

+7-46
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,33 @@
1-
# Module Documentation
2-
31
## Module Network.HTTP.Affjax.Response
42

53
#### `ResponseType`
64

75
``` purescript
86
data ResponseType a
9-
= ArrayBufferResponse
10-
| BlobResponse
11-
| DocumentResponse
12-
| JSONResponse
13-
| StringResponse
7+
= ArrayBufferResponse
8+
| BlobResponse
9+
| DocumentResponse
10+
| JSONResponse
11+
| StringResponse
1412
```
1513

1614
Valid response types for an AJAX request. This is used to determine the
1715
`ResponseContent` type for a request. The `a` type variable is a phantom
1816
type used to associate the `ResponseType` with a particular instance of
1917
`Respondable`.
2018

21-
#### `eqResponseType`
22-
19+
##### Instances
2320
``` purescript
2421
instance eqResponseType :: Eq (ResponseType a)
25-
```
26-
27-
28-
#### `showResponseType`
29-
30-
``` purescript
3122
instance showResponseType :: Show (ResponseType a)
3223
```
3324

34-
3525
#### `responseTypeToString`
3626

3727
``` purescript
3828
responseTypeToString :: forall a. ResponseType a -> String
3929
```
4030

41-
4231
#### `ResponseContent`
4332

4433
``` purescript
@@ -56,41 +45,13 @@ class Respondable a where
5645
fromResponse :: ResponseContent -> F a
5746
```
5847

59-
60-
#### `responsableBlob`
61-
48+
##### Instances
6249
``` purescript
6350
instance responsableBlob :: Respondable Blob
64-
```
65-
66-
67-
#### `responsableDocument`
68-
69-
``` purescript
7051
instance responsableDocument :: Respondable Document
71-
```
72-
73-
74-
#### `responsableJSON`
75-
76-
``` purescript
7752
instance responsableJSON :: Respondable Foreign
78-
```
79-
80-
81-
#### `responsableString`
82-
83-
``` purescript
8453
instance responsableString :: Respondable String
85-
```
86-
87-
88-
#### `responsableUnit`
89-
90-
``` purescript
9154
instance responsableUnit :: Respondable Unit
9255
```
9356

9457

95-
96-

docs/Network.HTTP.Affjax.md

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Module Documentation
2-
31
## Module Network.HTTP.Affjax
42

53
#### `AJAX`
@@ -21,21 +19,19 @@ The type for Affjax requests.
2119
#### `AffjaxRequest`
2220

2321
``` purescript
24-
type AffjaxRequest a = { password :: Maybe String, username :: Maybe String, content :: Maybe a, headers :: [RequestHeader], url :: URL, method :: Method }
22+
type AffjaxRequest a = { method :: Method, url :: URL, headers :: Array RequestHeader, content :: Maybe a, username :: Maybe String, password :: Maybe String }
2523
```
2624

27-
2825
#### `defaultRequest`
2926

3027
``` purescript
3128
defaultRequest :: AffjaxRequest Unit
3229
```
3330

34-
3531
#### `AffjaxResponse`
3632

3733
``` purescript
38-
type AffjaxResponse a = { response :: a, headers :: [ResponseHeader], status :: StatusCode }
34+
type AffjaxResponse a = { status :: StatusCode, headers :: Array ResponseHeader, response :: a }
3935
```
4036

4137
The type of records that will be received as an Affjax response.
@@ -157,4 +153,3 @@ affjax' :: forall e a b. (Requestable a, Respondable b) => AffjaxRequest a -> (E
157153
Run a request directly without using `Aff`.
158154

159155

160-

docs/Network.HTTP.Method.md

+10-23
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,31 @@
1-
# Module Documentation
2-
31
## Module Network.HTTP.Method
42

53
#### `Method`
64

75
``` purescript
86
data Method
9-
= DELETE
10-
| GET
11-
| HEAD
12-
| OPTIONS
13-
| PATCH
14-
| POST
15-
| PUT
16-
| MOVE
17-
| COPY
7+
= DELETE
8+
| GET
9+
| HEAD
10+
| OPTIONS
11+
| PATCH
12+
| POST
13+
| PUT
14+
| MOVE
15+
| COPY
1816
| CustomMethod String
1917
```
2018

21-
22-
#### `eqMethod`
23-
19+
##### Instances
2420
``` purescript
2521
instance eqMethod :: Eq Method
26-
```
27-
28-
29-
#### `showMethod`
30-
31-
``` purescript
3222
instance showMethod :: Show Method
3323
```
3424

35-
3625
#### `methodToString`
3726

3827
``` purescript
3928
methodToString :: Method -> String
4029
```
4130

4231

43-
44-

0 commit comments

Comments
 (0)