Skip to content

Commit

Permalink
Merge pull request #110 from PureFunctor/purs-v0.14
Browse files Browse the repository at this point in the history
Updates for PureScript 0.14.0
  • Loading branch information
srghma committed Apr 11, 2021
2 parents 1b78f62 + 11d6292 commit 761c0ed
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 22 deletions.
10 changes: 5 additions & 5 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
A couple of examples of purescript-express usage

## Installation

In the top-level directory:
```
$ npm install -g bower pulp purescript
$ npm install -g spago purescript
$ npm install
$ bower install
$ spago -x examples/spago.dhall build
```

## Running

In the top-level directory:
```
$ pulp run -m <example-name>
$ spago -x examples/spago.dhall run -m <example-name>
```

## Available examples
Expand Down
9 changes: 0 additions & 9 deletions examples/package.json

This file was deleted.

19 changes: 13 additions & 6 deletions examples/spago.dhall
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
{ name = "express-examples"
, dependencies =
(../spago.dhall).dependencies # [ "console", "effect", "node-fs", "psci-support", "refs", "strings", "node-process" ]
, packages = (../spago.dhall).packages
, sources = (../spago.dhall).sources # ["examples/src/**/*.purs"]
}
let conf = ../spago.dhall
in conf //
{ dependencies =
conf.dependencies #
[ "integers"
, "node-process"
, "refs"
]
, sources =
conf.sources #
[ "examples/**/*.purs"
]
}
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,8 @@
"homepage": "https://github.com/purescript-express/purescript-express#readme",
"dependencies": {
"express": "^4.17.1"
},
"devDependencies": {
"body-parser": "^1.19.0"
}
}
2 changes: 1 addition & 1 deletion packages.dhall
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
let upstream =
https://github.com/purescript/package-sets/releases/download/psc-0.13.8-20201206/packages.dhall sha256:c9ffd7577fb8ee2197309591d7ccc0f506ee37b9078866f0ef159f5abbb1b32b
https://github.com/purescript/package-sets/releases/download/psc-0.14.0-20210406/packages.dhall sha256:7b6af643c2f61d936878f58b613fade6f3cb39f2b4a310f6095784c7b5285879

in upstream
10 changes: 10 additions & 0 deletions spago.dhall
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
{ name = "express"
, dependencies =
[ "aff"
, "arrays"
, "console"
, "effect"
, "either"
, "exceptions"
, "foreign"
, "foreign-generic"
, "foreign-object"
, "functions"
, "maybe"
, "node-http"
, "prelude"
, "psci-support"
, "strings"
, "test-unit"
, "transformers"
, "unsafe-coerce"
]
, packages = ./packages.dhall
, sources = [ "src/**/*.purs", "test/**/*.purs" ]
Expand Down
4 changes: 4 additions & 0 deletions test/Test/Handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ exports.unsafeUpdateMapInPlace = function(map) {
};
};
}

exports.unsafeStringify = function(x) {
return JSON.stringify(x);
}
2 changes: 1 addition & 1 deletion test/Test/Handler.purs
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ import Data.Either (either)
import Foreign (Foreign, unsafeToForeign, readString)
import Foreign.Class (encode, decode)
import Foreign.Object (Object)
import Global.Unsafe (unsafeStringify)


foreign import cwdJson :: String
foreign import unsafeUpdateMapInPlace :: forall a. Object a -> String -> a -> Effect Unit
foreign import unsafeStringify :: forall a. a -> String

id :: forall a. a -> a
id a = a
Expand Down

0 comments on commit 761c0ed

Please sign in to comment.