Skip to content

Commit

Permalink
Updates for Contingency changes
Browse files Browse the repository at this point in the history
  • Loading branch information
propensive committed Jul 5, 2024
1 parent faa93ba commit 23c5610
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/core/schema.scala
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import merino.*

import scala.compiletime.*

import errorHandlers.throwUnsafely
import strategies.throwUnsafely

object IntRangeError:
def range(minimum: Optional[Int], maximum: Optional[Int]): Text =
Expand Down Expand Up @@ -124,7 +124,7 @@ object JsonRecord:
// def transform
// (value: Optional[Json], params: List[String])
// : Optional[Regex] raises RegexError =
// (erased invalidRegex: Errant[RegexError]) ?=>
// (erased invalidRegex: Tactic[RegexError]) ?=>
// value.let(_.as[Text]).let: pattern =>
// Regex(pattern)

Expand Down
5 changes: 2 additions & 3 deletions src/test/example.scala
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import contingency.*
import merino.*
import hieroglyph.*, charEncoders.utf8

import errorHandlers.throwUnsafely
import strategies.throwUnsafely

object ExampleSchema extends JsonSchema(Json.parse(t"""{
"$$id": "abc",
Expand Down Expand Up @@ -56,6 +56,5 @@ object ExampleSchema extends JsonSchema(Json.parse(t"""{
}
}""").as[JsonSchemaDoc]):
import RecordField.*

transparent inline def record(json: Json): JsonRecord = ${build('json)}

transparent inline def record(json: Json): JsonRecord = ${build('json)}
2 changes: 1 addition & 1 deletion src/test/tests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import vacuous.*
import kaleidoscope.*

import unsafeExceptions.canThrowAny
import errorHandlers.throwUnsafely
import strategies.throwUnsafely

object Tests extends Suite(t"Villainy tests"):
def run(): Unit =
Expand Down

0 comments on commit 23c5610

Please sign in to comment.