Portability | non-portable |
---|---|
Stability | experimental |
Maintainer | hpacheco@di.uminho.pt |
Pointless Lenses: bidirectional lenses with point-free programming
Internet Movie Database example
- type Imdb = ([Show], [Actor])
- type Show = (((Year, Title), [Review]), Either Movie TV)
- type Review = (User, [Comment])
- type Movie = (Director, [BoxOffice])
- type BoxOffice = (Country, Maybe Value)
- type TV = [Season]
- type Season = (Year, [Episode])
- type Actor = (Name, [Played])
- type Played = (((Year, Title), Role), [Award])
- type Award = (Year, Category)
- type Year = Int
- type Title = String
- type User = String
- type Comment = String
- type Director = String
- type Country = String
- type Value = Nat
- type Episode = String
- type Name = String
- type Role = String
- type Category = String
- dytrole :: x -> ((Year, Title), Role)
- imdb :: Lens Imdb ([(((Year, Title), Nat), (Director, Value))], [(Name, [Category])])
- actor :: Lens Actor (Name, [Category])
- movie :: Lens Movie (Director, Value)
- awards :: Lens [Played] [Category]
- shows :: Lens [Show] [(((Year, Title), Nat), (Director, Value))]
- boxoffices :: Lens [BoxOffice] Value
- reviews :: Lens [Review] Nat
- tv :: Lens TV [Episode]
- imdb_opt :: Lens Imdb ([(((Year, Title), Nat), (Director, Value))], [(Name, [Category])])
- actor_opt :: Lens Actor (Name, [Category])
- movie_opt :: Lens Movie (Director, Value)
- awards_opt :: Lens [Played] [Category]
- shows_opt :: Lens [Show] [(((Year, Title), Nat), (Director, Value))]
- boxoffices_opt :: Lens [BoxOffice] Value
- reviews_opt :: Lens [Review] Nat
Documentation
Specification
Optimization
awards_opt :: Lens [Played] [Category]Source
reviews_opt :: Lens [Review] NatSource