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

MD5 doesn't typecheck #12

Open
sciadopitys opened this issue Jun 12, 2018 · 7 comments
Open

MD5 doesn't typecheck #12

sciadopitys opened this issue Jun 12, 2018 · 7 comments
Assignees

Comments

@sciadopitys
Copy link

sciadopitys commented Jun 12, 2018

When I try to build the package, this error message is displayed. I am currently using Windows 8.

Type checking .\Data\Crypto\Hash\MD5.idr
.\Data\Crypto\Hash\MD5.idr:85:15:
   |
85 | shouldMatch_a : hashMessage dummyMD5 (map (intToBits {n=8}) [97]) = intToBits 0x0cc175b9c0f1b6a831c399e269772661
   |               ^
When checking type of Data.Crypto.Hash.MD5.shouldMatch_a:
Can't find implementation for Hash phTy b outputLength
@sellout sellout self-assigned this Jun 12, 2018
@sellout
Copy link
Contributor

sellout commented Jun 12, 2018

I get that same error message on OS X. Apologies. I’ll dig into it tomorrow.

@sellout
Copy link
Contributor

sellout commented Jun 12, 2018

Ah, it’s the old “bound as an implicit” error.

@sellout
Copy link
Contributor

sellout commented Jun 12, 2018

The quick fix is to replace dummyMD5 with Data.Crypto.Hash.MD5.dummyMD5 in all of the shouldMatch types.

Or, just comment out the shouldMatch definitions, as they’re just the tests.

But I should have a proper PR tomorrow.

@sciadopitys
Copy link
Author

I replaced dummyMD5 with Data.Crypto.Hash.MD5.dummyMD5, but now it is stuck on "Type checking .\Data\Crypto\Hash\MD5.idr"

@sciadopitys
Copy link
Author

Are you still working on this?

@sellout
Copy link
Contributor

sellout commented Jul 3, 2018

Sorry – this is a trickier problem – there are a number of places in idris-crypto that have hit performance issues with Fin / Vect / etc. It’ll take some dedicated time to iron out, and I don’t have any at the moment.

@galtys
Copy link

galtys commented Oct 18, 2020

Hello,
I tried to build the crypto package but no luck. What are the performance issues with Fin / Vect / etc. Is it solvable? Thanks.

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