File tree Expand file tree Collapse file tree 5 files changed +19
-19
lines changed Expand file tree Collapse file tree 5 files changed +19
-19
lines changed Original file line number Diff line number Diff line change 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}
Original file line number Diff line number Diff line change 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}
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ module Node.HTTP
2626
2727import Prelude
2828
29- import Control.Monad.Eff (Eff )
29+ import Control.Monad.Eff (Eff , kind Effect )
3030
3131import Data.Maybe (Maybe )
3232import Data.Nullable (Nullable , toNullable )
@@ -37,16 +37,16 @@ import Node.Stream (Writable, Readable)
3737import 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.
5252foreign 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
4646import 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
5555newtype RequestHeaders = RequestHeaders (StrMap String )
Original file line number Diff line number Diff 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"
You can’t perform that action at this time.
0 commit comments