<Ankhers>
What exactly does the ocp-indent package do, and is it important if I am using the emacs tuareg mode?
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
azimut has joined #ocaml
Anarchos has joined #ocaml
Anarchos has quit [Ping timeout: 245 seconds]
Anarchos has joined #ocaml
dnh has joined #ocaml
<discocaml>
<sim642> olle, you can list your dependencies in the dune-project file and generate the opam file from that
waleee has quit [Ping timeout: 240 seconds]
rgrinberg has joined #ocaml
waleee has joined #ocaml
<Ankhers>
I have a file in a known format. I want to use String.split_on_char to split it into two strings. This should always succeed, if it does not, I am fine with the application crashing. But when I do let (first :: second) = String.split_on_char '-' my_string, I get an error saying that the pattern is non-exhaustive. I understand what this means, but is there a way to bypass this without needing to
Anarchos has quit [Ping timeout: 258 seconds]
<Ankhers>
use a match with a catch all that just calls failwith?
<discocaml>
<jumpnbrownweasel> you can do `assert false` in the catch all. this doesn't return of course, but is typed to returns 'a, meaning that it satisfies any type constraint in that position.
<discocaml>
<jumpnbrownweasel> oh, `failwith` is typed the same way, so either one works.
<discocaml>
<jumpnbrownweasel> i use `assert false` when it is easily provable that it can never happen, and `failwith` otherwise
bartholin has quit [Quit: Leaving]
dnh has quit [Ping timeout: 240 seconds]
dnh has joined #ocaml
<Ankhers>
The point being though, that I do need to include that branch and I can't just simply assign like that. Thanks.
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<discocaml>
<jumpnbrownweasel> Right, all pattern matching is exhaustive.
rgrinberg has joined #ocaml
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<discocaml>
<._null._> You can have non-exhaustive pattern matching, if you explicitly disable the warning (you can disable it locally)
bibi_ has joined #ocaml
troydm has quit [Ping timeout: 260 seconds]
troydm has joined #ocaml
Serpent7776 has quit [Ping timeout: 258 seconds]
xmachina has quit [Quit: WeeChat 4.0.4]
sagax has joined #ocaml
xmachina has joined #ocaml
dhil has quit [Ping timeout: 240 seconds]
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]