Skip to content

Commit 50339c2

Browse files
authored
Merge pull request #3 from purescript/bump
Prepare for 2.0 release
2 parents e7fbc15 + da4b3c9 commit 50339c2

3 files changed

Lines changed: 6 additions & 16 deletions

File tree

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
"package.json"
1818
],
1919
"dependencies": {
20-
"purescript-prelude": "^1.0.0"
20+
"purescript-prelude": "^2.1.0"
2121
}
2222
}

src/Data/Function/Uncurried.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@ exports.mkFn0 = function (fn) {
88
};
99
};
1010

11-
exports.mkFn1 = function (fn) {
12-
return function (a) {
13-
return fn(a);
14-
};
15-
};
16-
1711
exports.mkFn2 = function (fn) {
1812
/* jshint maxparams: 2 */
1913
return function (a, b) {
@@ -81,12 +75,6 @@ exports.runFn0 = function (fn) {
8175
return fn();
8276
};
8377

84-
exports.runFn1 = function (fn) {
85-
return function (a) {
86-
return fn(a);
87-
};
88-
};
89-
9078
exports.runFn2 = function (fn) {
9179
return function (a) {
9280
return function (b) {

src/Data/Function/Uncurried.purs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Data.Unit (Unit)
66
foreign import data Fn0 :: * -> *
77

88
-- | A function of one argument
9-
foreign import data Fn1 :: * -> * -> *
9+
type Fn1 a b = a -> b
1010

1111
-- | A function of two arguments
1212
foreign import data Fn2 :: * -> * -> * -> *
@@ -39,7 +39,8 @@ foreign import data Fn10 :: * -> * -> * -> * -> * -> * -> * -> * -> * -> * -> *
3939
foreign import mkFn0 :: forall a. (Unit -> a) -> Fn0 a
4040

4141
-- | Create a function of one argument
42-
foreign import mkFn1 :: forall a b. (a -> b) -> Fn1 a b
42+
mkFn1 :: forall a b. (a -> b) -> Fn1 a b
43+
mkFn1 f = f
4344

4445
-- | Create a function of two arguments from a curried function
4546
foreign import mkFn2 :: forall a b c. (a -> b -> c) -> Fn2 a b c
@@ -72,7 +73,8 @@ foreign import mkFn10 :: forall a b c d e f g h i j k. (a -> b -> c -> d -> e ->
7273
foreign import runFn0 :: forall a. Fn0 a -> a
7374

7475
-- | Apply a function of one argument
75-
foreign import runFn1 :: forall a b. Fn1 a b -> a -> b
76+
runFn1 :: forall a b. Fn1 a b -> a -> b
77+
runFn1 f = f
7678

7779
-- | Apply a function of two arguments
7880
foreign import runFn2 :: forall a b c. Fn2 a b c -> a -> b -> c

0 commit comments

Comments
 (0)