[elm-discuss] Strnage compiler error

2016-07-17 Thread Zachary Kessin
I am trying to compile this code https://gist.github.com/zkessin/e19640130ba33099a9c209b98b012815 when I am getting this error (line 1, column 31): unexpected "." expecting space, "&" or escape code 7| re = regex "\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b"

Re: [elm-discuss] Re: html formatting words in string

2016-07-17 Thread Max Goldstein
I'll jump in here and say that this is one of the things I really like about Elm views. Instead of needing to learn some crippled templating language (handlebars, JSX) you can just use all the normal list functions. -- You received this message because you are subscribed to the Google Groups

Re: [elm-discuss] How do I organize "inheritance" between my data types?

2016-07-17 Thread Leonardo Sá
Those are some great suggestions. Thank you everyone! On Sun, Jul 17, 2016 at 9:07 PM, Aaron VonderHaar wrote: > To restate my previous post, I think you should spend some time > considering whether you actually have a case where you need to write code > that deals with

Re: [elm-discuss] How do I organize "inheritance" between my data types?

2016-07-17 Thread Aaron VonderHaar
To restate my previous post, I think you should spend some time considering whether you actually have a case where you need to write code that deals with both Customers and Employees, or whether you are just asking because you would use inheritance if you were using an OO language. Making a

[elm-discuss] Re: How do I organize "inheritance" between my data types?

2016-07-17 Thread Max Goldstein
Aaron's solution is a good one, but since customers and employees are both people, you may want: type alias Person a = { a | name : String , address : String } type alias Employee = Person { department : String } type alias Customer = Person { itemsPurchased : Int } --

[elm-discuss] Re: How do I organize "inheritance" between my data types?

2016-07-17 Thread Aaron PS
Hello, you might be looking for "extensible records", check this out http://elm-lang.org/docs/records import Html exposing (Html, div, ul, li, text) type alias Person a = { a | name : String , address : String } type alias Employee a = { a | department : String } type alias

Re: [elm-discuss] How do I organize "inheritance" between my data types?

2016-07-17 Thread Leonardo Sá
I think the idea is that both Employees and Customers are Persons - as in, they have shared fields such as name and address. So potentially we could write functions that operate directly on Person without caring whether the person is an employee or a customer, and we'd write functions that

Re: [elm-discuss] How do I organize "inheritance" between my data types?

2016-07-17 Thread Aaron VonderHaar
Can you give more details about what you are trying to do that requires a Person type that can be either an employee or a customer? As you noted, `nameAndDepartment` would only apply to Employees, so why do you need to use it on Customers? Can you simply deal with employees and customers

Re: [elm-discuss] Writing tests on elm-lang/html data structures

2016-07-17 Thread Noah Hall
Yep, if you want to use karma On Sun, Jul 17, 2016 at 6:40 PM, Conrad Dean wrote: > By that do you mean write the test suite in JS and call elm with ports? > > On Sat, Jul 16, 2016 at 5:22 PM, Noah Hall wrote: >> >> It has a native function to grab

Re: [elm-discuss] Trying to understand the community overlap between Elm and Elixir

2016-07-17 Thread John Orford
My feeling is that their conception was at about the same time and had broadly the same goals. I.e. make complicated programs sane. On top of that, I see the adopters being similar. Those who are looking for a better way and open to new ideas. I agree with you. Elm has many nice features that

[elm-discuss] Trying to understand the community overlap between Elm and Elixir

2016-07-17 Thread Charlie Koster
For those of you who learned Elm before learning Elixir can you describe the appeal of Elixir from an Elm dev standpoint? I'm having trouble finding appealing similarities between the two. While there are some similarities to be found, Elixir doesn't appear to have a lot of what makes Elm

[elm-discuss] Re: html formatting words in string

2016-07-17 Thread Rex van der Spuy
Hi, what's the bigger picture that you're trying to accomplish? Have you looked at Elm's Markdown package? http://package.elm-lang.org/packages/evancz/elm-markdown/3.0.0/ Markdown will format any words surrounded by double asterisks as bold text, like this: **this is bold** -- You received

Re: [elm-discuss] Fingertree used to make priority queue and deque

2016-07-17 Thread Matt Heath
I absolutely do need to document that. That's just a mistake. Thanks for spotting it On 16 July 2016 at 19:32, Nick H wrote: > Thank you for sharing! > > I think it would be worth the trouble of fleshing out the documentation a > bit. For instance, it's not clear what