eta icon indicating copy to clipboard operation
eta copied to clipboard

Give more examples of importing generics-heavy APIs

Open rahulmutt opened this issue 8 years ago • 4 comments

rahulmutt avatar Apr 11 '17 05:04 rahulmutt

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.

steffahn avatar Mar 07 '18 02:03 steffahn

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

rahulmutt avatar Mar 09 '18 04:03 rahulmutt

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.

steffahn avatar Mar 09 '18 11:03 steffahn

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

Jyothsnasrinivas avatar Mar 19 '18 05:03 Jyothsnasrinivas