There is ongoing discussion around this.  You might consider posting your 
specific scenario here: 
https://groups.google.com/forum/#!searchin/elm-discuss/record%7Csort:relevance/elm-discuss/oWfARte8DJU/6eUvmL-jAwAJ
 
<https://groups.google.com/forum/#!searchin/elm-discuss/record|sort:relevance/elm-discuss/oWfARte8DJU/6eUvmL-jAwAJ>

Dustin

> On Apr 20, 2017, at 5:34 AM, Samuel Walladge <[email protected]> wrote:
> 
> I'm new to elm, and was experimenting with updating records today. Noticed 
> something that seemed a bit strange - the elm compiler doesn't accept 
> updating a record where you specify the record you want to update with `{ 
> myRecord.myNestedRecord | ... }` (syntax error).
> 
> I've attached an example file displaying this behaviour. `example5` and 
> `example6` don't compile. What I'm wondering is, should they compile based on 
> the elm language specification? And, for example 5, when you want to update a 
> nested record, is that nested syntax a good way to go about it, or is there a 
> neater way?
> 
> For reference, this is the error I get when compiling:
> 
> -- SYNTAX PROBLEM ----------------------------------------------------- 
> Test.elm
> 
> I ran into something unexpected when parsing your code!
> 
> 24| example6 = { myRecord.user | name = "John" }
>  ^
> I am looking for one of the following things:
> 
>  "'"
>  "|"
>  an equals sign '='
>  more letters in this name
>  whitespace
> 
> Detected errors in 1 module.
> 
> 
> 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] 
> <mailto:[email protected]>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.
> <Test.elm>

-- 
Dustin Farris



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