Issue5441.agda 565 B

12345678910111213141516171819202122232425262728
  1. open import Agda.Builtin.IO using (IO)
  2. open import Agda.Builtin.String using (String)
  3. open import Agda.Builtin.Unit using (⊤)
  4. data D : Set where
  5. c₁ c₂ : D
  6. f : D → Set → String
  7. f c₁ = λ _ → "OK"
  8. f c₂ = λ _ → "OK"
  9. -- The following pragma should refer to the generated Haskell name
  10. -- for f.
  11. {-# FOREIGN GHC {-# NOINLINE d_f_8 #-} #-}
  12. x : String
  13. x = f c₁ ⊤
  14. postulate
  15. putStrLn : String → IO ⊤
  16. {-# FOREIGN GHC import qualified Data.Text.IO #-}
  17. {-# COMPILE GHC putStrLn = Data.Text.IO.putStrLn #-}
  18. main : IO ⊤
  19. main = putStrLn x