···212122222323----- COMPILED JAVASCRIPT
2424-import * as $stdlib$dict from "../../gleam_stdlib/dict.mjs";
2424+import * as $stdlib$dict from "../../gleam_stdlib/gleam/dict.mjs";
2525import {
2626 Empty as $Empty,
2727 NonEmpty as $NonEmpty,
···151516161717----- COMPILED JAVASCRIPT
1818-import * as $stdlib$dict from "../../gleam_stdlib/dict.mjs";
1818+import * as $stdlib$dict from "../../gleam_stdlib/gleam/dict.mjs";
1919import {
2020 Empty as $Empty,
2121 NonEmpty as $NonEmpty,
···141415151616----- COMPILED JAVASCRIPT
1717-import * as $stdlib$dict from "../../gleam_stdlib/dict.mjs";
1717+import * as $stdlib$dict from "../../gleam_stdlib/gleam/dict.mjs";
1818import {
1919 toList,
2020 Empty as $Empty,
···141415151616----- COMPILED JAVASCRIPT
1717-import * as $stdlib$dict from "../../gleam_stdlib/dict.mjs";
1717+import * as $stdlib$dict from "../../gleam_stdlib/gleam/dict.mjs";
1818import {
1919 toList,
2020 Empty as $Empty,
···131314141515----- COMPILED JAVASCRIPT
1616-import * as $stdlib$dict from "../../gleam_stdlib/dict.mjs";
1616+import * as $stdlib$dict from "../../gleam_stdlib/gleam/dict.mjs";
1717import {
1818 Empty as $Empty,
1919 NonEmpty as $NonEmpty,
···131314141515----- COMPILED JAVASCRIPT
1616-import * as $stdlib$dict from "../../gleam_stdlib/dict.mjs";
1616+import * as $stdlib$dict from "../../gleam_stdlib/gleam/dict.mjs";
1717import {
1818 Empty as $Empty,
1919 NonEmpty as $NonEmpty,
···121213131414----- COMPILED JAVASCRIPT
1515-import * as $stdlib$dict from "../../gleam_stdlib/dict.mjs";
1515+import * as $stdlib$dict from "../../gleam_stdlib/gleam/dict.mjs";
1616import {
1717 Empty as $Empty,
1818 NonEmpty as $NonEmpty,
···121213131414----- COMPILED JAVASCRIPT
1515-import * as $stdlib$dict from "../../gleam_stdlib/dict.mjs";
1515+import * as $stdlib$dict from "../../gleam_stdlib/gleam/dict.mjs";
1616import {
1717 Empty as $Empty,
1818 NonEmpty as $NonEmpty,
···131314141515----- COMPILED JAVASCRIPT
1616-import * as $stdlib$dict from "../../gleam_stdlib/dict.mjs";
1616+import * as $stdlib$dict from "../../gleam_stdlib/gleam/dict.mjs";
1717import {
1818 Empty as $Empty,
1919 NonEmpty as $NonEmpty,
···101011111212----- COMPILED JAVASCRIPT
1313-import * as $stdlib$dict from "../../gleam_stdlib/dict.mjs";
1313+import * as $stdlib$dict from "../../gleam_stdlib/gleam/dict.mjs";
1414import {
1515 Empty as $Empty,
1616 NonEmpty as $NonEmpty,
···101011111212----- COMPILED JAVASCRIPT
1313-import * as $stdlib$dict from "../../gleam_stdlib/dict.mjs";
1313+import * as $stdlib$dict from "../../gleam_stdlib/gleam/dict.mjs";
1414import {
1515 Empty as $Empty,
1616 NonEmpty as $NonEmpty,
···101011111212----- COMPILED JAVASCRIPT
1313-import * as $stdlib$dict from "../../gleam_stdlib/dict.mjs";
1313+import * as $stdlib$dict from "../../gleam_stdlib/gleam/dict.mjs";
1414import {
1515 Empty as $Empty,
1616 NonEmpty as $NonEmpty,
···151516161717----- COMPILED JAVASCRIPT
1818-import * as $stdlib$dict from "../../gleam_stdlib/dict.mjs";
1818+import * as $stdlib$dict from "../../gleam_stdlib/gleam/dict.mjs";
1919import {
2020 Empty as $Empty,
2121 NonEmpty as $NonEmpty,
···121213131414----- COMPILED JAVASCRIPT
1515-import * as $stdlib$dict from "../../gleam_stdlib/dict.mjs";
1515+import * as $stdlib$dict from "../../gleam_stdlib/gleam/dict.mjs";
1616import * as $inspect from "../../other/other/inspect.mjs";
1717import {
1818 Empty as $Empty,
···171718181919----- COMPILED JAVASCRIPT
2020-import * as $stdlib$dict from "../../gleam_stdlib/dict.mjs";
2020+import * as $stdlib$dict from "../../gleam_stdlib/gleam/dict.mjs";
2121import {
2222 toList,
2323 Empty as $Empty,
···111112121313----- COMPILED JAVASCRIPT
1414-import * as $stdlib$dict from "../../gleam_stdlib/dict.mjs";
1414+import * as $stdlib$dict from "../../gleam_stdlib/gleam/dict.mjs";
1515import {
1616 Empty as $Empty,
1717 NonEmpty as $NonEmpty,
···141415151616----- COMPILED JAVASCRIPT
1717-import * as $stdlib$dict from "../../gleam_stdlib/dict.mjs";
1817import * as $bool from "../../gleam_stdlib/gleam/bool.mjs";
1818+import * as $stdlib$dict from "../../gleam_stdlib/gleam/dict.mjs";
1919import {
2020 Empty as $Empty,
2121 NonEmpty as $NonEmpty,
···3131 try {
3232 // We can only check if an object is a stdlib Dict if it is one of the
3333 // project's dependencies.
3434- // The `Dict` class is the default export of `stdlib/dict.mjs`
3535- // that we import as `$stdlib$dict`.
3636- return value instanceof $stdlib$dict.default;
3737- } catch {
3434+ // We import the public gleam/dict module, so to check if something is a
3535+ // dict we compare the `constructor` field on the object with that of a
3636+ // new dict.
3737+ const emptyDict = $stdlib$dict.new$();
3838+ const dictClass = emptyDict.constructor;
3939+ return value instanceof dictClass;
4040+ } catch (e) {
3841 // If stdlib is not one of the project's dependencies then `$stdlib$dict`
3942 // will not have been imported and the check will throw an exception meaning
4043 // we can't check if something is actually a `Dict`.
···115118 let body = "dict.from_list([";
116119 let first = true;
117120118118- let key_value_pairs = [];
119119- map.forEach((value, key) => {
120120- key_value_pairs.push([key, value]);
121121+ const key_value_pairs = $stdlib$dict.fold(map, [], (pairs, key, value) => {
122122+ pairs.push([key, value]);
123123+ return pairs;
121124 });
125125+122126 key_value_pairs.sort();
123127 key_value_pairs.forEach(([key, value]) => {
124128 if (!first) body = body + ", ";