Skip to content

Instantly share code, notes, and snippets.

@danielwaterworth
Created June 18, 2026 02:52
Show Gist options
  • Select an option

  • Save danielwaterworth/3632bb234af9134505507f43a3c32a1f to your computer and use it in GitHub Desktop.

Select an option

Save danielwaterworth/3632bb234af9134505507f43a3c32a1f to your computer and use it in GitHub Desktop.
-- 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