]> Git — Sourcephile - haskell/symantic-base.git/blob - src/Symantic/Dityped/Routable.hs
cabal: cleanup
[haskell/symantic-base.git] / src / Symantic / Dityped / Routable.hs
1 module Symantic.Dityped.Routable where
2
3 import Data.Eq (Eq)
4 import Text.Show (Show)
5
6 import Symantic.Dityped.Transformable
7
8 -- * Class 'Routable'
9 class Routable repr where
10 (<!>) :: repr a k -> repr b k -> repr (a:!:b) k
11 (<!>) = lift2 (<!>)
12 default (<!>) ::
13 Liftable2 repr => Routable (Unlifted repr) =>
14 repr a k -> repr b k -> repr (a:!:b) k
15 infixr 3 <!>
16
17 -- ** Type (':!:')
18 -- | Like @(,)@ but @infixr@.
19 data (:!:) a b = a:!:b
20 deriving (Eq, Show)
21 infixr 3 :!: