Skip to content

Commit bc54e37

Browse files
committed
Update dependencies. Still need type-fixes in Response.purs.
1 parent e9f09f2 commit bc54e37

File tree

3 files changed

+19
-16
lines changed

3 files changed

+19
-16
lines changed

bower.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,21 @@
2323
"package.json"
2424
],
2525
"dependencies": {
26-
"purescript-aff": "^1.1.0",
27-
"purescript-argonaut-core": "^1.0.0",
26+
"purescript-aff": "^2.0.1",
27+
"purescript-argonaut-core": "^2.0.1",
2828
"purescript-arraybuffer-types": "^0.2.0",
29-
"purescript-dom": "^2.0.0",
30-
"purescript-foreign": "^1.0.0",
31-
"purescript-form-urlencoded": "^1.0.0",
32-
"purescript-http-methods": "^1.0.0",
33-
"purescript-integers": "^1.1.0",
29+
"purescript-dom": "^3.1.0",
30+
"purescript-foreign": "^3.0.0",
31+
"purescript-form-urlencoded": "^2.0.0",
32+
"purescript-http-methods": "^2.0.0",
33+
"purescript-integers": "^2.0.0",
3434
"purescript-math": "^2.0.0",
35-
"purescript-media-types": "^1.0.0",
36-
"purescript-nullable": "^1.0.1",
37-
"purescript-refs": "^1.0.0",
38-
"purescript-unsafe-coerce": "^1.0.0"
35+
"purescript-media-types": "^2.0.0",
36+
"purescript-nullable": "^2.0.0",
37+
"purescript-refs": "^2.0.0",
38+
"purescript-unsafe-coerce": "^2.0.0"
3939
},
4040
"devDependencies": {
41-
"purescript-console": "^1.0.0"
41+
"purescript-console": "^2.0.0"
4242
}
4343
}

src/Network/HTTP/Affjax/Response.purs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ import DOM.Node.Types (Document())
2020

2121
import Unsafe.Coerce (unsafeCoerce)
2222

23+
import Control.Monad.Except (except, runExcept)
24+
2325
-- | Valid response types for an AJAX request. This is used to determine the
2426
-- | `ResponseContent` type for a request. The `a` type variable is a phantom
2527
-- | type used to associate the `ResponseType` with a particular instance of
@@ -80,7 +82,7 @@ instance responsableString :: Respondable String where
8082

8183
instance responsableUnit :: Respondable Unit where
8284
responseType = Tuple Nothing StringResponse
83-
fromResponse = const (Right unit)
85+
fromResponse = const (except (Right unit))
8486

8587
instance responsableArrayBuffer :: Respondable A.ArrayBuffer where
8688
responseType = Tuple Nothing ArrayBufferResponse

src/Network/HTTP/RequestHeader.purs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ module Network.HTTP.RequestHeader where
22

33
import Prelude
44

5-
import Data.MediaType (MediaType(), unMediaType)
5+
import Data.MediaType (MediaType())
6+
import Data.Newtype (unwrap)
67

78
data RequestHeader
89
= Accept MediaType
@@ -26,6 +27,6 @@ requestHeaderName (ContentType _) = "Content-Type"
2627
requestHeaderName (RequestHeader h _) = h
2728

2829
requestHeaderValue :: RequestHeader -> String
29-
requestHeaderValue (Accept m) = unMediaType m
30-
requestHeaderValue (ContentType m) = unMediaType m
30+
requestHeaderValue (Accept m) = unwrap m
31+
requestHeaderValue (ContentType m) = unwrap m
3132
requestHeaderValue (RequestHeader _ v) = v

0 commit comments

Comments
 (0)