You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 23, 2018. It is now read-only.
The basic problem is that I can expose a function like Int -> Foo -> String and forget to expose Foo. This means users of the package can partially apply this function and end up with a Foo -> String function that they cannot annotate, because Foo is not exposed.
It would be great if elm-package could give an error on publish if a public type signature incorporates a non-public type.
The text was updated successfully, but these errors were encountered:
rtfeldman
changed the title
Warning when values in public type signatures are unexposed
Prevent publishing when types in public type signatures are unexposed
Jul 11, 2017
For reference TypeScript has this check and it looks like this: Example.ts(12,24): error TS4060: Return type of exported function has or is using private name 'ExampleType'.
Or: Example.ts(12,24): error TS4078: Parameter 'a' of exported function has or is using private name 'ExampleType'.
What exactly should it mean for a type to be exposed? Exposed directly from the module in which it is defined? Exposed via an alias in another module? (Does the alias have to have the same name as the original type?) I've added an example in #281.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
elm-css
has a lot of PRs like this: rtfeldman/elm-css#290The basic problem is that I can expose a function like
Int -> Foo -> String
and forget to exposeFoo
. This means users of the package can partially apply this function and end up with aFoo -> String
function that they cannot annotate, becauseFoo
is not exposed.It would be great if
elm-package
could give an error on publish if a public type signature incorporates a non-public type.The text was updated successfully, but these errors were encountered: