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

try putting inject and lift instances in companion objects #2

Open
beezee opened this issue Sep 30, 2018 · 6 comments
Open

try putting inject and lift instances in companion objects #2

beezee opened this issue Sep 30, 2018 · 6 comments

Comments

@beezee
Copy link
Contributor

beezee commented Sep 30, 2018

if it works it eliminates need for imports and sets precedent for other provided typeclasses.

@beezee
Copy link
Contributor Author

beezee commented Sep 30, 2018

first crack - https://github.com/beezee/ldr/compare/fuck_a_duck

I don't think it's right, specifically I don't think that LDRK3[?[_], A1, A2, A3] matches constraint on H[_[_]] to be a subtype of LDR. BUT that's not what has the compiler complaining.

What I'm seeing is this scala/bug#9445 and whether or not the concern in prior paragraph is waiting behind it or not, I'm not sure I have a path to even find out.

@beezee
Copy link
Contributor Author

beezee commented Sep 30, 2018

oh ha this was an attempt to put transform in companion not inject and lift. Those are probably (hopefully? simpler)

@beezee
Copy link
Contributor Author

beezee commented Sep 30, 2018

LOLOLOLOLOLOLOL - https://github.com/beezee/ldr/compare/fuck_another_duck

proven it works, tested ok when manually added to 3 arity. generate whole cloth, compiler doesn't terminate.

motherfucker.

compile performance is always going to be a top fucking priority for this. it's methadone for scala devs.

side note, why I needed to import companion object for resolution to work, idk. am I stupid or is it a broken promise?

@beezee
Copy link
Contributor Author

beezee commented Sep 30, 2018

AHAHAHAHAHAHAHAHA non terminate spoke too soon.

image

@beezee
Copy link
Contributor Author

beezee commented Sep 30, 2018

for posterity, master branch:

image

@beezee
Copy link
Contributor Author

beezee commented Oct 7, 2018

look back at this with compiler statistics on. there's some interesting data to take. hunch right now is that iota wouldn't even have been an issue, mainly the matches on / in the iota helpers were costing time in patmat.

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

No branches or pull requests

1 participant