LeafSyntax
Syntax for lifting values into DescribedComputations
and creating leaf nodes in the log tree.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
Value members
Concrete methods
Create a ''failure'' treelog.LogTreeSyntax.DescribedComputation with -\/(description)
as the value and a failure treelog.LogTreeSyntax.DescribedComputation with the given description
.
Create a ''failure'' treelog.LogTreeSyntax.DescribedComputation with -\/(description)
as the value and a failure treelog.LogTreeSyntax.DescribedComputation with the given description
.
import treelog.LogTreeSyntaxWithoutAnnotations._
import scalaz.syntax.show._
val leaf = 1 ~>! "One"
println(result.run.value)
// Will print: -\/("One") - note that the 'left' means ''failure'', and the contained value is the description, not the 1.
println(result.run.written.shows)
// Will print:
// Failed: One
Attributes
Create a ''failure'' treelog.LogTreeSyntax.DescribedComputation using the given description
function to generate a description for the tree node's label and for the DescribedComputations
value (i.e. the value will be \/-(description(value))
.
Create a ''failure'' treelog.LogTreeSyntax.DescribedComputation using the given description
function to generate a description for the tree node's label and for the DescribedComputations
value (i.e. the value will be \/-(description(value))
.
import treelog.LogTreeSyntaxWithoutAnnotations._
import scalaz.syntax.show._
val leaf = 1 logFailure (x => s"One - $x")
println(result.run.value)
// Will print: -\/("One") - note that the 'left' means ''failure'', and the contained value is the description, not the 1.
println(result.run.written.shows)
// Will print:
// Failed: One - 1
Attributes
Create a ''success'' treelog.LogTreeSyntax.DescribedComputation with \/-(value)
as the value and a success TreeNode with the given description
.
Create a ''success'' treelog.LogTreeSyntax.DescribedComputation with \/-(value)
as the value and a success TreeNode with the given description
.
import treelog.LogTreeSyntaxWithoutAnnotations._
import scalaz.syntax.show._
val leaf = 1 logSuccess "One"
println(result.run.value)
// Will print: \/-(1) - note that the 'right' means ''success''
println(result.run.written.shows)
// Will print:
// One
Attributes
Create a ''success'' treelog.LogTreeSyntax.DescribedComputation with \/-(value)
as the value and a success treelog.LogTreeSyntax.DescribedComputation using the given description
function to generate a description for the tree node's label.
Create a ''success'' treelog.LogTreeSyntax.DescribedComputation with \/-(value)
as the value and a success treelog.LogTreeSyntax.DescribedComputation using the given description
function to generate a description for the tree node's label.
import treelog.LogTreeSyntaxWithoutAnnotations._
import scalaz.syntax.show._
val leaf = 1 logSuccess (x => s"One: $x")
println(result.run.value)
// Will print: \/-(1) - note that the 'right' means ''success''
println(result.run.written.shows)
// Will print:
// One: 1
Attributes
Sugar for logSuccess
Sugar for => String) logSuccess
Sugar for logFailure
Sugar for => String) logFailure