-
-
Save gallais/388c1f3c21b8910d0f4898c383dae55c 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
open import Data.String | |
record Print (A : Set) : Set where | |
field | |
print : A → String | |
open Print {{…}} public | |
mutual | |
data α : Set where | |
begin : α | |
step-α : β → α | |
data β : Set where | |
step-β : α → β | |
example : α | |
example = step-α (step-β begin) | |
mutual | |
instance | |
print-α : Print α | |
print-β : Print β | |
Print.print print-α begin = "." | |
Print.print print-α (step-α b) = "a" ++ print b | |
Print.print print-β (step-β a) = "b" ++ print a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment