-
Notifications
You must be signed in to change notification settings - Fork 257
Add new module Effect.Functor.Naperian
- Continuation of #2004
#2815
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
base: master
Are you sure you want to change the base?
Changes from 14 commits
1a86ef4
0dd5051
af6d2dc
eba481c
603483f
7dcb115
d76c8df
73bd5bd
e233f0e
ad30c67
775560f
6804ecd
a1de89f
527e4d7
3c478d3
d697f2c
0741736
5216bbb
ffda892
6ad71f0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,81 @@ | ||||||
------------------------------------------------------------------------ | ||||||
-- The Agda standard library | ||||||
-- | ||||||
-- Naperian functor | ||||||
-- | ||||||
-- Definitions of Naperian Functors, as named by Hancock and McBride, | ||||||
-- and subsequently documented by Jeremy Gibbons | ||||||
-- in the article "APLicative Programming with Naperian Functors" | ||||||
-- which appeared at ESOP 2017. | ||||||
-- https://link.springer.com/chapter/10.1007/978-3-662-54434-1_21 | ||||||
------------------------------------------------------------------------ | ||||||
|
||||||
{-# OPTIONS --cubical-compatible --safe #-} | ||||||
|
||||||
module Effect.Functor.Naperian where | ||||||
|
||||||
open import Effect.Functor using (RawFunctor) | ||||||
open import Function.Bundles using (_⟶ₛ_; _⟨$⟩_; Func) | ||||||
open import Level using (Level; suc; _⊔_) | ||||||
open import Relation.Binary.Bundles using (Setoid) | ||||||
open import Relation.Binary.PropositionalEquality.Core using (_≡_) | ||||||
|
open import Relation.Binary.PropositionalEquality.Core using (_≡_) |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can simplify this to:
open import Relation.Binary.PropositionalEquality.Properties as ≡ | |
import Relation.Binary.PropositionalEquality.Properties as ≡ using (setoid) |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Standardise, based on parametrisation on S : Setoid a ℓ
, itself a lexical convention:
a b c e f : Level | |
a b c ℓ : Level |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete!
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the revised version in my extended comment.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the current design wrt parametrisation, I think that A
should be explicit:
PropositionalNaperian = ∀ {A} → Naperian (≡.setoid A) | |
PropositionalNaperian = ∀ A → Naperian (≡.setoid A) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.