firefly-compiler 0.5.47 → 0.5.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/.vscode/settings.json +1 -1
  2. package/bin/firefly.mjs +1 -1
  3. package/compiler/Builder.ff +9 -1
  4. package/compiler/Compiler.ff +1 -1
  5. package/compiler/Dependencies.ff +11 -7
  6. package/compiler/JsEmitter.ff +75 -58
  7. package/core/BrowserSystem.ff +5 -0
  8. package/core/Date.ff +623 -0
  9. package/core/Instant.ff +0 -24
  10. package/core/JsValue.ff +1 -1
  11. package/core/Map.ff +16 -0
  12. package/core/NodeSystem.ff +5 -0
  13. package/core/Path.ff +2 -2
  14. package/core/Random.ff +0 -4
  15. package/core/RbMap.ff +32 -0
  16. package/core/Set.ff +4 -0
  17. package/core/Task.ff +0 -4
  18. package/experimental/tests/TestDate.ff +10 -0
  19. package/experimental/tests/TestEmailAlertDateLogic.ff +84 -0
  20. package/firefly.sh +5 -5
  21. package/lsp/LanguageServer.ff +3 -0
  22. package/output/js/ff/compiler/Builder.mjs +46 -4
  23. package/output/js/ff/compiler/Compiler.mjs +3 -3
  24. package/output/js/ff/compiler/Dependencies.mjs +28 -14
  25. package/output/js/ff/compiler/DependencyLock.mjs +2 -2
  26. package/output/js/ff/compiler/Deriver.mjs +2 -2
  27. package/output/js/ff/compiler/Dictionaries.mjs +2 -2
  28. package/output/js/ff/compiler/Environment.mjs +2 -2
  29. package/output/js/ff/compiler/Inference.mjs +2 -2
  30. package/output/js/ff/compiler/JsEmitter.mjs +675 -575
  31. package/output/js/ff/compiler/JsImporter.mjs +2 -2
  32. package/output/js/ff/compiler/LspHook.mjs +2 -2
  33. package/output/js/ff/compiler/Main.mjs +2 -2
  34. package/output/js/ff/compiler/ModuleCache.mjs +2 -2
  35. package/output/js/ff/compiler/Parser.mjs +2 -2
  36. package/output/js/ff/compiler/Patterns.mjs +2 -2
  37. package/output/js/ff/compiler/Resolver.mjs +2 -2
  38. package/output/js/ff/compiler/Substitution.mjs +2 -2
  39. package/output/js/ff/compiler/Syntax.mjs +2 -2
  40. package/output/js/ff/compiler/Token.mjs +2 -2
  41. package/output/js/ff/compiler/Tokenizer.mjs +2 -2
  42. package/output/js/ff/compiler/Unification.mjs +2 -2
  43. package/output/js/ff/compiler/Wildcards.mjs +2 -2
  44. package/output/js/ff/compiler/Workspace.mjs +2 -2
  45. package/output/js/ff/core/Any.mjs +2 -2
  46. package/output/js/ff/core/Array.mjs +2 -2
  47. package/output/js/ff/core/AssetSystem.mjs +2 -2
  48. package/output/js/ff/core/Atomic.mjs +2 -2
  49. package/output/js/ff/core/Bool.mjs +2 -2
  50. package/output/js/ff/core/BrowserSystem.mjs +28 -2
  51. package/output/js/ff/core/Buffer.mjs +2 -2
  52. package/output/js/ff/core/BuildSystem.mjs +2 -2
  53. package/output/js/ff/core/Channel.mjs +2 -2
  54. package/output/js/ff/core/Char.mjs +2 -2
  55. package/output/js/ff/core/Core.mjs +2 -2
  56. package/output/js/ff/core/Crypto.mjs +2 -2
  57. package/output/js/ff/core/Date.mjs +1009 -0
  58. package/output/js/ff/core/Duration.mjs +2 -2
  59. package/output/js/ff/core/Equal.mjs +2 -2
  60. package/output/js/ff/core/Error.mjs +2 -2
  61. package/output/js/ff/core/FileHandle.mjs +2 -2
  62. package/output/js/ff/core/Float.mjs +2 -2
  63. package/output/js/ff/core/HttpClient.mjs +2 -2
  64. package/output/js/ff/core/Int.mjs +2 -2
  65. package/output/js/ff/core/IntMap.mjs +2 -2
  66. package/output/js/ff/core/Js.mjs +2 -2
  67. package/output/js/ff/core/JsSystem.mjs +2 -2
  68. package/output/js/ff/core/JsValue.mjs +3 -3
  69. package/output/js/ff/core/Json.mjs +2 -2
  70. package/output/js/ff/core/List.mjs +2 -2
  71. package/output/js/ff/core/Lock.mjs +2 -2
  72. package/output/js/ff/core/Log.mjs +2 -2
  73. package/output/js/ff/core/Map.mjs +34 -2
  74. package/output/js/ff/core/NodeSystem.mjs +28 -2
  75. package/output/js/ff/core/Nothing.mjs +2 -2
  76. package/output/js/ff/core/Option.mjs +2 -2
  77. package/output/js/ff/core/Ordering.mjs +2 -2
  78. package/output/js/ff/core/Pair.mjs +2 -2
  79. package/output/js/ff/core/Path.mjs +6 -12
  80. package/output/js/ff/core/Queue.mjs +2 -2
  81. package/output/js/ff/core/Random.mjs +2 -10
  82. package/output/js/ff/core/RbMap.mjs +186 -2
  83. package/output/js/ff/core/Serializable.mjs +2 -2
  84. package/output/js/ff/core/Set.mjs +50 -2
  85. package/output/js/ff/core/Show.mjs +2 -2
  86. package/output/js/ff/core/SourceLocation.mjs +2 -2
  87. package/output/js/ff/core/Stream.mjs +2 -2
  88. package/output/js/ff/core/String.mjs +2 -2
  89. package/output/js/ff/core/StringMap.mjs +2 -2
  90. package/output/js/ff/core/Task.mjs +2 -10
  91. package/output/js/ff/core/Try.mjs +2 -2
  92. package/output/js/ff/core/Unit.mjs +2 -2
  93. package/package.json +1 -1
  94. package/postgresql/Pg.ff +0 -40
  95. package/s3/S3.ff +4 -4
  96. package/vscode/package.json +1 -1
  97. package/output/js/ff/core/Instant.mjs +0 -149
  98. /package/fireflysite/assets/markdown/scratch/{Toc.md → toc.md} +0 -0
@@ -1,149 +0,0 @@
1
-
2
-
3
- import * as ff_core_Any from "../../ff/core/Any.mjs"
4
-
5
- import * as ff_core_Array from "../../ff/core/Array.mjs"
6
-
7
- import * as ff_core_AssetSystem from "../../ff/core/AssetSystem.mjs"
8
-
9
- import * as ff_core_Atomic from "../../ff/core/Atomic.mjs"
10
-
11
- import * as ff_core_Bool from "../../ff/core/Bool.mjs"
12
-
13
- import * as ff_core_BrowserSystem from "../../ff/core/BrowserSystem.mjs"
14
-
15
- import * as ff_core_Buffer from "../../ff/core/Buffer.mjs"
16
-
17
- import * as ff_core_BuildSystem from "../../ff/core/BuildSystem.mjs"
18
-
19
- import * as ff_core_Channel from "../../ff/core/Channel.mjs"
20
-
21
- import * as ff_core_Char from "../../ff/core/Char.mjs"
22
-
23
- import * as ff_core_Core from "../../ff/core/Core.mjs"
24
-
25
- import * as ff_core_Crypto from "../../ff/core/Crypto.mjs"
26
-
27
- import * as ff_core_Duration from "../../ff/core/Duration.mjs"
28
-
29
- import * as ff_core_Equal from "../../ff/core/Equal.mjs"
30
-
31
- import * as ff_core_Error from "../../ff/core/Error.mjs"
32
-
33
- import * as ff_core_FileHandle from "../../ff/core/FileHandle.mjs"
34
-
35
- import * as ff_core_Float from "../../ff/core/Float.mjs"
36
-
37
- import * as ff_core_HttpClient from "../../ff/core/HttpClient.mjs"
38
-
39
- import * as ff_core_Instant from "../../ff/core/Instant.mjs"
40
-
41
- import * as ff_core_Int from "../../ff/core/Int.mjs"
42
-
43
- import * as ff_core_IntMap from "../../ff/core/IntMap.mjs"
44
-
45
- import * as ff_core_Js from "../../ff/core/Js.mjs"
46
-
47
- import * as ff_core_JsSystem from "../../ff/core/JsSystem.mjs"
48
-
49
- import * as ff_core_JsValue from "../../ff/core/JsValue.mjs"
50
-
51
- import * as ff_core_Json from "../../ff/core/Json.mjs"
52
-
53
- import * as ff_core_List from "../../ff/core/List.mjs"
54
-
55
- import * as ff_core_Lock from "../../ff/core/Lock.mjs"
56
-
57
- import * as ff_core_Log from "../../ff/core/Log.mjs"
58
-
59
- import * as ff_core_Map from "../../ff/core/Map.mjs"
60
-
61
- import * as ff_core_NodeSystem from "../../ff/core/NodeSystem.mjs"
62
-
63
- import * as ff_core_Nothing from "../../ff/core/Nothing.mjs"
64
-
65
- import * as ff_core_Option from "../../ff/core/Option.mjs"
66
-
67
- import * as ff_core_Ordering from "../../ff/core/Ordering.mjs"
68
-
69
- import * as ff_core_Pair from "../../ff/core/Pair.mjs"
70
-
71
- import * as ff_core_Path from "../../ff/core/Path.mjs"
72
-
73
- import * as ff_core_Queue from "../../ff/core/Queue.mjs"
74
-
75
- import * as ff_core_Random from "../../ff/core/Random.mjs"
76
-
77
- import * as ff_core_Serializable from "../../ff/core/Serializable.mjs"
78
-
79
- import * as ff_core_Set from "../../ff/core/Set.mjs"
80
-
81
- import * as ff_core_Show from "../../ff/core/Show.mjs"
82
-
83
- import * as ff_core_SourceLocation from "../../ff/core/SourceLocation.mjs"
84
-
85
- import * as ff_core_Stream from "../../ff/core/Stream.mjs"
86
-
87
- import * as ff_core_String from "../../ff/core/String.mjs"
88
-
89
- import * as ff_core_StringMap from "../../ff/core/StringMap.mjs"
90
-
91
- import * as ff_core_Task from "../../ff/core/Task.mjs"
92
-
93
- import * as ff_core_Try from "../../ff/core/Try.mjs"
94
-
95
- import * as ff_core_Unit from "../../ff/core/Unit.mjs"
96
-
97
- // newtype Instant
98
-
99
-
100
-
101
- export function fromIso_(date_) {
102
- const zone_ = ((ff_core_String.String_endsWith(date_, "Z") || ff_core_String.String_contains(date_, "+")) || ff_core_String.String_contains(ff_core_String.String_dropWhile(date_, ((_w1) => {
103
- return (_w1 !== 84)
104
- })), "-"));
105
- if((((zone_ && ff_core_String.String_contains(ff_core_String.String_takeWhile(date_, ((_w1) => {
106
- return (_w1 !== 84)
107
- })), "-")) && ff_core_String.String_contains(date_, "T")) && ff_core_String.String_contains(date_, ":"))) {
108
- return ff_core_Option.Some(ff_core_Instant.internalParseDate_(date_))
109
- } else return ff_core_Option.None()
110
- }
111
-
112
- export function internalParseDate_(date_) {
113
- return (Date.parse(date_) * 0.001)
114
- }
115
-
116
- export async function fromIso_$(date_, $task) {
117
- const zone_ = ((ff_core_String.String_endsWith(date_, "Z") || ff_core_String.String_contains(date_, "+")) || ff_core_String.String_contains(ff_core_String.String_dropWhile(date_, ((_w1) => {
118
- return (_w1 !== 84)
119
- })), "-"));
120
- if((((zone_ && ff_core_String.String_contains(ff_core_String.String_takeWhile(date_, ((_w1) => {
121
- return (_w1 !== 84)
122
- })), "-")) && ff_core_String.String_contains(date_, "T")) && ff_core_String.String_contains(date_, ":"))) {
123
- return ff_core_Option.Some(ff_core_Instant.internalParseDate_(date_))
124
- } else return ff_core_Option.None()
125
- }
126
-
127
- export async function internalParseDate_$(date_, $task) {
128
- return (Date.parse(date_) * 0.001)
129
- }
130
-
131
- export function Instant_add(self_, duration_) {
132
- return (self_ + duration_)
133
- }
134
-
135
- export function Instant_toIso(self_) {
136
- return (new Date((self_ * 1000.0))).toISOString()
137
- }
138
-
139
- export async function Instant_add$(self_, duration_, $task) {
140
- return (self_ + duration_)
141
- }
142
-
143
- export async function Instant_toIso$(self_, $task) {
144
- return (new Date((self_ * 1000.0))).toISOString()
145
- }
146
-
147
-
148
-
149
-