`second`/`right` derived from `first`/`left`
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 28/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Ambito
- backend
Direzione di ricerca
The issue asks whether Strong and Choice can derive second and right from first and left, and whether PureScript’s lack of default type class implementations explains the current design. Start by reading the Strong and Choice definitions and their implementations; the issue names no files or tests. Done means establishing the design reason and whether changing the class definitions is viable.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Is there any reason why Strong/Choice require second/right and not instead derive them from first/left?
secondBasedOnFirst :: forall p a b c. Strong p => p a b -> p (Tuple c a) (Tuple c b)
-- equivalent to `second`?
secondBasedOnFirst = dimap swap swap <<< first
where
swap :: forall x y. Tuple x y -> Tuple y x
swap (Tuple a b) = Tuple b a
rightBasedOnLeft :: forall p a b c. Choice p => p a b -> p (Either c a) (Either c b)
-- equivalent to `right`?
rightBasedOnLeft = dimap flip flip <<< left
where
flip :: forall x y. Either x y -> Either y x
flip (Left a) = Right a
flip (Right b) = Left b
Is this only because of lack of default type class member implementations feature in PureScript or is there any other reason?
- Lingua principale
- PureScript
- Stelle
- 34
- Fork
- 13
- Merge medio
- 3g 10m
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di purescript/purescript-profunctor
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
-
Add `Mux` and `Demux`Apertastatus: needs more info
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
purescript/purescript-profunctor#32 · 1 commento ·
-
Add Choice CostarApertatype: enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
Tutte le issue di purescript/purescript-profunctor
Issue simili
-
ManageSieve proxy: a backend's NO/BYE greeting is skipped as a capability line and reported as EOFApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Mend: dependency security vulnerability
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
ManageIQ/manageiq-pods#1476 ·
I maintainer di solito rispondono entro 1 giorno
-
mcp: typed tool handlers lose wrapped JSON-RPC errorsForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
modelcontextprotocol/go-sdk#1529 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
FinanceFlash/unvibecode#818 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100