If I want to use Platform.Sub.map, do I need to import it?

There is no mention here .

When I tried he said Module Platform does not expose Sub

+3


source to share


1 answer


Platform.Sub

and are Platform.Cmd

imported by default like Sub

and Cmd

, so you need to omit Platform.

-part.



Also worth noting is that Platform

, Platform.Sub

and Platform.Cmd

- all the different modules, that is, if they were not imported by default, and you just imported Platform

, you still will not be able to access Sub

and Cmd

with a prefix Platform.

. This is more obvious if you look at the source for the main package (in particular Platform.elm

and Platform/

).

+4


source







All Articles