firefly-compiler 0.5.48 → 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 (94) hide show
  1. package/bin/firefly.mjs +1 -1
  2. package/compiler/Compiler.ff +1 -1
  3. package/core/BrowserSystem.ff +5 -0
  4. package/core/Date.ff +623 -0
  5. package/core/Instant.ff +0 -24
  6. package/core/JsValue.ff +1 -1
  7. package/core/Map.ff +8 -0
  8. package/core/NodeSystem.ff +5 -0
  9. package/core/Path.ff +2 -2
  10. package/core/Random.ff +0 -4
  11. package/core/RbMap.ff +16 -0
  12. package/core/Set.ff +3 -1
  13. package/core/Task.ff +0 -4
  14. package/experimental/tests/TestDate.ff +10 -0
  15. package/experimental/tests/TestEmailAlertDateLogic.ff +84 -0
  16. package/firefly.sh +5 -5
  17. package/output/js/ff/compiler/Builder.mjs +2 -2
  18. package/output/js/ff/compiler/Compiler.mjs +3 -3
  19. package/output/js/ff/compiler/Dependencies.mjs +2 -2
  20. package/output/js/ff/compiler/DependencyLock.mjs +2 -2
  21. package/output/js/ff/compiler/Deriver.mjs +2 -2
  22. package/output/js/ff/compiler/Dictionaries.mjs +2 -2
  23. package/output/js/ff/compiler/Environment.mjs +2 -2
  24. package/output/js/ff/compiler/Inference.mjs +2 -2
  25. package/output/js/ff/compiler/JsEmitter.mjs +2 -2
  26. package/output/js/ff/compiler/JsImporter.mjs +2 -2
  27. package/output/js/ff/compiler/LspHook.mjs +2 -2
  28. package/output/js/ff/compiler/Main.mjs +2 -2
  29. package/output/js/ff/compiler/ModuleCache.mjs +2 -2
  30. package/output/js/ff/compiler/Parser.mjs +2 -2
  31. package/output/js/ff/compiler/Patterns.mjs +2 -2
  32. package/output/js/ff/compiler/Resolver.mjs +2 -2
  33. package/output/js/ff/compiler/Substitution.mjs +2 -2
  34. package/output/js/ff/compiler/Syntax.mjs +2 -2
  35. package/output/js/ff/compiler/Token.mjs +2 -2
  36. package/output/js/ff/compiler/Tokenizer.mjs +2 -2
  37. package/output/js/ff/compiler/Unification.mjs +2 -2
  38. package/output/js/ff/compiler/Wildcards.mjs +2 -2
  39. package/output/js/ff/compiler/Workspace.mjs +2 -2
  40. package/output/js/ff/core/Any.mjs +2 -2
  41. package/output/js/ff/core/Array.mjs +2 -2
  42. package/output/js/ff/core/AssetSystem.mjs +2 -2
  43. package/output/js/ff/core/Atomic.mjs +2 -2
  44. package/output/js/ff/core/Bool.mjs +2 -2
  45. package/output/js/ff/core/BrowserSystem.mjs +28 -2
  46. package/output/js/ff/core/Buffer.mjs +2 -2
  47. package/output/js/ff/core/BuildSystem.mjs +2 -2
  48. package/output/js/ff/core/Channel.mjs +2 -2
  49. package/output/js/ff/core/Char.mjs +2 -2
  50. package/output/js/ff/core/Core.mjs +2 -2
  51. package/output/js/ff/core/Crypto.mjs +2 -2
  52. package/output/js/ff/core/Date.mjs +1009 -0
  53. package/output/js/ff/core/Duration.mjs +2 -2
  54. package/output/js/ff/core/Equal.mjs +2 -2
  55. package/output/js/ff/core/Error.mjs +2 -2
  56. package/output/js/ff/core/FileHandle.mjs +2 -2
  57. package/output/js/ff/core/Float.mjs +2 -2
  58. package/output/js/ff/core/HttpClient.mjs +2 -2
  59. package/output/js/ff/core/Int.mjs +2 -2
  60. package/output/js/ff/core/IntMap.mjs +2 -2
  61. package/output/js/ff/core/Js.mjs +2 -2
  62. package/output/js/ff/core/JsSystem.mjs +2 -2
  63. package/output/js/ff/core/JsValue.mjs +3 -3
  64. package/output/js/ff/core/Json.mjs +2 -2
  65. package/output/js/ff/core/List.mjs +2 -2
  66. package/output/js/ff/core/Lock.mjs +2 -2
  67. package/output/js/ff/core/Log.mjs +2 -2
  68. package/output/js/ff/core/Map.mjs +18 -2
  69. package/output/js/ff/core/NodeSystem.mjs +28 -2
  70. package/output/js/ff/core/Nothing.mjs +2 -2
  71. package/output/js/ff/core/Option.mjs +2 -2
  72. package/output/js/ff/core/Ordering.mjs +2 -2
  73. package/output/js/ff/core/Pair.mjs +2 -2
  74. package/output/js/ff/core/Path.mjs +4 -4
  75. package/output/js/ff/core/Queue.mjs +2 -2
  76. package/output/js/ff/core/Random.mjs +2 -10
  77. package/output/js/ff/core/RbMap.mjs +74 -2
  78. package/output/js/ff/core/Serializable.mjs +2 -2
  79. package/output/js/ff/core/Set.mjs +26 -2
  80. package/output/js/ff/core/Show.mjs +2 -2
  81. package/output/js/ff/core/SourceLocation.mjs +2 -2
  82. package/output/js/ff/core/Stream.mjs +2 -2
  83. package/output/js/ff/core/String.mjs +2 -2
  84. package/output/js/ff/core/StringMap.mjs +2 -2
  85. package/output/js/ff/core/Task.mjs +2 -10
  86. package/output/js/ff/core/Try.mjs +2 -2
  87. package/output/js/ff/core/Unit.mjs +2 -2
  88. package/package.json +1 -1
  89. package/postgresql/Pg.ff +0 -40
  90. package/s3/S3.ff +4 -4
  91. package/vscode/package.json +1 -1
  92. package/experimental/IfBug.ff +0 -8
  93. package/output/js/ff/core/Instant.mjs +0 -149
  94. /package/fireflysite/assets/markdown/scratch/{Toc.md → toc.md} +0 -0
@@ -24,6 +24,8 @@ import * as ff_core_Core from "../../ff/core/Core.mjs"
24
24
 
25
25
  import * as ff_core_Crypto from "../../ff/core/Crypto.mjs"
26
26
 
27
+ import * as ff_core_Date from "../../ff/core/Date.mjs"
28
+
27
29
  import * as ff_core_Duration from "../../ff/core/Duration.mjs"
28
30
 
29
31
  import * as ff_core_Equal from "../../ff/core/Equal.mjs"
@@ -36,8 +38,6 @@ import * as ff_core_Float from "../../ff/core/Float.mjs"
36
38
 
37
39
  import * as ff_core_HttpClient from "../../ff/core/HttpClient.mjs"
38
40
 
39
- import * as ff_core_Instant from "../../ff/core/Instant.mjs"
40
-
41
41
  import * as ff_core_Int from "../../ff/core/Int.mjs"
42
42
 
43
43
  import * as ff_core_IntMap from "../../ff/core/IntMap.mjs"
@@ -24,6 +24,8 @@ import * as ff_core_Core from "../../ff/core/Core.mjs"
24
24
 
25
25
  import * as ff_core_Crypto from "../../ff/core/Crypto.mjs"
26
26
 
27
+ import * as ff_core_Date from "../../ff/core/Date.mjs"
28
+
27
29
  import * as ff_core_Duration from "../../ff/core/Duration.mjs"
28
30
 
29
31
  import * as ff_core_Equal from "../../ff/core/Equal.mjs"
@@ -36,8 +38,6 @@ import * as ff_core_Float from "../../ff/core/Float.mjs"
36
38
 
37
39
  import * as ff_core_HttpClient from "../../ff/core/HttpClient.mjs"
38
40
 
39
- import * as ff_core_Instant from "../../ff/core/Instant.mjs"
40
-
41
41
  import * as ff_core_Int from "../../ff/core/Int.mjs"
42
42
 
43
43
  import * as ff_core_IntMap from "../../ff/core/IntMap.mjs"
@@ -135,6 +135,18 @@ export function Set_contains(self_, value_, ff_core_Ordering_Order$T) {
135
135
  return ff_core_Map.Map_contains(self_, value_, ff_core_Ordering_Order$T)
136
136
  }
137
137
 
138
+ export function Set_first(self_, ff_core_Ordering_Order$T) {
139
+ return ff_core_Option.Option_map(ff_core_Map.Map_first(self_, ff_core_Ordering_Order$T), ((_w1) => {
140
+ return _w1.first_
141
+ }))
142
+ }
143
+
144
+ export function Set_last(self_, ff_core_Ordering_Order$T) {
145
+ return ff_core_Option.Option_map(ff_core_Map.Map_last(self_, ff_core_Ordering_Order$T), ((_w1) => {
146
+ return _w1.first_
147
+ }))
148
+ }
149
+
138
150
  export function Set_lastBefore(self_, key_, ff_core_Ordering_Order$T) {
139
151
  return ff_core_Option.Option_map(ff_core_Map.Map_lastBefore(self_, key_, ff_core_Ordering_Order$T), ((_w1) => {
140
152
  return _w1.first_
@@ -212,6 +224,18 @@ export async function Set_contains$(self_, value_, ff_core_Ordering_Order$T, $ta
212
224
  return ff_core_Map.Map_contains(self_, value_, ff_core_Ordering_Order$T)
213
225
  }
214
226
 
227
+ export async function Set_first$(self_, ff_core_Ordering_Order$T, $task) {
228
+ return ff_core_Option.Option_map(ff_core_Map.Map_first(self_, ff_core_Ordering_Order$T), ((_w1) => {
229
+ return _w1.first_
230
+ }))
231
+ }
232
+
233
+ export async function Set_last$(self_, ff_core_Ordering_Order$T, $task) {
234
+ return ff_core_Option.Option_map(ff_core_Map.Map_last(self_, ff_core_Ordering_Order$T), ((_w1) => {
235
+ return _w1.first_
236
+ }))
237
+ }
238
+
215
239
  export async function Set_lastBefore$(self_, key_, ff_core_Ordering_Order$T, $task) {
216
240
  return ff_core_Option.Option_map(ff_core_Map.Map_lastBefore(self_, key_, ff_core_Ordering_Order$T), ((_w1) => {
217
241
  return _w1.first_
@@ -24,6 +24,8 @@ import * as ff_core_Core from "../../ff/core/Core.mjs"
24
24
 
25
25
  import * as ff_core_Crypto from "../../ff/core/Crypto.mjs"
26
26
 
27
+ import * as ff_core_Date from "../../ff/core/Date.mjs"
28
+
27
29
  import * as ff_core_Duration from "../../ff/core/Duration.mjs"
28
30
 
29
31
  import * as ff_core_Equal from "../../ff/core/Equal.mjs"
@@ -36,8 +38,6 @@ import * as ff_core_Float from "../../ff/core/Float.mjs"
36
38
 
37
39
  import * as ff_core_HttpClient from "../../ff/core/HttpClient.mjs"
38
40
 
39
- import * as ff_core_Instant from "../../ff/core/Instant.mjs"
40
-
41
41
  import * as ff_core_Int from "../../ff/core/Int.mjs"
42
42
 
43
43
  import * as ff_core_IntMap from "../../ff/core/IntMap.mjs"
@@ -24,6 +24,8 @@ import * as ff_core_Core from "../../ff/core/Core.mjs"
24
24
 
25
25
  import * as ff_core_Crypto from "../../ff/core/Crypto.mjs"
26
26
 
27
+ import * as ff_core_Date from "../../ff/core/Date.mjs"
28
+
27
29
  import * as ff_core_Duration from "../../ff/core/Duration.mjs"
28
30
 
29
31
  import * as ff_core_Equal from "../../ff/core/Equal.mjs"
@@ -36,8 +38,6 @@ import * as ff_core_Float from "../../ff/core/Float.mjs"
36
38
 
37
39
  import * as ff_core_HttpClient from "../../ff/core/HttpClient.mjs"
38
40
 
39
- import * as ff_core_Instant from "../../ff/core/Instant.mjs"
40
-
41
41
  import * as ff_core_Int from "../../ff/core/Int.mjs"
42
42
 
43
43
  import * as ff_core_IntMap from "../../ff/core/IntMap.mjs"
@@ -24,6 +24,8 @@ import * as ff_core_Core from "../../ff/core/Core.mjs"
24
24
 
25
25
  import * as ff_core_Crypto from "../../ff/core/Crypto.mjs"
26
26
 
27
+ import * as ff_core_Date from "../../ff/core/Date.mjs"
28
+
27
29
  import * as ff_core_Duration from "../../ff/core/Duration.mjs"
28
30
 
29
31
  import * as ff_core_Equal from "../../ff/core/Equal.mjs"
@@ -36,8 +38,6 @@ import * as ff_core_Float from "../../ff/core/Float.mjs"
36
38
 
37
39
  import * as ff_core_HttpClient from "../../ff/core/HttpClient.mjs"
38
40
 
39
- import * as ff_core_Instant from "../../ff/core/Instant.mjs"
40
-
41
41
  import * as ff_core_Int from "../../ff/core/Int.mjs"
42
42
 
43
43
  import * as ff_core_IntMap from "../../ff/core/IntMap.mjs"
@@ -24,6 +24,8 @@ import * as ff_core_Core from "../../ff/core/Core.mjs"
24
24
 
25
25
  import * as ff_core_Crypto from "../../ff/core/Crypto.mjs"
26
26
 
27
+ import * as ff_core_Date from "../../ff/core/Date.mjs"
28
+
27
29
  import * as ff_core_Duration from "../../ff/core/Duration.mjs"
28
30
 
29
31
  import * as ff_core_Equal from "../../ff/core/Equal.mjs"
@@ -36,8 +38,6 @@ import * as ff_core_Float from "../../ff/core/Float.mjs"
36
38
 
37
39
  import * as ff_core_HttpClient from "../../ff/core/HttpClient.mjs"
38
40
 
39
- import * as ff_core_Instant from "../../ff/core/Instant.mjs"
40
-
41
41
  import * as ff_core_Int from "../../ff/core/Int.mjs"
42
42
 
43
43
  import * as ff_core_IntMap from "../../ff/core/IntMap.mjs"
@@ -24,6 +24,8 @@ import * as ff_core_Core from "../../ff/core/Core.mjs"
24
24
 
25
25
  import * as ff_core_Crypto from "../../ff/core/Crypto.mjs"
26
26
 
27
+ import * as ff_core_Date from "../../ff/core/Date.mjs"
28
+
27
29
  import * as ff_core_Duration from "../../ff/core/Duration.mjs"
28
30
 
29
31
  import * as ff_core_Equal from "../../ff/core/Equal.mjs"
@@ -36,8 +38,6 @@ import * as ff_core_Float from "../../ff/core/Float.mjs"
36
38
 
37
39
  import * as ff_core_HttpClient from "../../ff/core/HttpClient.mjs"
38
40
 
39
- import * as ff_core_Instant from "../../ff/core/Instant.mjs"
40
-
41
41
  import * as ff_core_Int from "../../ff/core/Int.mjs"
42
42
 
43
43
  import * as ff_core_IntMap from "../../ff/core/IntMap.mjs"
@@ -24,6 +24,8 @@ import * as ff_core_Core from "../../ff/core/Core.mjs"
24
24
 
25
25
  import * as ff_core_Crypto from "../../ff/core/Crypto.mjs"
26
26
 
27
+ import * as ff_core_Date from "../../ff/core/Date.mjs"
28
+
27
29
  import * as ff_core_Duration from "../../ff/core/Duration.mjs"
28
30
 
29
31
  import * as ff_core_Equal from "../../ff/core/Equal.mjs"
@@ -36,8 +38,6 @@ import * as ff_core_Float from "../../ff/core/Float.mjs"
36
38
 
37
39
  import * as ff_core_HttpClient from "../../ff/core/HttpClient.mjs"
38
40
 
39
- import * as ff_core_Instant from "../../ff/core/Instant.mjs"
40
-
41
41
  import * as ff_core_Int from "../../ff/core/Int.mjs"
42
42
 
43
43
  import * as ff_core_IntMap from "../../ff/core/IntMap.mjs"
@@ -148,10 +148,6 @@ export function Task_lock(self_) {
148
148
  return ff_core_Lock.Lock((void 0), 0, ff_core_Queue.new_())
149
149
  }
150
150
 
151
- export function Task_now(self_) {
152
- return (Date.now() * 0.001)
153
- }
154
-
155
151
  export function Task_elapsed(self_) {
156
152
  const now_ = (performance.now() * 0.001);
157
153
  return (now_ - self_.started_)
@@ -208,10 +204,6 @@ export async function Task_lock$(self_, $task) {
208
204
  return ff_core_Lock.Lock((void 0), 0, ff_core_Queue.new_())
209
205
  }
210
206
 
211
- export async function Task_now$(self_, $task) {
212
- return (Date.now() * 0.001)
213
- }
214
-
215
207
  export async function Task_elapsed$(self_, $task) {
216
208
  const now_ = (performance.now() * 0.001);
217
209
  return (now_ - self_.started_)
@@ -24,6 +24,8 @@ import * as ff_core_Core from "../../ff/core/Core.mjs"
24
24
 
25
25
  import * as ff_core_Crypto from "../../ff/core/Crypto.mjs"
26
26
 
27
+ import * as ff_core_Date from "../../ff/core/Date.mjs"
28
+
27
29
  import * as ff_core_Duration from "../../ff/core/Duration.mjs"
28
30
 
29
31
  import * as ff_core_Equal from "../../ff/core/Equal.mjs"
@@ -36,8 +38,6 @@ import * as ff_core_Float from "../../ff/core/Float.mjs"
36
38
 
37
39
  import * as ff_core_HttpClient from "../../ff/core/HttpClient.mjs"
38
40
 
39
- import * as ff_core_Instant from "../../ff/core/Instant.mjs"
40
-
41
41
  import * as ff_core_Int from "../../ff/core/Int.mjs"
42
42
 
43
43
  import * as ff_core_IntMap from "../../ff/core/IntMap.mjs"
@@ -24,6 +24,8 @@ import * as ff_core_Core from "../../ff/core/Core.mjs"
24
24
 
25
25
  import * as ff_core_Crypto from "../../ff/core/Crypto.mjs"
26
26
 
27
+ import * as ff_core_Date from "../../ff/core/Date.mjs"
28
+
27
29
  import * as ff_core_Duration from "../../ff/core/Duration.mjs"
28
30
 
29
31
  import * as ff_core_Equal from "../../ff/core/Equal.mjs"
@@ -36,8 +38,6 @@ import * as ff_core_Float from "../../ff/core/Float.mjs"
36
38
 
37
39
  import * as ff_core_HttpClient from "../../ff/core/HttpClient.mjs"
38
40
 
39
- import * as ff_core_Instant from "../../ff/core/Instant.mjs"
40
-
41
41
  import * as ff_core_Int from "../../ff/core/Int.mjs"
42
42
 
43
43
  import * as ff_core_IntMap from "../../ff/core/IntMap.mjs"
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "description": "Firefly compiler",
5
5
  "author": "Firefly team",
6
6
  "license": "MIT",
7
- "version": "0.5.48",
7
+ "version": "0.5.49",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "https://github.com/Ahnfelt/firefly-boot"
package/postgresql/Pg.ff CHANGED
@@ -185,22 +185,6 @@ extend self: PgStatement {
185
185
  self.PgStatement(parameters = self.parameters.add(name, p))
186
186
  }
187
187
 
188
- withInstant(name: String, value: Instant): PgStatement {
189
- function toJsDate(instant: Instant): JsValue {
190
- Js->Date->(instant.since1970.seconds * 1000.0)
191
- }
192
- let p = toJsDate(value)
193
- self.PgStatement(parameters = self.parameters.add(name, p))
194
- }
195
-
196
- withNullableInstant(name: String, value: Option[Instant]): PgStatement {
197
- function toJsDate(instant: Instant): JsValue {
198
- Js->Date->(instant.since1970.seconds * 1000.0)
199
- }
200
- let p = value.map(toJsDate).else {Js.null()}
201
- self.PgStatement(parameters = self.parameters.add(name, p))
202
- }
203
-
204
188
  withBuffer(name: String, value: Buffer): PgStatement {
205
189
  let p = Js.jsSystem().value(value)
206
190
  self.PgStatement(parameters = self.parameters.add(name, p))
@@ -251,22 +235,6 @@ extend self: PgStatement {
251
235
  self.PgStatement(parameters = self.parameters.add(name, p))
252
236
  }
253
237
 
254
- withInstantArray(name: String, value: List[Instant]): PgStatement {
255
- function toJsDate(instant: Instant): JsValue {
256
- Js->Date->(instant.since1970.seconds * 1000.0)
257
- }
258
- let p = Js.jsSystem().value(value.map(toJsDate))
259
- self.PgStatement(parameters = self.parameters.add(name, p))
260
- }
261
-
262
- withNullableInstantArray(name: String, value: Option[List[Instant]]): PgStatement {
263
- function toJsDate(instant: Instant): JsValue {
264
- Js->Date->(instant.since1970.seconds * 1000.0)
265
- }
266
- let p = value.map {_.map(toJsDate)}.map(Js.jsSystem().value).else {Js.null()}
267
- self.PgStatement(parameters = self.parameters.add(name, p))
268
- }
269
-
270
238
  withBufferArray(name: String, value: List[Buffer]): PgStatement {
271
239
  let p = Js.jsSystem().value(value)
272
240
  self.PgStatement(parameters = self.parameters.add(name, p))
@@ -326,10 +294,6 @@ extend self: PgRow {
326
294
  internalGet(self, name, lower) {"" + _.grabString()}
327
295
  }
328
296
 
329
- getInstant(name: String, lower: Bool = True): Option[Instant] {
330
- internalGet(self, name, lower) {Instant(Duration(_.call0("getTime").grabInt() * 0.001))}
331
- }
332
-
333
297
  getBuffer(name: String, lower: Bool = True): Option[Buffer] {
334
298
  internalGet(self, name, lower) {_.grabBuffer()}
335
299
  }
@@ -350,10 +314,6 @@ extend self: PgRow {
350
314
  internalGet(self, name, lower) {_.grabArray().map {"" + _.grabString()}}
351
315
  }
352
316
 
353
- getInstantArray(name: String, lower: Bool = True): Option[List[Instant]] {
354
- internalGet(self, name, lower) {_.grabArray().map {Instant(Duration(_.call0("getTime").grabInt() * 0.001))}}
355
- }
356
-
357
317
  getBufferArray(name: String, lower: Bool = True): Option[List[Buffer]] {
358
318
  internalGet(self, name, lower) {_.grabArray().map {_.grabBuffer()}}
359
319
  }
package/s3/S3.ff CHANGED
@@ -8,7 +8,7 @@ put(
8
8
  body: Buffer
9
9
  headers: List[Pair[String, String]]
10
10
  ): Unit {
11
- let now = system.mainTask().now()
11
+ let now = system.date()
12
12
  let amzDate = toIsoString(now)
13
13
  let contentHash = system.crypto().sha256(body).toHex()
14
14
  let host = bucket + ".s3.amazonaws.com"
@@ -78,9 +78,9 @@ makeS3AuthorizationHeader(
78
78
  algorithm + " Credential=" + accessKeyId + "/" + credentialScope + ",SignedHeaders=" + signedHeaders + ",Signature=" + signature
79
79
  }
80
80
 
81
- toIsoString(instant: Instant): String {
82
- let d = Js->Date->(instant.since1970.seconds * 1000)
83
- d->toISOString()->replaceAll(Js->RegExp->("[-:]|[.]...", "g"), "")?
81
+ toIsoString(date: Date): String {
82
+ let rfc9557 = date.withTimeZone(Date.utcTimeZoneId).toRfc9557()
83
+ rfc9557.takeWhile {c => c != '.' && c != '['}.filter {c => c != '-' && c != ':'} + "Z"
84
84
  }
85
85
 
86
86
  encodeURIComponent(text: String): String {
@@ -4,7 +4,7 @@
4
4
  "description": "Firefly language support",
5
5
  "author": "Firefly team",
6
6
  "license": "MIT",
7
- "version": "0.5.48",
7
+ "version": "0.5.49",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "https://github.com/Ahnfelt/firefly-boot"
@@ -1,8 +0,0 @@
1
- nodeMain(system: NodeSystem) {
2
- let r = if(42 == 1) {
3
- if(42 == 11) {
4
- Log.debug("11")
5
- }
6
- Log.debug("1")
7
- }
8
- }
@@ -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
-