Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data a :~>: b
- (~>) :: a ~~> b => a -> b -> a :~>: b
- pattern (:~>:) :: t -> t -> (:~>:) t t
- class a ~~> b where
- (~~>) :: a -> b -> a
- newtype FromMany a = FromMany a
- newtype ToMany a = ToMany a
- newtype FromTo a = FromTo a
- type Lens s t a b = forall f. Functor f => (a -> f b) -> s -> f t
- parent :: Lens (a :~>: b) (c :~>: b) a c
- child :: Lens (a :~>: b) (a :~>: c) b c
- fromMany :: Lens (FromMany a) (FromMany b) a b
- toMany :: Lens (ToMany a) (ToMany b) a b
- fromTo :: Lens (FromTo a) (FromTo b) a b
Documentation
Represents the edge in a directed graph with nodes a
and b
(~~>) a b => a ~~> ((:~>:) b c) Source | |
(~~>) a b => (FromMany a) ~~> ((:~>:) b c) Source | |
(Eq a, Eq b) => Eq ((:~>:) a b) Source | |
(Ord a, Ord b) => Ord ((:~>:) a b) Source | |
(Read a, Read b) => Read ((:~>:) a b) Source | |
(Show a, Show b) => Show ((:~>:) a b) Source | |
Generic ((:~>:) a b) Source | |
((~~>) a b, (~~>) b c) => ((:~>:) a b) ~~> c Source | |
type Rep ((:~>:) a b) Source |
(~>) :: a ~~> b => a -> b -> a :~>: b infixr 2 Source
Smart constructor which ensures inhabitants of :~>:
are linked
pattern (:~>:) :: t -> t -> (:~>:) t t Source
We need to hide PointsTo
to enforce use of the smart constructor.
But then we lose the ability to pattern match.
We recover it by defining a 'read-only' pattern.
class a ~~> b where infixl 3 Source
a ~~> b
returns an a
linked to b
(~~>) a b => a ~~> (FromTo b) Source | |
(~~>) a b => a ~~> (ToMany b) Source | |
(~~>) a b => a ~~> ((:~>:) b c) Source | |
((~~>) a b, (~~>) a c) => a ~~> (b, c) Source | |
((~~>) a b, (~~>) a c, (~~>) a d) => a ~~> (b, c, d) Source | |
((~~>) a b, (~~>) a c, (~~>) a d, (~~>) a e) => a ~~> (b, c, d, e) Source | |
((~~>) a b, Functor f) => (f a) ~~> b Source | |
(~~>) a b => (FromTo a) ~~> b Source | |
(~~>) (FromTo b) c => (ToMany (a, FromTo b)) ~~> c Source | |
(~~>) (FromTo a) c => (ToMany (FromTo a, b)) ~~> c Source | |
(~~>) a b => (FromMany a) ~~> b Source | |
(~~>) a b => (FromMany a) ~~> ((:~>:) b c) Source | |
((~~>) a c, (~~>) b c) => (a, b) ~~> c Source | |
((~~>) a b, (~~>) b c) => ((:~>:) a b) ~~> c Source | |
((~~>) a d, (~~>) b d, (~~>) c d) => (a, b, c) ~~> d Source | |
((~~>) a e, (~~>) b e, (~~>) c e, (~~>) d e) => (a, b, c, d) ~~> e Source |
FromMany (a, b, ...) :~>: c
indicates that each of a
, b
, ... point to c
FromMany a |
Functor FromMany Source | |
Eq a => Eq (FromMany a) Source | |
Ord a => Ord (FromMany a) Source | |
Read a => Read (FromMany a) Source | |
Show a => Show (FromMany a) Source | |
Generic (FromMany a) Source | |
(~~>) a b => (FromMany a) ~~> b Source | |
(~~>) a b => (FromMany a) ~~> ((:~>:) b c) Source | |
type Rep (FromMany a) Source |
a :~>: ToMany (b, c, ...)
indicates that a
points to each of b
, c
, ...
ToMany a |
Functor ToMany Source | |
(~~>) a b => a ~~> (ToMany b) Source | |
Eq a => Eq (ToMany a) Source | |
Ord a => Ord (ToMany a) Source | |
Read a => Read (ToMany a) Source | |
Show a => Show (ToMany a) Source | |
Generic (ToMany a) Source | |
(~~>) (FromTo b) c => (ToMany (a, FromTo b)) ~~> c Source | |
(~~>) (FromTo a) c => (ToMany (FromTo a, b)) ~~> c Source | |
type Rep (ToMany a) Source |
a :~>: FromTo (b, c, ...) :~>: d
indicates that
a
points to each of b
, c
, ... which each point to d
FromTo a |
Functor FromTo Source | |
(~~>) a b => a ~~> (FromTo b) Source | |
Eq a => Eq (FromTo a) Source | |
Ord a => Ord (FromTo a) Source | |
Read a => Read (FromTo a) Source | |
Show a => Show (FromTo a) Source | |
Generic (FromTo a) Source | |
(~~>) a b => (FromTo a) ~~> b Source | |
(~~>) (FromTo b) c => (ToMany (a, FromTo b)) ~~> c Source | |
(~~>) (FromTo a) c => (ToMany (FromTo a, b)) ~~> c Source | |
type Rep (FromTo a) Source |