Skip to content

Commit 55ff063

Browse files
authored
Merge branch 'trunk' into fix/set-replacement-conventions
2 parents b49356b + 348a087 commit 55ff063

File tree

4 files changed

+20
-57
lines changed

4 files changed

+20
-57
lines changed

.github/workflows/bundle-ucm.yaml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,15 @@ jobs:
8484
path: ${{ env.ucm }}
8585
if-no-files-found: error
8686

87+
- name: report errors
88+
if: github.ref == 'refs/heads/trunk' && failure()
89+
uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # https://github.com/slackapi/slack-github-action/releases/tag/v2.0.0
90+
with:
91+
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
92+
webhook-type: incoming-webhook
93+
payload: |
94+
text: "build-ucm failed on ${{ github.ref }}. See details: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} cc <@UF924D5S7>"
95+
8796
package-racket-lib:
8897
strategy:
8998
matrix:
@@ -134,7 +143,15 @@ jobs:
134143
scheme-libs/racket/unison.zip
135144
scheme-libs/racket/unison.zip.CHECKSUM
136145
if-no-files-found: error
137-
146+
- name: report errors
147+
if: github.ref == 'refs/heads/trunk' && failure()
148+
uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # https://github.com/slackapi/slack-github-action/releases/tag/v2.0.0
149+
with:
150+
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
151+
webhook-type: incoming-webhook
152+
payload: |
153+
text: "package-racket-lib failed on ${{ github.ref }}. See details: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} cc <@UF924D5S7>"
154+
138155
build-dist-unison-runtime:
139156
needs: package-racket-lib
140157
name: build unison-runtime

unison-runtime/src/Unison/Runtime/Builtin.hs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1282,16 +1282,8 @@ declareForeigns = do
12821282
declareForeign Untracked 2 Map_lookup
12831283
declareForeign Untracked 1 Map_fromList
12841284
declareForeign Untracked 2 Map_eq
1285-
declareForeign Untracked 2 Map_union
1286-
declareForeign Untracked 2 Map_intersect
1287-
declareForeign Untracked 1 Map_toList
12881285
declareForeign Untracked 2 List_range
12891286
declareForeign Untracked 1 List_sort
1290-
declareForeign Untracked 1 Multimap_fromList
1291-
declareForeign Untracked 1 Set_fromList
1292-
declareForeign Untracked 2 Set_union
1293-
declareForeign Untracked 2 Set_intersect
1294-
declareForeign Untracked 1 Set_toList
12951287

12961288
foreignDeclResults :: (Map ForeignFunc (Sandbox, SuperNormal Symbol))
12971289
foreignDeclResults =

unison-runtime/src/Unison/Runtime/Foreign/Function.hs

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -878,18 +878,13 @@ foreignCallHelper = \case
878878
evaluate $ Map.fromList l
879879
Map_eq -> mkForeign $ \(l :: Map Val Val, r :: Map Val Val) ->
880880
pure $ l == r
881-
Map_union -> mkForeign $ \(l :: Map Val Val, r :: Map Val Val) ->
882-
evaluate $ Map.union l r
883-
Map_intersect -> mkForeign $ \(l :: Map Val Val, r :: Map Val Val) ->
884-
evaluate $ Map.intersection l r
885-
Map_toList -> mkForeign $ \(m :: Map Val Val) ->
886-
evaluate . forceListSpine $ Map.toList m
887881
List_range -> mkForeign $ \(m :: Word64, n :: Word64) ->
888882
let sz
889883
| m < n = fromIntegral $ n - m
890884
| otherwise = 0
891885
mk i = NatVal $ m + fromIntegral i
892-
in evaluate . forceListSpine $ Sq.fromFunction sz mk
886+
force s = foldl (\u x -> x `seq` u) s s
887+
in evaluate . force $ Sq.fromFunction sz mk
893888
List_sort -> mkForeign $ \(l :: Seq Val) -> pure $ Sq.unstableSort l
894889
Multimap_fromList -> mkForeign $ \(l :: [(Val, Val)]) -> do
895890
let listVals = l <&> \(k, v) -> (k, Sq.singleton v)
@@ -917,7 +912,6 @@ foreignCallHelper = \case
917912
evaluate . forceListSpine $ Map.keys s
918913
_ -> die "Set.toList: bad closure"
919914
where
920-
forceListSpine xs = foldl (\u x -> x `seq` u) xs xs
921915
chop = reverse . dropWhile isPathSeparator . reverse
922916

923917
hostPreference :: Maybe Util.Text.Text -> SYS.HostPreference
@@ -2114,30 +2108,6 @@ functionReplacementList =
21142108
( "005mc1fq7ojq72c238qlm2rspjgqo2furjodf28icruv316odu6du",
21152109
Map_fromList
21162110
),
2117-
( "01qqpul0ttlgjhr5i2gtmdr2uarns2hbtnjpipmk1575ipkrlug42",
2118-
Map_union
2119-
),
2120-
( "00c363e340il8q0fai6peiv3586o931nojj98qfek09hg1tjkm9ma",
2121-
Map_intersect
2122-
),
2123-
( "03pjq0jijrr7ebf6s3tuqi4d5hi5mrv19nagp7ql2j9ltm55c32ek",
2124-
Map_toList
2125-
),
2126-
( "03putoun7i5n0lhf8iu990u9p08laklnp668i170dka2itckmadlq",
2127-
Multimap_fromList
2128-
),
2129-
( "03q6giac0qlva6u4mja29tr7mv0jqnsugk8paibatdrns8lhqqb92",
2130-
Set_fromList
2131-
),
2132-
( "03362vaalqq28lcrmmsjhha637is312j01jme3juj980ugd93up28",
2133-
Set_union
2134-
),
2135-
( "01lm6ejo31na1ti6u85bv0klliefll7q0c0da2qnefvcrq1l8rlqe",
2136-
Set_intersect
2137-
),
2138-
( "01p7ot36tg62na408mnk1psve6rc7fog30gv6n7thkrv6t3na2gdm",
2139-
Set_toList
2140-
),
21412111
( "03c559iihi2vj0qps6cln48nv31ajup2srhas4pd05b9k46ds8jvk",
21422112
Map_eq
21432113
),

unison-runtime/src/Unison/Runtime/Foreign/Function/Type.hs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -260,16 +260,8 @@ data ForeignFunc
260260
| Map_lookup
261261
| Map_fromList
262262
| Map_eq
263-
| Map_union
264-
| Map_intersect
265-
| Map_toList
266263
| List_range
267264
| List_sort
268-
| Multimap_fromList
269-
| Set_fromList
270-
| Set_union
271-
| Set_intersect
272-
| Set_toList
273265
deriving (Show, Eq, Ord, Enum, Bounded)
274266

275267
foreignFuncBuiltinName :: ForeignFunc -> Text
@@ -526,13 +518,5 @@ foreignFuncBuiltinName = \case
526518
Map_lookup -> "Map.lookup"
527519
Map_fromList -> "Map.fromList"
528520
Map_eq -> "Map.=="
529-
Map_union -> "Map.union"
530-
Map_intersect -> "Map.intersect"
531-
Map_toList -> "Map.toList"
532521
List_range -> "List.range"
533522
List_sort -> "List.sort"
534-
Multimap_fromList -> "Multimap.fromList"
535-
Set_fromList -> "Set.fromList"
536-
Set_union -> "Set.union"
537-
Set_intersect -> "Set.intersect"
538-
Set_toList -> "Set.toList"

0 commit comments

Comments
 (0)