mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-21 02:31:50 +03:00
230f42b697
In the `MkFix : f (Fix f) -> Fix f` example, using `Erased` for `f` makes the type reduce to `[__] (Fix [__]) -> Fix [__]` and because `[__] e1 ... en` computes to `[__]`, we end up with `[__] -> Fix [__]` which does not reference `Fix` anymore.
17 lines
224 B
Idris
17 lines
224 B
Idris
%default total
|
|
|
|
data Fix : (Type -> Type) -> Type where
|
|
MkFix : f (Fix f) -> Fix f
|
|
|
|
F : Type
|
|
F = Fix Not
|
|
|
|
yesF : Not F -> F
|
|
yesF nf = MkFix nf
|
|
|
|
notF : Not F
|
|
notF (MkFix f) = f (yesF f)
|
|
|
|
argh : Void
|
|
argh = notF (yesF notF)
|