Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

chore(Maybe): Upgrade the typing for maybe.sequence #48

Closed
wants to merge 1 commit into from

Conversation

Blu-J
Copy link

@Blu-J Blu-J commented Mar 16, 2018

We would like to have a better typing of sequence such that when we use sequence we get returned a typing with same informational entropy as what was inputed.
Example type difference

from: typeof sequence({ a1: Monad<A>, a2: Monad<A> }) === Monad<{ [string]: A }>
to: typeof sequence({ a1: Monad<A>, a2: Monad<A> }) === Monad<{ a1: A, a2: A}>

and

from: typeof sequence<A | B>({ a: Monad<A>, b: Monad<B> }) === Monad<{ [string]: A | B }>
to: typeof sequence({ a: Monad<A>, b: Monad<B> }) === Monad<{ a: A, b: B}>

Breaking: Previous typings that specified the generic for funciton of all or sequence will fail.

We would like to have a better typing of sequence such that when we use sequence we get returned a typing with same informational entropy as what was inputed.
Example type difference
```
from: typeof sequence({ a1: Monad<A>, a2: Monad<A> }) === Monad<{ [string]: A }>
to: typeof sequence({ a1: Monad<A>, a2: Monad<A> }) === Monad<{ a1: A, a2: A}>
```
and
```
from: typeof sequence<A | B>({ a: Monad<A>, b: Monad<B> }) === Monad<{ [string]: A | B }>
to: typeof sequence({ a: Monad<A>, b: Monad<B> }) === Monad<{ a: A, b: B}>
```

Breaking: Previous typings that specified the generic for funciton of all or sequence will fail.
@cbowdon
Copy link
Owner

cbowdon commented Dec 15, 2018

Sorry this has languished so long. I'm no longer actively maintaining this project and therefore not going to merge any more PRs. Thank you very much for your contribution all the same.

@cbowdon cbowdon closed this Dec 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants