Skip to content

Instantly share code, notes, and snippets.

@MarcelineVQ
Last active January 23, 2020 22:31
Show Gist options
  • Save MarcelineVQ/ffc0736ffc3706784c670fb235cb43ba to your computer and use it in GitHub Desktop.
Save MarcelineVQ/ffc0736ffc3706784c670fb235cb43ba to your computer and use it in GitHub Desktop.
@MarcelineVQ
Copy link
Author

MarcelineVQ commented Jan 23, 2020

I've a similar issue with wanting to declare the fixity of a record parameter.
agda/agda#1787 (comment) points to this git issue, but how can this be applied to records?
Does

module _ {A : Set}  (_+_ : A → A → A) (let infixl 5 _+_; _+_ = _+_) where
  record Add : Set where
    field
      assoc : ∀ {m n o} → m + (n + o) ≡ m + n + o

have the same meaning and use as

record Add {A : Set} (p : A → A → A) : Set where
  infixl 5 _+_
  _+_ : A → A → A
  _+_ = p
  field
    assoc : ∀ {m n o} → m + (n + o) ≡ m + n + o

?
Can we use that module let syntax with records directly (without module) or are these two the only ways we have currently to declare a fixity for a record parameter?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment