KacperFKorban / GUInep

Automatic UI forms for Scala 3 functions
https://kacperfkorban.github.io/GUInep/
Apache License 2.0
14 stars 0 forks source link

Support opaque types #49

Open KacperFKorban opened 4 months ago

KacperFKorban commented 4 months ago

It should be possible to use opaque types as function inputs. e.g.

object HiddenScope {
  opaque type PLN = Int
  object PLN:
    def apply(value: Int): PLN = value
    extension (pln: PLN)
      def toInt: Int = pln
}

def showPLN(pln: HiddenScope.PLN): String =
  s"${pln.toInt} PLN"