softmoth has quit [Read error: Connection reset by peer]
<discocaml>
<qrpnxz> Every time I change a public type I have to do it twice: first in the module, then again in the interface file.
<discocaml>
<qrpnxz> Is there some way to tell OCaml that I want to export the whole type without having to play these games?
<discocaml>
<functionalprogramming> _intf pattern
<discocaml>
<functionalprogramming> create a module signature in a separate file, then use it in both the mli and ml files
<discocaml>
<functionalprogramming> create a module signature in a separate file (xyz_intf.ml), then use it in both the mli and ml files
myrkraverk has joined #ocaml
<discocaml>
<yawaramin> that doesn't really solve this specific issue though
<discocaml>
<qrpnxz> I reckon that's not gonna play well with ppx_deriving
<discocaml>
<qrpnxz> I'd have to bring in ppx_import or smth
<discocaml>
<qrpnxz> ugh
<discocaml>
<deepspacejohn> Only expose it as an abstract type. (Probably not what you want but still)
<discocaml>
<yawaramin> OCaml is designed with the intention that the type must be defined in both the interface and the implementation...you can try to bypass it with things like PPXs...but at the end of the imho it's not worth the extra complexity
<discocaml>
<qrpnxz> It's just terrible friction while i'm trying to iterate
<discocaml>
<deepspacejohn> I just don’t use mli files for modules that I’m doing a lot of iterations on
<discocaml>
<qrpnxz> I'm thinking of straight up removing the interface, getting work done, then putting it back, hoping that i don't get namespace issues
myrkraverk_ has quit [Ping timeout: 244 seconds]
<discocaml>
<yawaramin> yeah if the module is in iteration mode it might not make sense to cover it up with an mli
<discocaml>
<yawaramin> once the types have settled down and in maintenance mode, mli makes sense
<discocaml>
<qrpnxz> yea, I think i'll go with that.
<discocaml>
<qrpnxz> Thanks, all
<discocaml>
<deepspacejohn> You can also use ppx_deriving annotations in mli files, FWIW. it will generate the signatures that go with the derived code in the ml
<discocaml>
<qrpnxz> WHAT
<discocaml>
<qrpnxz> That's gonna save me a lot of headache
<discocaml>
<qrpnxz> have to try it
<discocaml>
<qrpnxz> dang, it works. Awesome
<discocaml>
<qrpnxz> bless you for that
<discocaml>
<qrpnxz> I was removing them thinking it would try to put function in an interface or smth
<discocaml>
<yawaramin> nice
<discocaml>
<qrpnxz> lol
spew has quit [Quit: spew]
cr1901 has quit [Read error: Connection reset by peer]
cr1901 has joined #ocaml
myrkraverk_ has joined #ocaml
myrkraverk has quit [Ping timeout: 252 seconds]
theblatte has quit [Remote host closed the connection]
theblatte has joined #ocaml
myrkraverk_ has quit [Read error: Connection reset by peer]
myrkraverk_ has joined #ocaml
lucydoer has left #ocaml [#ocaml]
euphores has quit [Quit: Leaving.]
pi3ce_ has quit [Read error: Connection reset by peer]
pi3ce has joined #ocaml
euphores has joined #ocaml
ygrek has quit [Remote host closed the connection]
bartholin has joined #ocaml
Serpent7776 has joined #ocaml
<discocaml>
<lukstafi> Why? Just do the deriving in `xyz_intf.ml`, you get all the functions included. No?
<discocaml>
<lukstafi> I'd start a new project without an interface to see how needs evolve. If it ends up being small types, then I add (copy-paste) `.mli` once it's settled what I want to advertise to the users or newcomers to the project. If it's large types like modules, I add (cut&paste) `_intf.ml`.
<discocaml>
<lukstafi> (Ah, my comments were already made by others, sorry.)
gentauro has quit [Quit: leaving]
bartholin has quit [Quit: Leaving]
gentauro has joined #ocaml
semarie has quit [Ping timeout: 260 seconds]
semarie has joined #ocaml
bartholin has joined #ocaml
Romanson has joined #ocaml
Haudegen has joined #ocaml
Serpent7776 has quit [Read error: Connection reset by peer]
Serpent7776 has joined #ocaml
<discocaml>
<thecellist.> Hello, i'm currently learning about ocaml objects, and tried to implement a `fold` method, but apparently OCaml does not allow it to be polymorphic... 😔
<discocaml>
<deepspacejohn> Imperative loops are completely reasonable times to use refs.
<discocaml>
<leviroth> Look, let's be clear about what's going on here: if you look at that user's history in this channel they have eight or so messages, and at least two of them are rude remarks directed at different people for no particular reason.
<discocaml>
<leviroth> I wouldn't want anyone to get the impression that this is a reasonable disagreement about code style. It's just that one person is going mean-spirited trolling, and the rest of us aren't.
<discocaml>
<leviroth> I wouldn't want someone coming here for help to get the impression that this is a reasonable disagreement about code style. It's just that one person is going mean-spirited trolling, and the rest of us aren't.
Haudegen has quit [Quit: Bin weg.]
spew has joined #ocaml
aljazmc has joined #ocaml
<discocaml>
<ada2k> the rest of us know what multi paradigm means i fear