mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-24 20:23:11 +03:00
23 lines
384 B
Idris
23 lines
384 B
Idris
module Test
|
|
|
|
private
|
|
infixr 5 ~:>
|
|
|
|
public export
|
|
infixr 5 ~>
|
|
infixl 5 |>
|
|
|
|
public export
|
|
record HasComp (x : Type) where
|
|
constructor MkComp
|
|
(~:>) : x -> x -> Type
|
|
comp : {0 a, b, c : x} -> a ~:> b -> b ~:> c -> a ~:> c
|
|
|
|
public export
|
|
(~>) : (s : HasComp a) => a -> a -> Type
|
|
(~>) = (~:>) s
|
|
|
|
export
|
|
typesHaveComp : HasComp Type
|
|
typesHaveComp = MkComp (\x, y => x -> y) (flip (.))
|