typelead / eta

The Eta Programming Language, a dialect of Haskell on the JVM
https://eta-lang.org
BSD 3-Clause "New" or "Revised" License
2.61k stars 141 forks source link

Port tf-random & QuickCheck #190

Closed polux closed 7 years ago

polux commented 7 years ago

QuickCheck depends on tf-random which fails to install because:

eta: panic! (the 'impossible' happened)
  (Eta version 0.0.5):
    tcCheckFIType: Unsupported calling convention.
  ccall unsafe "static skein.h Threefish_256_Process_Block"

quite a few libraries depend on QuickCheck which makes them in turn unusable.

rahulmutt commented 7 years ago

tf-random has a single C FFI import that needs to be shimmed with a Java import. We'll make this issue track that patch.

Btw, which libraries do you need that are unusable?

polux commented 7 years ago

I stumbled upon it by trying to depend on megaparsec.

rahulmutt commented 7 years ago

Sure. Will let you know once this issue is resolved.

polux commented 7 years ago

Awesome, thanks! I'm really excited about eta.

psibi commented 7 years ago

Had a look at both the C code and the relevant java libraries for tf-random.

The code for java can be likely adapted from here: https://github.com/bmalkow/java-bc-threefish/blob/7e70464d70489869209a73ab9d5a9688d6e7cf3c/src/org/bouncycastle/crypto/engines/ThreefishEngine.java#L232

rahulmutt commented 7 years ago

@psibi Finished this. It should now be working after updating Eta via ./update.sh in the root repo.

polux commented 7 years ago

Great, thanks a ton!