@Nick As Max already said, *Debug.crash* can't produce a warning, otherwise it would be very annoying if you need to use it for a legitimate use case. *Debug.todo* could, because it's only use case would be prototyping.
@Joey I saw that too a while ago, but it was about type holes, not value holes. (except your comment, which included both) Type holes seem less useful to me because you can already leave out the type signature and you get a warning which tells you which type to use. On Friday, 2 September 2016 03:32:20 UTC+2, Joey Eremondi wrote: > > This is basically the same as Typed Holes, which Haskell has. > > There was a proposal for this a while back (which I fully support). > > > https://groups.google.com/forum/#!searchin/elm-dev/type$20holes%7Csort:relevance/elm-dev/_mS33Io74vs/qR0qESkyBwAJ > > On Thu, Sep 1, 2016 at 5:21 PM, Max Goldstein <[email protected] > <javascript:>> wrote: > >> Debug.crash is used when you know a condition is impossible. I have a >> library where I sort a non empty list and do case analysis on the result. I >> call Debug.crash on the empty list case. It can't happen because sorting >> doesn't change the length of the list, but building that into the type >> system is way to complicated for Elm's goals. >> >> Language and tooling features are focusing on "making impossible things >> possible" not "making possible things pleasant", so Debug.todo is unlikely >> to get implemented anytime soon. But I think it's a pretty neat idea! >> >> -- >> 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] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > > -- 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.
