-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
import RoHs.Language.Lib
type Coord = R '["x" := Int , "y" := Int]
type Color = R '[ "R" := Int , "G" := Int , "B" := Int]
type Pixel = R0 (Coord ~+~ Color)
coord :: R0 Coord
coord = (labR0 @"x" (22 :: Int)) `cat0` (labR0 @"y" (11 :: Int))
color :: R0 Color
color = (labR0 @"R" (101 :: Int))
`cat0` (labR0 @"B" (102 :: Int))
`cat0` (labR0 @"G" (103 :: Int))
p :: Pixel
p = coord `cat0` color
y :: Int = sel0 @"y" p
-- y returns 22 here and not 11
Metadata
Metadata
Assignees
Labels
No labels