Two questions about ports.
1) Why is Dict not supported? I have a dictionary of mixed
string/integers keys and a concrete record-stable from JSON passed in via a
port, everything else decomposes fine into a type except for it.
2) And this is my big question that I am having trouble working around
without great verbosity. I have these types:
```elm
type alias PresenceMeta metaUserType =
{ metaUserType
| phx_ref : String
}
type alias RoomSyncMetas =
{ loc : String
, online_at : String
}
type alias Testeringa =
PresenceMeta RoomSyncMetas
```
And a port like:
```elm
port testering : (Testeringa -> msg) -> Sub msg
```
And it generates this error:
```elm
Port `testering` is trying to communicate an unsupported type.
173| port testering : (Testeringa -> msg) -> Sub msg
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The specific unsupported type is the following extended record:
{ phx_ref : String, loc : String, online_at : String }
The types of values that can flow through in and out of Elm include:
Ints, Floats, Bools, Strings, Maybes, Lists, Arrays, Tuples,
Json.Values,
and concrete records.
```
So it says that `{ phx_ref : String, loc : String, online_at : String }` is
not a supported type, which seems... odd. So I change the Testeringa type
to:
```elm
type alias Testeringa =
{ phx_ref : String
, loc : String
, online_at : String
}
```
And no other changes, and then it compiles fine.
My initial reaction to this is wtf...? What did I break?!
--
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.