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 145 forks source link

Give more examples of importing generics-heavy APIs #292

Open rahulmutt opened 7 years ago

steffahn commented 6 years ago

Hi, this issue seems about related: I’m currently reading the online tutorial and on the generics page, https://eta-lang.org/docs/eta-concepts/java-interop/java-generics, under “Working With Java Generics”, the import syntax on the top of the section doesn’t match the example on the bottom. I’d guess that that example needs an update.

rahulmutt commented 6 years ago

Hi @staffehn I'm not quite sure I understand. Can you copy/paste the two parts you're comparing?

steffahn commented 6 years ago

Sure. The "Importing Generic Classes" part presents this syntax: data List a = List (@java.util.List a) Whereas in the Example right below the syntax is: data {-# CLASS "java.util.List" #-} List a = List (Object# (List a)).

As this example is a small example for (part of) a API with generics (and also about the only one in the tutorial right now, as far as I can see), I thought this issue seemed related.

Jyothsnasrinivas commented 6 years ago

Thanks @staffehn ! We've updated the docs. https://eta-lang.org/docs/eta-concepts/java-interop/java-generics