Skip to content
This repository was archived by the owner on Oct 4, 2020. It is now read-only.

Commit 57fdded

Browse files
committed
Merge pull request #17 from purescript/0.6.1
Fixes for 0.6.1
2 parents 7ab23bf + 55858a6 commit 57fdded

File tree

3 files changed

+21
-20
lines changed

3 files changed

+21
-20
lines changed

Gruntfile.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module.exports = function(grunt) {
1616

1717
pscMake: ["<%=libFiles%>"],
1818
dotPsci: ["<%=libFiles%>"],
19-
docgen: {
19+
pscDocs: {
2020
readme: {
2121
src: "src/**/*.purs",
2222
dest: "README.md"
@@ -47,6 +47,6 @@ module.exports = function(grunt) {
4747
grunt.loadNpmTasks("grunt-execute");
4848

4949
grunt.registerTask("test", ["clean:tests", "psc", "execute"]);
50-
grunt.registerTask("make", ["pscMake", "dotPsci", "docgen"]);
50+
grunt.registerTask("make", ["pscMake", "dotPsci", "pscDocs"]);
5151
grunt.registerTask("default", ["make", "test"]);
5252
};

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"private": true,
33
"dependencies": {
44
"grunt": "~0.4.4",
5-
"grunt-purescript": "~0.5.1",
5+
"grunt-purescript": "~0.6.0",
66
"grunt-contrib-clean": "~0.5.0",
77
"grunt-execute": "~0.2.1"
88
}

src/Data/Map.purs

+18-17
Original file line numberDiff line numberDiff line change
@@ -152,23 +152,24 @@ delete = down []
152152
where
153153
down :: forall k v. (P.Ord k) => [TreeContext k v] -> k -> Map k v -> Map k v
154154
down ctx _ Leaf = fromZipper ctx Leaf
155-
down ctx k (Two Leaf k1 _ Leaf) | k P.== k1 = up ctx Leaf
156-
down ctx k (Two left k1 _ right) | k P.== k1 =
157-
let max = maxNode left
158-
in removeMaxNode (TwoLeft max.key max.value right P.: ctx) left
159-
down ctx k (Two left k1 v1 right) | k P.< k1 = down (TwoLeft k1 v1 right P.: ctx) k left
160-
down ctx k (Two left k1 v1 right) = down (TwoRight left k1 v1 P.: ctx) k right
161-
down ctx k (Three Leaf k1 _ Leaf k2 v2 Leaf) | k P.== k1 = fromZipper ctx (Two Leaf k2 v2 Leaf)
162-
down ctx k (Three Leaf k1 v1 Leaf k2 _ Leaf) | k P.== k2 = fromZipper ctx (Two Leaf k1 v1 Leaf)
163-
down ctx k (Three left k1 _ mid k2 v2 right) | k P.== k1 =
164-
let max = maxNode left
165-
in removeMaxNode (ThreeLeft max.key max.value mid k2 v2 right P.: ctx) left
166-
down ctx k (Three left k1 v1 mid k2 _ right) | k P.== k2 =
167-
let max = maxNode mid
168-
in removeMaxNode (ThreeMiddle left k1 v1 max.key max.value right P.: ctx) mid
169-
down ctx k (Three left k1 v1 mid k2 v2 right) | k P.< k1 = down (ThreeLeft k1 v1 mid k2 v2 right P.: ctx) k left
170-
down ctx k (Three left k1 v1 mid k2 v2 right) | k1 P.< k P.&& k P.< k2 = down (ThreeMiddle left k1 v1 k2 v2 right P.: ctx) k mid
171-
down ctx k (Three left k1 v1 mid k2 v2 right) = down (ThreeRight left k1 v1 mid k2 v2 P.: ctx) k right
155+
down ctx k (Two Leaf k1 _ Leaf)
156+
| k P.== k1 = up ctx Leaf
157+
down ctx k (Two left k1 v1 right)
158+
| k P.== k1 = let max = maxNode left
159+
in removeMaxNode (TwoLeft max.key max.value right P.: ctx) left
160+
| k P.< k1 = down (TwoLeft k1 v1 right P.: ctx) k left
161+
| P.otherwise = down (TwoRight left k1 v1 P.: ctx) k right
162+
down ctx k (Three Leaf k1 v1 Leaf k2 v2 Leaf)
163+
| k P.== k1 = fromZipper ctx (Two Leaf k2 v2 Leaf)
164+
| k P.== k2 = fromZipper ctx (Two Leaf k1 v1 Leaf)
165+
down ctx k (Three left k1 v1 mid k2 v2 right)
166+
| k P.== k1 = let max = maxNode left
167+
in removeMaxNode (ThreeLeft max.key max.value mid k2 v2 right P.: ctx) left
168+
| k P.== k2 = let max = maxNode mid
169+
in removeMaxNode (ThreeMiddle left k1 v1 max.key max.value right P.: ctx) mid
170+
| k P.< k1 = down (ThreeLeft k1 v1 mid k2 v2 right P.: ctx) k left
171+
| k1 P.< k P.&& k P.< k2 = down (ThreeMiddle left k1 v1 k2 v2 right P.: ctx) k mid
172+
| P.otherwise = down (ThreeRight left k1 v1 mid k2 v2 P.: ctx) k right
172173

173174
up :: forall k v. (P.Ord k) => [TreeContext k v] -> Map k v -> Map k v
174175
up [] tree = tree

0 commit comments

Comments
 (0)