Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Declare instances as being instances #33

Closed
wenkokke opened this issue Aug 31, 2014 · 1 comment
Closed

Declare instances as being instances #33

wenkokke opened this issue Aug 31, 2014 · 1 comment

Comments

@wenkokke
Copy link
Contributor

Shouldn't all values, such as Data.List.monad now be declared as instances?

instance
    monad : ∀ {ℓ} → RawMonad (List {ℓ})
    monad = record
      { return = λ x → x ∷ []
      ; _>>=_  = λ xs f → concat (map f xs)
      }

Or am I supposed to declare these values as instances locally?

import Data.List as List
private
    instance
        ListMonad = List.monad
@MatthewDaggitt
Copy link
Contributor

Apologies for the very late reply. The standard library tries to use only the core features of Agda, and therefore there are no current plans to incorporate instance arguments at the moment. Declaring them locally seems the best bet.

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

No branches or pull requests

2 participants