Skip to content
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

Fix kind of HRec #385

Closed
L-as opened this issue Mar 16, 2022 · 4 comments
Closed

Fix kind of HRec #385

L-as opened this issue Mar 16, 2022 · 4 comments

Comments

@L-as
Copy link
Member

L-as commented Mar 16, 2022

it should be type HRec :: [(Symbol, Type)] -> Type

@L-as L-as mentioned this issue Mar 16, 2022
@srid
Copy link
Member

srid commented Mar 17, 2022

I don't have the context into requiring it to be of this particular kind, but note thatHRec in its current form can be rewritten using NP from sop-core:

type HRec' as = NP (Labeled Symbol) as

@L-as
Copy link
Member Author

L-as commented Mar 23, 2022

I'm thinking maybe we don't want to change the kind but instead fix the constructor.

@L-as
Copy link
Member Author

L-as commented Mar 23, 2022

your idea is good

@TotallyNotChase
Copy link
Collaborator

I'm a bit confused here. I think Labeled Symbol wouldn't work as the environment here, since in the current use cases, Labeled is being treated as if it had the kind signature-

type Labeled :: Symbol -> Type -> Type

(though in reality, the current kind signature of Labeled is forall k. k -> Type -> Type)

That is, the first parameter of Labeled must be a type level symbol. Labeled Symbol wouldn't fit this description right? Since that'd mean Labeled has kind Type -> Type -> Type, and you can't actually specify Labeled name where name :: Symbol.

Anyway, the environment argument shouldn't actually take the Symbol literal I believe, since it's supposed to be different for each type in as.

I do think a lot of this HRec stuff and the machinery in TryFrom can be simplified via sop-core but it might be a bit involved.

@TotallyNotChase TotallyNotChase linked a pull request Apr 8, 2022 that will close this issue
@L-as L-as closed this as completed Apr 19, 2022
@L-as L-as removed a link to a pull request Apr 19, 2022
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

No branches or pull requests

3 participants