[elm-discuss] elm-tools/parser: how to access intermediate parsed objects downstream in parsing pipeline?

2017-08-01 Thread Dave Doty
The elm-tools/parser documentation recommends using parsing pipelines such as type alias Point = { x : Float, y : Float} point : Parser Pointpoint = succeed Point |. symbol "(" |. spaces |= float |. spaces |. symbol "," |. spaces |= float |. spaces |.

[elm-discuss] elm-tools/parser: how to transform library-generated Problems into custom Problems?

2017-08-03 Thread Dave Doty
I'm a bit confused what is the intended usage of elm-tools/parser to generate custom error messages. In particular, when creating a Parser value, but before calling run, there's no way to specify what sorts of errors can happen and messages to generate in response. The only interface in the

[elm-discuss] Re: elm-tools/parser: how to access intermediate parsed objects downstream in parsing pipeline?

2017-08-02 Thread Dave Doty
Thanks! I assumed andThen would be involved somehow but didn't quite see how to use it. That said, I don't think validation is necessary during the parsing > process. You can check it after everything is parsed. That is much simpler. If I check everything after it is parsed, how do I know

[elm-discuss] best practices for handling unreachable code, i.e., how to handle situations where runtime assertions would be used in other languages

2017-08-20 Thread Dave Doty
I have found many situations in which I am forced by the compiler to deal with a situation that will never come up at runtime (or, if it does come up, it's a bug in my code and not something the user can do to fix). For example, I might make a provably non-empty List (e.g., it is always made by

Re: [elm-discuss] best practices for handling unreachable code, i.e., how to handle situations where runtime assertions would be used in other languages

2017-08-21 Thread Dave Doty
mon homework exercise). Maybe it's just a matter of me thinking harder about these situations. On Monday, August 21, 2017 at 1:41:55 PM UTC-7, Dave Doty wrote: > > Hi Aaron: > > Thanks for the ideas! I think they certainly can mitigate this concern in > many situations. > >

Re: [elm-discuss] best practices for handling unreachable code, i.e., how to handle situations where runtime assertions would be used in other languages

2017-08-21 Thread Dave Doty
o implement those > defaults even though you know in reality that code path will never get > executed. > > 2) You said you had a provably non-empty list, so why not make a > NonEmptyList type to represent that instead of using List. Then you could > make `NonEmptyList.maximum : No

Re: [elm-discuss] best practices for handling unreachable code, i.e., how to handle situations where runtime assertions would be used in other languages

2017-08-21 Thread Dave Doty
onsider all the assumptions > that references have been relying on?) > > On Mon, Aug 21, 2017 at 1:56 PM, Dave Doty <pex...@gmail.com > > wrote: > >> Talking through this helped me formulate a better strategy for at least >> this one problem, along the l

[elm-discuss] Re: elm-tools/parser: how to transform library-generated Problems into custom Problems?

2017-11-26 Thread Dave Doty
wing a new, more informative exception. On Thursday, August 3, 2017 at 12:03:34 PM UTC-7, Dave Doty wrote: > > I'm a bit confused what is the intended usage of elm-tools/parser to > generate custom error messages. In particular, when creating a Parser > value, but before calli

[elm-discuss] timeout in unit test

2017-11-15 Thread Dave Doty
Is there a way in elm-community/elm-test to specify a timeout; i.e., the test fails if the code takes longer than n seconds to execute? -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails

[elm-discuss] Re: keypress events interfering with editor update

2017-10-19 Thread Dave Doty
is being used and then in yout subscription you have > > myKbdSubs model = > if model.editorBeingUsed then > Sub.none > else > > On Thursday, 19 October 2017 00:34:35 UTC+2, Dave Doty wrote: > > I am using this Ace Editor adapted to Elm: >> https://github.