Think about how you would construct such a record...

myRecord =
  { port = ...
  }

That's a reserved keyword appearing in an incorrect place. This won't work
for any Elm keyword!

I can't think of a way to solve your problem besides changing the JS that
calls the port. In the Elm HTML library, when there is a conflict between
keywords and function names, they use an underscore. For example, the
function to create a "type" DOM attribute is "type_". Maybe you do
something similar?

On Thu, Dec 15, 2016 at 2:51 AM, Paul Dijou <[email protected]> wrote:

> Hi,
>
> I understand that "port" is a reserved keyword when writing Elm code but
> is there a reason to fail compilation when used as the name of a record
> field? It's a bummer when sending records through a port (a real one) and
> the JavaScript is expecting the property "port" (in the record).
>
> Thanks
>
> --
> 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.
>

-- 
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