Skip to content
This repository was archived by the owner on Oct 15, 2025. It is now read-only.

Commit 6cbc8f9

Browse files
committed
Use Decodable instead of Decoder
1 parent a779413 commit 6cbc8f9

File tree

6 files changed

+35
-5
lines changed

6 files changed

+35
-5
lines changed

src/core/guillotine.ExecEvent.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import anticipation.*
2222
import contextual.*
2323
import fulminate.*
2424
import gossamer.*
25-
import rudiments.*
2625
import spectacular.*
2726

2827
object ExecEvent:

src/core/guillotine.OsProcess.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import anticipation.*
2222
import contingency.*
2323
import prepositional.*
2424
import proscenium.*
25-
import rudiments.*
2625
import vacuous.*
2726

2827
object OsProcess:

src/core/guillotine.Parameterizable.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import compiletime.summonFrom
2222

2323
import anticipation.*
2424
import prepositional.*
25-
import spectacular.*
2625

2726
object Parameterizable:
2827
given [ValueType: Encodable in Text] => ValueType is Parameterizable:

src/core/guillotine.Pid.scala

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*
2+
Rudiments, version 0.26.0. Copyright 2025 Jon Pretty, Propensive OÜ.
3+
4+
The primary distribution site is: https://propensive.com/
5+
6+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
7+
file except in compliance with the License. You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software distributed under the
12+
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13+
either express or implied. See the License for the specific language governing permissions
14+
and limitations under the License.
15+
*/
16+
17+
package guillotine
18+
19+
import language.experimental.captureChecking
20+
21+
import anticipation.*
22+
import contingency.*
23+
import fulminate.*
24+
import prepositional.*
25+
import spectacular.*
26+
27+
object Pid:
28+
given Pid is Communicable = pid => Message(pid.toString.tt)
29+
given Pid is Encodable in Text = _.toString.tt
30+
31+
given Tactic[NumberError] => Pid is Decodable in Text = text =>
32+
try Pid(text.s.toLong) catch case error: Exception => abort(NumberError(text, Int))
33+
34+
case class Pid(value: Long):
35+
override def toString(): String = "\u21af"+value

src/core/guillotine.PidError.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ package guillotine
1818

1919
import anticipation.*
2020
import fulminate.*
21-
import rudiments.*
2221

2322
case class PidError(pid: Pid)(using Diagnostics)
2423
extends Error(m"the process with PID ${pid.value} is not running")

src/core/guillotine.ProcessRef.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ package guillotine
1818

1919
import anticipation.*
2020
import prepositional.*
21-
import rudiments.*
2221
import vacuous.*
2322

2423
trait ProcessRef:

0 commit comments

Comments
 (0)