Skip to content

Commit a8d955a

Browse files
committed
Uppercase effect type
1 parent 870e4f4 commit a8d955a

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22

33
## Module Network.HTTP.Affjax
44

5-
#### `Ajax`
5+
#### `AJAX`
66

77
``` purescript
8-
data Ajax :: !
8+
data AJAX :: !
99
```
1010

1111
The effect type for AJAX requests made with Affjax.
1212

1313
#### `Affjax`
1414

1515
``` purescript
16-
type Affjax e a = Aff (ajax :: Ajax | e) (AffjaxResponse a)
16+
type Affjax e a = Aff (ajax :: AJAX | e) (AffjaxResponse a)
1717
```
1818

1919
The type for Affjax requests.
@@ -151,7 +151,7 @@ Makes a `DELETE` request to the specified URL and ignores the response.
151151
#### `affjax'`
152152

153153
``` purescript
154-
affjax' :: forall e a b. (Requestable a, Responsable b) => AffjaxRequest a -> (Error -> Eff (ajax :: Ajax | e) Unit) -> (AffjaxResponse b -> Eff (ajax :: Ajax | e) Unit) -> Eff (ajax :: Ajax | e) (Canceler (ajax :: Ajax | e))
154+
affjax' :: forall e a b. (Requestable a, Responsable b) => AffjaxRequest a -> (Error -> Eff (ajax :: AJAX | e) Unit) -> (AffjaxResponse b -> Eff (ajax :: AJAX | e) Unit) -> Eff (ajax :: AJAX | e) (Canceler (ajax :: AJAX | e))
155155
```
156156

157157
Run a request directly without using `Aff`.

src/Network/HTTP/Affjax.purs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module Network.HTTP.Affjax
2-
( Ajax()
2+
( AJAX()
33
, Affjax()
44
, AffjaxRequest(), defaultRequest
55
, AffjaxResponse()
@@ -31,10 +31,10 @@ import Network.HTTP.StatusCode (StatusCode())
3131
import Type.Proxy (Proxy(..))
3232

3333
-- | The effect type for AJAX requests made with Affjax.
34-
foreign import data Ajax :: !
34+
foreign import data AJAX :: !
3535

3636
-- | The type for Affjax requests.
37-
type Affjax e a = Aff (ajax :: Ajax | e) (AffjaxResponse a)
37+
type Affjax e a = Aff (ajax :: AJAX | e) (AffjaxResponse a)
3838

3939
type AffjaxRequest a =
4040
{ method :: Method
@@ -120,9 +120,9 @@ delete_ = delete
120120
-- | Run a request directly without using `Aff`.
121121
affjax' :: forall e a b. (Requestable a, Responsable b) =>
122122
AffjaxRequest a ->
123-
(Error -> Eff (ajax :: Ajax | e) Unit) ->
124-
(AffjaxResponse b -> Eff (ajax :: Ajax | e) Unit) ->
125-
Eff (ajax :: Ajax | e) (Canceler (ajax :: Ajax | e))
123+
(Error -> Eff (ajax :: AJAX | e) Unit) ->
124+
(AffjaxResponse b -> Eff (ajax :: AJAX | e) Unit) ->
125+
Eff (ajax :: AJAX | e) (Canceler (ajax :: AJAX | e))
126126
affjax' req eb cb =
127127
runFn5 _ajax responseHeader req' cancelAjax eb cb'
128128
where
@@ -135,7 +135,7 @@ affjax' req eb cb =
135135
, username: toNullable req.username
136136
, password: toNullable req.password
137137
}
138-
cb' :: AffjaxResponse ResponseContent -> Eff (ajax :: Ajax | e) Unit
138+
cb' :: AffjaxResponse ResponseContent -> Eff (ajax :: AJAX | e) Unit
139139
cb' res = case res { response = _ } <$> fromResponse res.response of
140140
Left err -> eb $ error (show err)
141141
Right res' -> cb res'
@@ -185,12 +185,12 @@ foreign import _ajax
185185
}
186186
""" :: forall e a. Fn5 (String -> String -> ResponseHeader)
187187
AjaxRequest
188-
(XMLHttpRequest -> Canceler (ajax :: Ajax | e))
189-
(Error -> Eff (ajax :: Ajax | e) Unit)
190-
(AffjaxResponse Foreign -> Eff (ajax :: Ajax | e) Unit)
191-
(Eff (ajax :: Ajax | e) (Canceler (ajax :: Ajax | e)))
188+
(XMLHttpRequest -> Canceler (ajax :: AJAX | e))
189+
(Error -> Eff (ajax :: AJAX | e) Unit)
190+
(AffjaxResponse Foreign -> Eff (ajax :: AJAX | e) Unit)
191+
(Eff (ajax :: AJAX | e) (Canceler (ajax :: AJAX | e)))
192192

193-
cancelAjax :: forall e. XMLHttpRequest -> Canceler (ajax :: Ajax | e)
193+
cancelAjax :: forall e. XMLHttpRequest -> Canceler (ajax :: AJAX | e)
194194
cancelAjax xhr = Canceler \err -> makeAff (\eb cb -> runFn4 _cancelAjax xhr err eb cb)
195195

196196
foreign import _cancelAjax
@@ -203,6 +203,6 @@ foreign import _cancelAjax
203203
};
204204
""" :: forall e. Fn4 XMLHttpRequest
205205
Error
206-
(Error -> Eff (ajax :: Ajax | e) Unit)
207-
(Boolean -> Eff (ajax :: Ajax | e) Unit)
208-
(Eff (ajax :: Ajax | e) Unit)
206+
(Error -> Eff (ajax :: AJAX | e) Unit)
207+
(Boolean -> Eff (ajax :: AJAX | e) Unit)
208+
(Eff (ajax :: AJAX | e) Unit)

0 commit comments

Comments
 (0)