mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-11 06:14:41 +03:00
a972778eab
They don't all pass yet, for minor reasons. Coming shortly... Unfortunately the startup overhead for chez is really noticeable here!
22 lines
482 B
Idris
22 lines
482 B
Idris
module Using
|
|
|
|
interface MagmaT a where
|
|
op: a -> a -> a
|
|
|
|
interface MagmaT a => SemigroupT a where
|
|
assoc: (x, y, z: a) -> (x `op` y) `op` z = x `op` (y `op` z)
|
|
|
|
[NamedMagma1] MagmaT Bool where
|
|
False `op` False = False
|
|
_ `op` _ = True
|
|
|
|
[NamedMagma2] MagmaT Bool where
|
|
True `op` True = True
|
|
_ `op` _ = False
|
|
|
|
[NamedSemigroup1] SemigroupT Bool using NamedMagma1 where
|
|
assoc = ?hole1
|
|
|
|
[NamedSemigroup2] SemigroupT Bool using NamedMagma2 where
|
|
assoc = ?hole2
|