Skip to content

Commit 8c06790

Browse files
authored
Merge pull request #14 from anilanar/ps-0.11
update for purescript 0.11
2 parents 1191132 + 6fc844d commit 8c06790

File tree

5 files changed

+19
-19
lines changed

5 files changed

+19
-19
lines changed

bower.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
"url": "git://github.com/purescript-node/purescript-node-http.git"
1313
},
1414
"devDependencies": {
15-
"purescript-console": "^2.0.0"
15+
"purescript-console": "^3.0.0"
1616
},
1717
"dependencies": {
18-
"purescript-maps": "^2.0.0",
19-
"purescript-node-streams": "^2.0.0",
20-
"purescript-node-url": "^2.0.0",
21-
"purescript-options": "^2.0.0",
22-
"purescript-unsafe-coerce": "^2.0.0"
18+
"purescript-maps": "^3.0.0",
19+
"purescript-node-streams": "^3.0.0",
20+
"purescript-node-url": "^3.0.0",
21+
"purescript-options": "^3.0.0",
22+
"purescript-unsafe-coerce": "^3.0.0"
2323
}
2424
}

package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
"private": true,
33
"scripts": {
44
"clean": "rimraf output && rimraf .pulp-cache",
5-
"build": "jshint src && jscs src && pulp build --censor-lib --strict",
5+
"build": "jshint src && jscs src && pulp build -- --censor-lib --strict",
66
"test": "pulp build -I test"
77
},
88
"devDependencies": {
99
"jscs": "^3.0.7",
1010
"jshint": "^2.9.4",
11-
"pulp": "^9.0.1",
12-
"purescript-psa": "^0.3.9",
13-
"purescript": "^0.10.1",
14-
"rimraf": "^2.5.4"
11+
"pulp": "^11.0.0",
12+
"purescript": "^0.11.1",
13+
"purescript-psa": "^0.5.0",
14+
"rimraf": "^2.6.1"
1515
}
1616
}

src/Node/HTTP.purs

+5-5
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module Node.HTTP
2626

2727
import Prelude
2828

29-
import Control.Monad.Eff (Eff)
29+
import Control.Monad.Eff (Eff, kind Effect)
3030

3131
import Data.Maybe (Maybe)
3232
import Data.Nullable (Nullable, toNullable)
@@ -37,16 +37,16 @@ import Node.Stream (Writable, Readable)
3737
import Unsafe.Coerce (unsafeCoerce)
3838

3939
-- | The type of a HTTP server object
40-
foreign import data Server :: *
40+
foreign import data Server :: Type
4141

4242
-- | A HTTP request object
43-
foreign import data Request :: *
43+
foreign import data Request :: Type
4444

4545
-- | A HTTP response object
46-
foreign import data Response :: *
46+
foreign import data Response :: Type
4747

4848
-- | The effect associated with using the HTTP module.
49-
foreign import data HTTP :: !
49+
foreign import data HTTP :: Effect
5050

5151
-- | Create a HTTP server, given a function to be executed when a request is received.
5252
foreign import createServer :: forall eff. (Request -> Response -> Eff (http :: HTTP | eff) Unit) -> Eff (http :: HTTP | eff) Server

src/Node/HTTP/Client.purs

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ import Node.URL as URL
4646
import Unsafe.Coerce (unsafeCoerce)
4747

4848
-- | A HTTP request object
49-
foreign import data Request :: *
49+
foreign import data Request :: Type
5050

5151
-- | A HTTP response object
52-
foreign import data Response :: *
52+
foreign import data Response :: Type
5353

5454
-- | A HTTP request object
5555
newtype RequestHeaders = RequestHeaders (StrMap String)

test/Main.purs

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ testBasic = do
4444
, "</form>"
4545
]
4646
setHeader res "Content-Type" "text/html"
47-
writeString outputStream UTF8 html (pure unit)
47+
_ <- writeString outputStream UTF8 html (pure unit)
4848
end outputStream (pure unit)
4949
"POST" -> void $ pipe inputStream outputStream
5050
_ -> unsafeCrashWith "Unexpected HTTP method"

0 commit comments

Comments
 (0)