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

Encapsulate types that should be abstract for users of core #283

Closed
jvoigtlaender opened this Issue Jun 25, 2015 · 1 comment

Comments

Projects
None yet
1 participant
@jvoigtlaender
Contributor

jvoigtlaender commented Jun 25, 2015

For example, Form in Graphics.Collage is currently defined as

type alias Form =
    { theta : Float
    , scale : Float
    , x : Float
    , y : Float
    , alpha : Float
    , form : BasicForm
    }

and the type alias is exported from the Graphics.Collage module, so users get access to all the fields, but they are not documented anywhere (and might change in a future release). It should be better to hide them from the user of the library, then. So, replacing type alias Form = {...} by type Form = Form {...}.

The same applies to the Element and Position types in Graphics.Element.

@jvoigtlaender

This comment has been minimized.

Show comment
Hide comment
@jvoigtlaender

jvoigtlaender Nov 23, 2015

Contributor

This is fixed in core-3.0.0.

Contributor

jvoigtlaender commented Nov 23, 2015

This is fixed in core-3.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment