From 8d34af1e904c7ad19a6521e5ad10394044f0f8f3 Mon Sep 17 00:00:00 2001 From: Jon Pretty Date: Mon, 3 Jun 2024 09:59:30 +0200 Subject: [PATCH] Don't depend on Eucalyptus, and provide `soundness` exports --- fury | 4 ++-- src/core/guillotine.scala | 17 +++++++++-------- src/core/soundness+guillotine.scala | 3 +++ 3 files changed, 14 insertions(+), 10 deletions(-) create mode 100644 src/core/soundness+guillotine.scala diff --git a/fury b/fury index 73097fd..32af9ce 100644 --- a/fury +++ b/fury @@ -2,12 +2,12 @@ repo propensive/probably repo propensive/galilei -target guillotine/test +target guillotine/core project guillotine module core sources src/core - include eucalyptus/core + include contextual/core anticipation/log contingency/core turbulence/core module test sources src/test diff --git a/src/core/guillotine.scala b/src/core/guillotine.scala index 08c716c..35e34ad 100644 --- a/src/core/guillotine.scala +++ b/src/core/guillotine.scala @@ -319,19 +319,20 @@ object Sh: given Insertion[Parameters, Command] = command => Parameters(command.arguments*) given [ValueType: Parameterizable]: Insertion[Parameters, ValueType] = value => - Parameters(summon[Parameterizable[ValueType]].show(value)) + Parameters(ValueType.show(value)) object Parameterizable: - given path[PathType: GenericPath]: Parameterizable[PathType] = _.pathText + given [PathType: GenericPath] => PathType is Parameterizable = _.pathText - given int: Parameterizable[Int] = _.show + given Int is Parameterizable = _.show - given [ValueType](using encoder: Encoder[ValueType]): Parameterizable[ValueType] = - new Parameterizable[ValueType]: - def show(value: ValueType): Text = encoder.encode(value) + given [ValueType](using encoder: Encoder[ValueType]) => ValueType is Parameterizable: + type Self = ValueType + def show(value: ValueType): Text = encoder.encode(value) -trait Parameterizable[-ValueType]: - def show(value: ValueType): Text +trait Parameterizable: + type Self + def show(value: Self): Text object Guillotine: given Realm = realm"guillotine" diff --git a/src/core/soundness+guillotine.scala b/src/core/soundness+guillotine.scala new file mode 100644 index 0000000..59e4f42 --- /dev/null +++ b/src/core/soundness+guillotine.scala @@ -0,0 +1,3 @@ +package soundness + +export guillotine.{sh, PosixCommandOutputs, CommandOutput, Executor, ProcessRef, OsProcess, Process, Executable, Command, Pipeline, ExecError, PidError, Parameterizable}