-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3014ba3
commit 39f7bec
Showing
9 changed files
with
28 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
pipez/src/main/scala-3/pipez/PipeSemiautoConfiguredSupport.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,22 @@ | ||
package pipez | ||
|
||
/** Mix-in providing `derive` method for semiautomatic `Pipe` derivation without recursion and custom configuration */ | ||
trait PipeSemiautoConfiguredSupport[Pipe[_, _]] { | ||
|
||
/** Derives `Pipe[In, Out]` using provided settings */ | ||
inline def derive[Pipe[_, _], In, Out]( | ||
inline config: PipeDerivationConfig[Pipe, In, Out] | ||
)(using | ||
pipeDerivation: PipeDerivation[Pipe] | ||
): Pipe[In, Out] = ${ pipez.internal.Macros.deriveConfigured[Pipe, In, Out]('{ config })('{ pipeDerivation }) } | ||
|
||
/** Utility useful for providing configuration to macro. | ||
* | ||
* Example: `TypeClass.derive(TypeClass.Config[In, Out].enableDiagnostics)`. | ||
*/ | ||
object Config { | ||
|
||
/** Initiates the config object. Should be used ONLY within `TypeClass.derive(...)` */ | ||
def apply[In, Out]: PipeDerivationConfig[Pipe, In, Out] = ??? | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters