From e0a702dfc541d77c9d81e7cdc01df69a9908e9f5 Mon Sep 17 00:00:00 2001 From: Jon Pretty Date: Fri, 1 Dec 2023 09:09:42 +0100 Subject: [PATCH] Moved `Internet` into Nettlesome --- src/core/internet.scala | 25 ------------------------- src/test/tests.scala | 13 ------------- 2 files changed, 38 deletions(-) delete mode 100644 src/core/internet.scala diff --git a/src/core/internet.scala b/src/core/internet.scala deleted file mode 100644 index 48e3765..0000000 --- a/src/core/internet.scala +++ /dev/null @@ -1,25 +0,0 @@ -/* - Rudiments, version [unreleased]. Copyright 2023 Jon Pretty, Propensive OÜ. - - The primary distribution site is: https://propensive.com/ - - Licensed under the Apache License, Version 2.0 (the "License"); you may not use this - file except in compliance with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software distributed under the - License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, - either express or implied. See the License for the specific language governing permissions - and limitations under the License. -*/ - -package rudiments - -import language.experimental.captureChecking - -erased class Internet() - -def internet[T](fn: (erased Internet) ?=> T): T = - val internet: Internet = ### - fn(using internet) diff --git a/src/test/tests.scala b/src/test/tests.scala index 314f879..330203f 100644 --- a/src/test/tests.scala +++ b/src/test/tests.scala @@ -30,13 +30,6 @@ case class Person(name: Text, age: Int) object Tests extends Suite(t"Rudiments Tests"): def run(): Unit = - def remoteCall()(using Internet): Unit = () - - test(t"Check remote call is callable with `Internet`"): - internet: - remoteCall() - .assert() - test(t"Dual extraction"): object AsInt: def unapply(x: String): Option[Char] = Some('I') @@ -49,12 +42,6 @@ object Tests extends Suite(t"Rudiments Tests"): case _ => ('X', 'X') .assert(_ == ('I', 'J')) - test(t"Check remote call is not callable without `Internet`"): - demilitarize: - remoteCall() - .map(_.errorId) - .assert(_ == List(ErrorId.MissingImplicitArgumentID)) - test(t"Display a PID"): Pid(2999).toString .assert(_ == "↯2999")