@effekt-lang/effekt 0.86.0 → 0.87.0

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.
@@ -39,7 +39,7 @@ def substring(str: String, from: Int): String =
39
39
 
40
40
  /// Checks whether str starts with the given prefix at `from`
41
41
  def isSubstringAt(str: String, prefix: String, from: Int): Bool = {
42
- with default[OutOfBounds, Bool] { false };
42
+ with default { false };
43
43
 
44
44
  val stringLength = str.length
45
45
  val prefixLength = prefix.length
@@ -236,7 +236,7 @@ namespace internal {
236
236
  """
237
237
 
238
238
  def utf8ByteLength(str: String): Int = stream::sum {
239
- for {str.each} { (c: Char) =>
239
+ for {str.each} { (c) =>
240
240
  do emit(c.utf8ByteCount)
241
241
  }
242
242
  }
@@ -323,7 +323,7 @@ def each(string: String): Unit / emit[Char] =
323
323
  }
324
324
 
325
325
  def collect(capacity: Int) { stream: () => Unit / emit[Char] }: String =
326
- returning::collect[Unit](capacity){stream}.second
326
+ returning::collect(capacity){stream}.second
327
327
 
328
328
  def collect { stream: () => Unit / emit[Char] }: String =
329
329
  collect(4){stream}
@@ -331,7 +331,7 @@ def collect { stream: () => Unit / emit[Char] }: String =
331
331
  namespace returning {
332
332
 
333
333
  def collect[R](capacity: Int) { stream: () => R / emit[Char] }: (R, String) = {
334
- val (result, bytes) = bytearray::returning::collect[R](capacity) { encodeUTF8 { stream } }
334
+ val (result, bytes) = bytearray::returning::collect(capacity) { encodeUTF8 { stream } }
335
335
  (result, bytes.toString)
336
336
  }
337
337