1 | module Data.Functor.Restricted
3 | import Data.SortedMap
4 | import Data.SortedSet
8 | interface RFunctor (0 r : Type -> Type) (0 f : Type -> Type) | f where
9 | rmap : (r x, r y) => (x -> y) -> f x -> f y
11 | RFunctor Ord SortedSet where
12 | rmap f = fromList . map f . Prelude.toList