Yeah, that was something I realized recently, though changing it requires a 
major version bump.  Should be changed in the next version though!  (Along 
with a bunch of other goodies that will come along with it.)




On Friday, March 10, 2017 at 1:02:41 PM UTC-5, Matthieu Pizenberg wrote:
>
> Did calling the type and its alias both 'Test' somehow override the 
>> private one with the public one?
>>
>
> No actually it is misleading you here. The main difference is that when I 
> write:
>
> -- module Test exposing (testFunction)
> import Public exposing (Test)
> import Private
> testFunction : Test
> testFunction = Private.SomeTest
>
> `Test` in `testFunction` type definition refers to `Public.Test`. It is 
> the same as writing:
>
> -- module Test exposing (testFunction)
> import Public
> import Private
> testFunction : Public.Test
> testFunction = Private.SomeTest
>
> whereas everywhere in elm-style-animation, mdgriffith is defining its 
> functions with the `Animation.Model.Animation msg` return type instead of 
> using the `State` public type:
>
> initialState : List Animation.Model.Property -> Animation msg
>
> Technically both types are the same (well not exactly since he defined 
> State as Animation *Never*) and both could compile (not here because of 
> this Never). But for public interface, I think that type definitions should 
> use the public types.
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to