Skip to content

Commit dd371a4

Browse files
committed
Remove leftover show definitions
1 parent 49b2f52 commit dd371a4

File tree

3 files changed

+0
-38
lines changed

3 files changed

+0
-38
lines changed

libraries/common/array.effekt

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -618,25 +618,6 @@ def sorted[A](arr: Array[A]) { ord: (A, A) => Ordering }: Array[A] = {
618618
res
619619
}
620620

621-
// Show Instances
622-
// --------------
623-
624-
def show[A](arr: Array[A]) { showA: A => String }: String = {
625-
var output = "Array("
626-
val lastIndex = arr.size - 1
627-
628-
arr.foreachIndex { (index, a) =>
629-
if (index == lastIndex) output = output ++ showA(a)
630-
else output = output ++ showA(a) ++ ", "
631-
}
632-
output = output ++ ")"
633-
634-
output
635-
}
636-
def show(l: Array[Int]): String = show(l) { e => show(e) }
637-
def show(l: Array[Double]): String = show(l) { e => show(e) }
638-
def show(l: Array[Bool]): String = show(l) { e => show(e) }
639-
def show(l: Array[String]): String = show(l) { e => e }
640621

641622
def println(l: Array[Int]): Unit = println(show(l))
642623
def println(l: Array[Double]): Unit = println(show(l))

libraries/common/dequeue.effekt

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,6 @@ def popBack[R](dq: Dequeue[R]): Option[(R, Dequeue[R])] = dq match {
7676
}
7777

7878

79-
def show[A](d: Dequeue[A]) { showA: A => String }: String = {
80-
val Dequeue(front, frontSize, rear, rearSize) = d;
81-
"Dequeue(" ++ show(front){showA} ++ ", " ++ show(frontSize) ++ ", " ++
82-
show(rear){showA} ++ ", " ++ show(rearSize) ++ ")"
83-
}
84-
def show(l: Dequeue[Int]): String = show(l) { e => show(e) }
85-
def show(l: Dequeue[Double]): String = show(l) { e => show(e) }
86-
def show(l: Dequeue[Bool]): String = show(l) { e => show(e) }
87-
def show(l: Dequeue[String]): String = show(l) { e => e }
8879

8980
def println(l: Dequeue[Int]): Unit = println(show(l))
9081
def println(l: Dequeue[Double]): Unit = println(show(l))

libraries/common/option.effekt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,6 @@ def undefinedToOption[A](value: A): Option[A] =
5656
if (value.isUndefined) { None() } else { Some(value) }
5757

5858

59-
// Show Instances
60-
// --------------
61-
62-
def show[A](o: Option[A]) { showA: A => String }: String = o match {
63-
case None() => "None()"
64-
case Some(v) => "Some(" ++ showA(v) ++ ")"
65-
}
66-
def show(o: Option[Int]): String = show(o) { e => show(e) }
67-
def show(o: Option[Double]): String = show(o) { e => show(e) }
68-
def show(o: Option[Bool]): String = show(o) { e => show(e) }
6959

7060
def println(o: Option[Int]): Unit = println(show(o))
7161
def println(o: Option[Double]): Unit = println(show(o))

0 commit comments

Comments
 (0)