Skip to content

Commit

Permalink
Match explicitly with Tuple for ArrayRecord typing.
Browse files Browse the repository at this point in the history
  • Loading branch information
tarao committed Feb 8, 2024
1 parent 3cf165c commit a051f78
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,22 @@ object syntax {
}

type ++[R1, R2] = R1 match {
case % => Record.Concat[R1, R2]
case _ => ArrayRecord.Concat[R1, R2]
case % => Record.Concat[R1, R2]
case Tuple => ArrayRecord.Concat[R1, R2]
}

type +[R, F <: Tuple] = R match {
case % => Record.Concat[R, F *: EmptyTuple]
case _ => ArrayRecord.Concat[R, F *: EmptyTuple]
case % => Record.Concat[R, F *: EmptyTuple]
case Tuple => ArrayRecord.Concat[R, F *: EmptyTuple]
}

type --[R <: %, U <: Tuple] = Record.Unselect[R, U]

type -[R <: %, L] = Record.Unselect[R, L *: EmptyTuple]

type in[L, R] = R match {
case % => Record.Lookup[R, L]
case _ => ArrayRecord.Lookup[R, L]
case % => Record.Lookup[R, L]
case Tuple => ArrayRecord.Lookup[R, L]
}

type by[L, I] = L match {
Expand Down

0 comments on commit a051f78

Please sign in to comment.