firefly-compiler 0.4.21 → 0.4.23

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.
@@ -513,8 +513,8 @@ const t_ = type_a;
513
513
  const _1 = t_;
514
514
  {
515
515
  const _c = _1;
516
- return ff_compiler_Syntax.TConstructor(_c.at_, _c.name_, ff_core_List.List_map(t_.generics_, ((t_) => {
517
- return ff_compiler_Substitution.Substitution_substituteType(self_, t_)
516
+ return ff_compiler_Syntax.TConstructor(_c.at_, _c.name_, ff_core_List.List_map(t_.generics_, ((g_) => {
517
+ return ff_compiler_Substitution.Substitution_substituteType(self_, g_)
518
518
  })))
519
519
  return
520
520
  }
@@ -953,8 +953,8 @@ const t_ = type_a;
953
953
  const _1 = t_;
954
954
  {
955
955
  const _c = _1;
956
- return ff_compiler_Syntax.TConstructor(_c.at_, _c.name_, ff_core_List.List_map(t_.generics_, ((t_) => {
957
- return ff_compiler_Substitution.Substitution_substituteType(self_, t_)
956
+ return ff_compiler_Syntax.TConstructor(_c.at_, _c.name_, ff_core_List.List_map(t_.generics_, ((g_) => {
957
+ return ff_compiler_Substitution.Substitution_substituteType(self_, g_)
958
958
  })))
959
959
  return
960
960
  }
@@ -367,8 +367,8 @@ const t_ = type_a;
367
367
  const _1 = t_;
368
368
  {
369
369
  const _c = _1;
370
- return ff_compiler_Syntax.TConstructor(_c.at_, _c.name_, ff_core_List.List_map(t_.generics_, ((t_) => {
371
- return ff_compiler_Unification.Unification_substitute(self_, t_)
370
+ return ff_compiler_Syntax.TConstructor(_c.at_, _c.name_, ff_core_List.List_map(t_.generics_, ((g_) => {
371
+ return ff_compiler_Unification.Unification_substitute(self_, g_)
372
372
  })))
373
373
  return
374
374
  }
@@ -743,8 +743,8 @@ const t_ = type_a;
743
743
  const _1 = t_;
744
744
  {
745
745
  const _c = _1;
746
- return ff_compiler_Syntax.TConstructor(_c.at_, _c.name_, ff_core_List.List_map(t_.generics_, ((t_) => {
747
- return ff_compiler_Unification.Unification_substitute(self_, t_)
746
+ return ff_compiler_Syntax.TConstructor(_c.at_, _c.name_, ff_core_List.List_map(t_.generics_, ((g_) => {
747
+ return ff_compiler_Unification.Unification_substitute(self_, g_)
748
748
  })))
749
749
  return
750
750
  }
@@ -116,6 +116,19 @@ result_ = ff_core_RbMap.insert_(k_, v_, result_, ff_core_Ordering_Order$K)
116
116
  return result_
117
117
  }
118
118
 
119
+ export function Map_addList(self_, that_, ff_core_Ordering_Order$K) {
120
+ let result_ = self_;
121
+ ff_core_List.List_each(that_, ((_1) => {
122
+ {
123
+ const k_ = _1.first_;
124
+ const v_ = _1.second_;
125
+ result_ = ff_core_RbMap.insert_(k_, v_, result_, ff_core_Ordering_Order$K)
126
+ return
127
+ }
128
+ }));
129
+ return result_
130
+ }
131
+
119
132
  export function Map_get(self_, key_, ff_core_Ordering_Order$K) {
120
133
  return ff_core_RbMap.RB_get(self_, key_, ff_core_Ordering_Order$K)
121
134
  }
@@ -213,6 +226,19 @@ result_ = ff_core_RbMap.insert_(k_, v_, result_, ff_core_Ordering_Order$K)
213
226
  return result_
214
227
  }
215
228
 
229
+ export async function Map_addList$(self_, that_, ff_core_Ordering_Order$K, $task) {
230
+ let result_ = self_;
231
+ ff_core_List.List_each(that_, ((_1) => {
232
+ {
233
+ const k_ = _1.first_;
234
+ const v_ = _1.second_;
235
+ result_ = ff_core_RbMap.insert_(k_, v_, result_, ff_core_Ordering_Order$K)
236
+ return
237
+ }
238
+ }));
239
+ return result_
240
+ }
241
+
216
242
  export async function Map_get$(self_, key_, ff_core_Ordering_Order$K, $task) {
217
243
  return ff_core_RbMap.RB_get(self_, key_, ff_core_Ordering_Order$K)
218
244
  }
@@ -110,6 +110,14 @@ export function Set_addAll(self_, that_, ff_core_Ordering_Order$T) {
110
110
  return ff_core_Map.Map_addAll(self_, that_, ff_core_Ordering_Order$T)
111
111
  }
112
112
 
113
+ export function Set_addList(self_, that_, ff_core_Ordering_Order$T) {
114
+ let result_ = self_;
115
+ ff_core_List.List_each(that_, ((k_) => {
116
+ result_ = ff_core_Map.Map_add(result_, k_, (void 0), ff_core_Ordering_Order$T)
117
+ }));
118
+ return result_
119
+ }
120
+
113
121
  export function Set_remove(self_, value_, ff_core_Ordering_Order$T) {
114
122
  return ff_core_Map.Map_remove(self_, value_, ff_core_Ordering_Order$T)
115
123
  }
@@ -166,6 +174,14 @@ export async function Set_addAll$(self_, that_, ff_core_Ordering_Order$T, $task)
166
174
  return ff_core_Map.Map_addAll(self_, that_, ff_core_Ordering_Order$T)
167
175
  }
168
176
 
177
+ export async function Set_addList$(self_, that_, ff_core_Ordering_Order$T, $task) {
178
+ let result_ = self_;
179
+ ff_core_List.List_each(that_, ((k_) => {
180
+ result_ = ff_core_Map.Map_add(result_, k_, (void 0), ff_core_Ordering_Order$T)
181
+ }));
182
+ return result_
183
+ }
184
+
169
185
  export async function Set_remove$(self_, value_, ff_core_Ordering_Order$T, $task) {
170
186
  return ff_core_Map.Map_remove(self_, value_, ff_core_Ordering_Order$T)
171
187
  }
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.4.21",
7
+ "version": "0.4.23",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "https://github.com/Ahnfelt/firefly-boot"
@@ -4,7 +4,7 @@
4
4
  "description": "Firefly language support",
5
5
  "author": "Firefly team",
6
6
  "license": "MIT",
7
- "version": "0.4.21",
7
+ "version": "0.4.23",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "https://github.com/Ahnfelt/firefly-boot"
package/bin/firefly.mjs DELETED
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import * as firefly from '../output/js/ff/compiler/Main.mjs';
package/guide/Main.ff DELETED
@@ -1,22 +0,0 @@
1
- nodeMain(system: NodeSystem) {
2
-
3
- //let lines = system.path("data.txt").readText().lines()
4
- let lines = [
5
- "Monday: 22.5"
6
- "Tuesday: 25.7"
7
- "Wednesday: 23.9"
8
- "Thursday: 22.4"
9
- "Friday: 20.3"
10
- ""
11
- "Saturday: 16.2"
12
- "Sunday: 21.1 "
13
- ]
14
- let pairs = lines.map {_.split(':')}.collect {
15
- | [day, temp] => Some(Pair(day.trim(), temp.trim().grabFloat()))
16
- | _ => None
17
- }
18
- let remaining = pairs.map {_.second}.sort().dropFirst().dropLast()
19
- let average = remaining.foldLeft(0.0) {_ + _} / remaining.size()
20
- system.writeLine("Average temperature: " + average)
21
-
22
- }