Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why Haskell typeclasses in Agda are started with `Raw`?

Tags:

agda

In the Agda standard library, we have RawMonad, RawApplicative, etc..

RawMonad : ∀ {f} → (Set f → Set f) → Set _
RawMonad M = RawIMonad {I = ⊤} (λ _ _ → M)

RawMonadZero : ∀ {f} → (Set f → Set f) → Set _
RawMonadZero M = RawIMonadZero {I = ⊤} (λ _ _ → M)

RawMonadPlus : ∀ {f} → (Set f → Set f) → Set _
RawMonadPlus M = RawIMonadPlus {I = ⊤} (λ _ _ → M)

Why do they start with Raw? Are there Monad or Applicative in Agda?

like image 259
ice1000 Avatar asked Nov 21 '25 05:11

ice1000


1 Answers

I've been told by Nils Anders Danielsson (their author, I suspect) once that it's because they don't contain proofs of the respective laws. AFAIK, the Agda standard library doesn't have versions of these that do contain such proofs, but you can roll your own if you like.

like image 171
Dominique Devriese Avatar answered Nov 22 '25 19:11

Dominique Devriese



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!