ModuleReexport.agda 377 B

123456789101112131415161718192021222324
  1. module ModuleReexport where
  2. open import Common.Unit
  3. open import Common.Nat
  4. open import Common.IO
  5. module A (B : Set) (b : B) where
  6. data X : Set where
  7. Con1 : B -> X
  8. Con2 : X
  9. f : X -> B
  10. f (Con1 x) = x
  11. f Con2 = b
  12. module X = A Nat 10
  13. main = printNat (A.f Nat 10 (X.Con1 20)) ,,
  14. putStrLn "" ,,
  15. printNat (A.f Nat 10 X.Con2) ,,
  16. putStrLn "" ,,
  17. return unit