Skip to content

Use instances for type classes#3

Open
lemastero wants to merge 3 commits intomainfrom
use-instances
Open

Use instances for type classes#3
lemastero wants to merge 3 commits intomainfrom
use-instances

Conversation

@lemastero
Copy link
Owner

No description provided.


record Applicative (F : Type 𝑢 -> Type 𝑢) : Type (usuc 𝑢) where
record Applicative (F : Type 𝑢 -> Type 𝑢) {{ _ : Functor F }} : Type (usuc 𝑢) where
field

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So you're enforcing that F is a functor by demanding we have an (implicit) proof of that fact lying around somewhere? Nice.

; return-flatmap = {! !}
; flatmap-return = {! !}
; flatmap-compose = {! !}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here will be some proofs (instances). Cool. So we have a bit of work left to do. 👍🏼

@@ -1,15 +1,14 @@
{-# OPTIONS --without-K --exact-split --safe --no-unicode #-}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting that you use --no-unicode. Just curious, why do you not like unicode?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise, those pragmas are exactly the ones I use in my agda-algebras library. 👍🏼

By the way, I think they're maybe phasing out --without-K in favor of --cubical-compatible. (I much prefer the old name as it seems to give a more precise description of what going on.)

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop pragma but awoid.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants