Skip to content

Commit

Permalink
Close #255 - [refined4s-refined-compat-scala2] Add Uri, Url and Uuid
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-lee committed Jan 20, 2024
1 parent 1af6ef1 commit b5740f6
Showing 1 changed file with 27 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package refined4s.compat

import eu.timepit.refined
import eu.timepit.refined.api.{Refined, RefinedTypeOps}
import eu.timepit.refined.types.AllTypes
import eu.timepit.refined.types.AllTypesBinCompat1
import eu.timepit.refined.types.AllTypesBinCompat2
Expand All @@ -8,5 +10,29 @@ import eu.timepit.refined.types.AllTypesBinCompat3
/** @author Kevin Lee
* @since 2024-01-19
*/
trait RefinedCompatAllTypes extends AllTypes with AllTypesBinCompat1 with AllTypesBinCompat2 with AllTypesBinCompat3
trait RefinedCompatAllTypes extends AllTypes with AllTypesBinCompat1 with AllTypesBinCompat2 with AllTypesBinCompat3 {

final type Uri = allTypes.Uri
final val Uri = allTypes.Uri

final type Url = allTypes.Url
final val Url = allTypes.Url

final type Uuid = allTypes.Uuid
final val Uuid = allTypes.Uuid

}
object RefinedCompatAllTypes extends RefinedCompatAllTypes

private[compat] object allTypes {

type Uri = String Refined refined.string.Uri
object Uri extends RefinedTypeOps[Uri, String]

type Url = String Refined refined.string.Url
object Url extends RefinedTypeOps[Url, String]

type Uuid = String Refined refined.string.Uuid
object Uuid extends RefinedTypeOps[Uuid, String]

}

0 comments on commit b5740f6

Please sign in to comment.