Re: [elm-discuss] Confused type definition

2016-09-05 Thread John Bugner
You were probably confusing it with a type alias, which is often used with records, right? On Monday, September 5, 2016 at 9:28:49 PM UTC-5, Luis Fei wrote: > > Oh, it's just union types, got it, thank you, Janis > > On Monday, September 5, 2016 at 7:02:13 PM UTC+8, Janis Voigtländer wrote: >> >>

Re: [elm-discuss] Confused type definition

2016-09-05 Thread Luis Fei
Oh, it's just union types, got it, thank you, Janis On Monday, September 5, 2016 at 7:02:13 PM UTC+8, Janis Voigtländer wrote: > > Would you have been more comfortable if the definition would have been > like the following? > > type Config data msg = > ConfigConstructor > { toId : data -> S

Re: [elm-discuss] Confused type definition

2016-09-05 Thread Janis Voigtländer
Would you have been more comfortable if the definition would have been like the following? type Config data msg = ConfigConstructor { toId : data -> String , toMsg : State -> msg , columns : List (ColumnData data msg) , customizations : Customizations data msg } If yes, then

[elm-discuss] Confused type definition

2016-09-05 Thread Luis Fei
Hello, I just tried to look into elm-sortable-table's source code, and this `Config` type got me confused https://github.com/evancz/elm-sortable-table/blob/master/src/Table.elm#L96-L102 I'll paste it here for convenience type Config data msg = Config { toId : data -> String , toMsg :