Issue2909-1.agda 483 B

12345678910111213141516171819202122232425262728293031
  1. {-# OPTIONS --guardedness #-}
  2. open import Agda.Builtin.IO
  3. open import Agda.Builtin.Unit
  4. record Box (A : Set) : Set where
  5. field
  6. unbox : A
  7. open Box public
  8. record R : Set where
  9. coinductive
  10. field
  11. force : Box R
  12. open R public
  13. r : R
  14. unbox (force r) = r
  15. postulate
  16. seq : {A B : Set} → A → B → B
  17. return : {A : Set} → A → IO A
  18. {-# COMPILE GHC return = \_ -> return #-}
  19. {-# COMPILE GHC seq = \_ _ -> seq #-}
  20. main : IO ⊤
  21. main = seq r (return tt)