File tree 5 files changed +19
-19
lines changed
5 files changed +19
-19
lines changed Original file line number Diff line number Diff line change 12
12
"url" : " git://github.com/purescript-node/purescript-node-http.git"
13
13
},
14
14
"devDependencies" : {
15
- "purescript-console" : " ^2 .0.0"
15
+ "purescript-console" : " ^3 .0.0"
16
16
},
17
17
"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"
23
23
}
24
24
}
Original file line number Diff line number Diff line change 2
2
"private" : true ,
3
3
"scripts" : {
4
4
"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" ,
6
6
"test" : " pulp build -I test"
7
7
},
8
8
"devDependencies" : {
9
9
"jscs" : " ^3.0.7" ,
10
10
"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 "
15
15
}
16
16
}
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ module Node.HTTP
26
26
27
27
import Prelude
28
28
29
- import Control.Monad.Eff (Eff )
29
+ import Control.Monad.Eff (Eff , kind Effect )
30
30
31
31
import Data.Maybe (Maybe )
32
32
import Data.Nullable (Nullable , toNullable )
@@ -37,16 +37,16 @@ import Node.Stream (Writable, Readable)
37
37
import Unsafe.Coerce (unsafeCoerce )
38
38
39
39
-- | The type of a HTTP server object
40
- foreign import data Server :: *
40
+ foreign import data Server :: Type
41
41
42
42
-- | A HTTP request object
43
- foreign import data Request :: *
43
+ foreign import data Request :: Type
44
44
45
45
-- | A HTTP response object
46
- foreign import data Response :: *
46
+ foreign import data Response :: Type
47
47
48
48
-- | The effect associated with using the HTTP module.
49
- foreign import data HTTP :: !
49
+ foreign import data HTTP :: Effect
50
50
51
51
-- | Create a HTTP server, given a function to be executed when a request is received.
52
52
foreign import createServer :: forall eff . (Request -> Response -> Eff (http :: HTTP | eff ) Unit ) -> Eff (http :: HTTP | eff ) Server
Original file line number Diff line number Diff line change @@ -46,10 +46,10 @@ import Node.URL as URL
46
46
import Unsafe.Coerce (unsafeCoerce )
47
47
48
48
-- | A HTTP request object
49
- foreign import data Request :: *
49
+ foreign import data Request :: Type
50
50
51
51
-- | A HTTP response object
52
- foreign import data Response :: *
52
+ foreign import data Response :: Type
53
53
54
54
-- | A HTTP request object
55
55
newtype RequestHeaders = RequestHeaders (StrMap String )
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ testBasic = do
44
44
, " </form>"
45
45
]
46
46
setHeader res " Content-Type" " text/html"
47
- writeString outputStream UTF8 html (pure unit)
47
+ _ <- writeString outputStream UTF8 html (pure unit)
48
48
end outputStream (pure unit)
49
49
" POST" -> void $ pipe inputStream outputStream
50
50
_ -> unsafeCrashWith " Unexpected HTTP method"
You can’t perform that action at this time.
0 commit comments