Skip to content

Commit 293c345

Browse files
felixSchlpaf31
authored andcommitted
Update Data.Function constant for prelude 1.0 (purescript#2213)
* Update mkFnN inlining for prelude 1.0 This fixes the compiler not inlining mkFnN, since `Data.Function` has moved to `Data.Function.Uncurried` * Update CONTRIBUTORS.md
1 parent 95334c8 commit 293c345

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

CONTRIBUTORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ This file lists the contributors to the PureScript compiler project, and the ter
7272
- [@LiamGoodacre](https://github.com/LiamGoodacre) (Liam Goodacre) My existing contributions and all future contributions until further notice are Copyright Liam Goodacre, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
7373
- [@bsermons](https://github.com/bsermons) (Brian Sermons) My existing contributions and all future contributions until further notice are Copyright Brian Sermons, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
7474
- [@bmjames](https://github.com/bmjames) (Ben James) My existing contributions and all future contributions until further notice are Copyright Ben James, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
75+
- - [@felixSchl](https://github.com/felixSchl) (Felix Schlitter) My existing contributions and all future contributions until further notice are Copyright Felix Schlitter, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
7576

7677
### Companies
7778

src/Language/PureScript/CodeGen/JS/Optimizer/Inliner.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ inlineCommonOperators = applyAll $
216216

217217
isNFn :: String -> Int -> JS -> Bool
218218
isNFn prefix n (JSVar _ name) = name == (prefix ++ show n)
219-
isNFn prefix n (JSAccessor _ name (JSVar _ dataFunction)) | dataFunction == C.dataFunction = name == (prefix ++ show n)
219+
isNFn prefix n (JSAccessor _ name (JSVar _ dataFunctionUncurried)) | dataFunctionUncurried == C.dataFunctionUncurried = name == (prefix ++ show n)
220220
isNFn _ _ _ = False
221221

222222
runFn :: Int -> JS -> JS

src/Language/PureScript/Constants.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,5 +391,8 @@ dataEuclideanRing = "Data_EuclideanRing"
391391
dataFunction :: String
392392
dataFunction = "Data_Function"
393393

394+
dataFunctionUncurried :: String
395+
dataFunctionUncurried = "Data_Function_Uncurried"
396+
394397
dataIntBits :: String
395398
dataIntBits = "Data_Int_Bits"

0 commit comments

Comments
 (0)