@@ -782,7 +782,7 @@ async function runtimeNinja(devmode = true) {
782782 var externalDeps = devmode ? [ compilerTarget ] : [ ] ;
783783 var ninjaOutput = devmode ? "build.ninja" : "release.ninja" ;
784784 var templateRuntimeRules = `
785- bsc_no_open_flags = ${ commonBsFlags } -bs-cross-module-opt -make-runtime -nopervasives -unsafe -w +50 -warn-error A
785+ bsc_no_open_flags = ${ commonBsFlags } -bs-cross-module-opt -make-runtime -nopervasives -unsafe -w +50 -warn-error A -curried
786786bsc_flags = $bsc_no_open_flags -open Bs_stdlib_mini
787787${ ruleCC ( ninjaCwd ) }
788788${ ninjaQuickBuildList ( [
@@ -791,7 +791,7 @@ ${ninjaQuickBuildList([
791791 "bs_stdlib_mini.resi" ,
792792 "cc" ,
793793 ninjaCwd ,
794- [ [ "bsc_flags" , "-nostdlib -nopervasives" ] ] ,
794+ [ [ "bsc_flags" , "-nostdlib -nopervasives -curried " ] ] ,
795795 [ ] ,
796796 externalDeps ,
797797 ] ,
@@ -863,7 +863,7 @@ async function othersNinja(devmode = true) {
863863 var ninjaCwd = "others" ;
864864
865865 var templateOthersRules = `
866- bsc_primitive_flags = ${ commonBsFlags } -bs-cross-module-opt -make-runtime -nopervasives -unsafe -w +50 -warn-error A
866+ bsc_primitive_flags = ${ commonBsFlags } -bs-cross-module-opt -make-runtime -nopervasives -unsafe -w +50 -warn-error A -curried
867867bsc_flags = $bsc_primitive_flags -open Belt_internals
868868${ ruleCC ( ninjaCwd ) }
869869${ ninjaQuickBuildList ( [
@@ -965,12 +965,14 @@ async function stdlibNinja(devmode = true) {
965965 /**
966966 * @type [string,string][]
967967 */
968- var bsc_builtin_overrides = [ [ bsc_flags , `$${ bsc_flags } -nopervasives` ] ] ;
968+ var bsc_builtin_overrides = [
969+ [ bsc_flags , `$${ bsc_flags } -nopervasives -curried` ] ,
970+ ] ;
969971 // It is interesting `-w -a` would generate not great code sometimes
970972 // deprecations diabled due to string_of_float
971973 var warnings = "-w -9-3-106 -warn-error A" ;
972974 var templateStdlibRules = `
973- ${ bsc_flags } = ${ commonBsFlags } -bs-cross-module-opt -make-runtime ${ warnings } -I others
975+ ${ bsc_flags } = ${ commonBsFlags } -bs-cross-module-opt -make-runtime ${ warnings } -I others -curried
974976${ ruleCC ( ninjaCwd ) }
975977${ ninjaQuickBuildList ( [
976978 // we make it still depends on external
@@ -994,21 +996,40 @@ ${ninjaQuickBuildList([
994996 [ ] ,
995997 externalDeps ,
996998 ] ,
999+ [
1000+ "pervasivesU.cmj" ,
1001+ "pervasivesU.res" ,
1002+ "cc_cmi" ,
1003+ ninjaCwd ,
1004+ bsc_builtin_overrides ,
1005+ "pervasivesU.cmi" ,
1006+ externalDeps ,
1007+ ] ,
1008+ [
1009+ "pervasivesU.cmi" ,
1010+ "pervasivesU.resi" ,
1011+ "cc" ,
1012+ ninjaCwd ,
1013+ bsc_builtin_overrides ,
1014+ [ ] ,
1015+ externalDeps ,
1016+ ] ,
9971017] ) }
9981018` ;
9991019 var stdlibDirFiles = fs . readdirSync ( stdlibDir , "ascii" ) ;
10001020 var sources = stdlibDirFiles . filter ( x => {
10011021 return (
10021022 ! x . startsWith ( "pervasives." ) &&
1023+ ! x . startsWith ( "pervasivesU." ) &&
10031024 ( x . endsWith ( ".res" ) || x . endsWith ( ".resi" ) )
10041025 ) ;
10051026 } ) ;
10061027 let depsMap = new Map ( ) ;
10071028 await ocamlDepForBscAsync ( sources , stdlibDir , depsMap ) ;
10081029 var targets = collectTarget ( sources ) ;
10091030 var allTargets = scanFileTargets ( targets , [
1010- "pervasives .cmi" ,
1011- "pervasives .cmj" ,
1031+ "pervasivesU .cmi" ,
1032+ "pervasivesU .cmj" ,
10121033 ] ) ;
10131034 targets . forEach ( ( ext , mod ) => {
10141035 switch ( ext ) {
@@ -1083,10 +1104,11 @@ async function testNinja() {
10831104 var ninjaOutput = "build.ninja" ;
10841105 var ninjaCwd = `test` ;
10851106 var templateTestRules = `
1086- bsc_flags = -bs-cross-module-opt -make-runtime-test -bs-package-output commonjs:jscomp/test -w -3-6-26-27-29-30-32..40-44-45-52-60-9-106+104 -warn-error A -I runtime -I $stdlib -I others
1107+ bsc_flags = -bs-cross-module-opt -make-runtime-test -bs-package-output commonjs:jscomp/test -w -3-6-26-27-29-30-32..40-44-45-52-60-9-106+104 -warn-error A -I runtime -I $stdlib -I others -curried
10871108${ ruleCC ( ninjaCwd ) }
10881109` ;
10891110 var testDirFiles = fs . readdirSync ( testDir , "ascii" ) ;
1111+ //testDirFiles = [];
10901112 var sources = testDirFiles . filter ( x => {
10911113 return x . endsWith ( ".resi" ) || x . endsWith ( ".res" ) ;
10921114 } ) ;
0 commit comments