Created
June 18, 2026 02:52
-
-
Save danielwaterworth/3632bb234af9134505507f43a3c32a1f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Expected: | |
| -- 3 | |
| -- | |
| -- Actual with Idris 2 0.8.0's default Chez backend: | |
| -- Exception: incorrect number of arguments 0 to #<procedure ...> | |
| data Tail = MkTail (Inf (Nat -> Nat)) | |
| mutual | |
| tail : Nat -> Nat | |
| tail 0 = 3 | |
| tail _ = case delayedTail of MkTail delayed => delayed 0 | |
| delayedTail : Tail | |
| delayedTail = MkTail (Delay tail) | |
| main : IO () | |
| main = printLn (tail 1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment