companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 4.12 released: https://ocaml.org/releases/4.12.0.html | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
vicfred has joined #ocaml
oriba has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
waleee has quit [Ping timeout: 240 seconds]
zebrag has quit [Quit: Konversation terminated!]
mbuf has joined #ocaml
vicfred has quit [Read error: Connection reset by peer]
vicfred has joined #ocaml
shawnw has quit [Ping timeout: 264 seconds]
eight has quit [Quit: leaving]
gareppa has joined #ocaml
gareppa has quit [Remote host closed the connection]
mro has joined #ocaml
Serpent7776 has joined #ocaml
Haudegen has joined #ocaml
vizard has joined #ocaml
terrorjack has quit [Quit: Ping timeout (120 seconds)]
terrorjack has joined #ocaml
gzj has quit [Ping timeout: 244 seconds]
TheLemonMan has joined #ocaml
orbifx has joined #ocaml
olle has joined #ocaml
swarm has joined #ocaml
bartholin has joined #ocaml
bartholin_ has joined #ocaml
bartholin has quit [Ping timeout: 244 seconds]
swarm has quit [Ping timeout: 250 seconds]
<fluxm> recently I used filename iP.mli. yes, it's an eyesore in the filesystem, but so nice in the module system!
<zozozo> fluxm: you know that is also works if the file is named IP.mli ?
<fluxm> doesn't it cause a warning from some build systems 🤔
<zozozo> not to my knowledge
<fluxm> I guess dune doesn't complain. I had different recollection about it.
<fluxm> ah, nice filename is back :)
swarm has joined #ocaml
krnkktz has quit [Quit: Bridge terminating on SIGTERM]
smondet[m] has quit [Quit: Bridge terminating on SIGTERM]
fluxm has quit [Quit: Bridge terminating on SIGTERM]
Sumera[m] has quit [Quit: Bridge terminating on SIGTERM]
radiopotin[m] has quit [Quit: Bridge terminating on SIGTERM]
labor[m] has quit [Quit: Bridge terminating on SIGTERM]
labor[m] has joined #ocaml
krnkktz has joined #ocaml
fluxm has joined #ocaml
radiopotin[m] has joined #ocaml
Sumera[m] has joined #ocaml
smondet[m] has joined #ocaml
swarm has quit [Quit: Client closed]
<d_bot> <colin> is there an easy way to get ocamldoc to work with dune
<d_bot> <Vaush> Did u try reinstalling it?
<d_bot> <colin> It works on its own, I just wonder if there's a well-defined way to have it traverse a project that's `executable` with a bunch of `library` subfolders and produce (linked) documentation.
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
unyu has quit [Quit: WeeChat 3.1]
gravicappa has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
mro has quit [Ping timeout: 268 seconds]
<d_bot> <lubega-simon> Well, is there any strong reason you wouldn't want to use `odoc`, it works well with dune under `dune build @doc` command (https://dune.readthedocs.io/en/stable/documentation.html?highlight=odoc#generating-documentation)
wingsorc has quit [Quit: Leaving]
<d_bot> <colin> Yes, I find `odoc` impossible to use. It seems to require more information than `dune` needs to build my project - which seems pretty bizarre if I just want to quickly output some HTML (and not have to incorporate `.opam` files such that `public_name` begins to work - `dune build @doc-private` generates separate folders that isn't navigable from a source index file). It also doesn't allow you to output documentation for `executable
yoctocell has joined #ocaml
<d_bot> <colin> It seems to me either I'm completely clueless about how this all works or `dune build @doc` is like 1/10th of the story when it comes to using `odoc` successfully.
cross has quit [Quit: leaving]
cross has joined #ocaml
gareppa has joined #ocaml
gareppa has quit [Quit: Leaving]
mbuf has quit [Quit: Leaving]
unyu has joined #ocaml
dhil has joined #ocaml
gareppa has joined #ocaml
romildo has joined #ocaml
mro has joined #ocaml
dhil has quit [Ping timeout: 252 seconds]
gareppa has quit [Quit: Leaving]
dhil has joined #ocaml
zebrag has joined #ocaml
mro has quit [Remote host closed the connection]
<d_bot> <jonludlam> @colin odoc's primary use case is for documenting libraries in packages, and that's what dune's rules are intended to support. While it can be used more generally than that, doing so is 'off the beaten path' so it's going to be more tricky
<d_bot> <jonludlam> also, dune's not particularly picky about the contents of those odoc files, so just creating them with 'touch' is sufficient to allow 'quick' doc generation
<d_bot> <jonludlam> what is the use-case you have in mind for this?
<d_bot> <colin> documenting private libraries used within an executable project without lifting it to an opam package
<d_bot> <colin> I'm just used to documentation generation tools that are more simplistic; they just recursively traverse and produce whatever they can and then linked it all together by maintaining the breadcrumbs/path of how they got there in order to produce a suitable navigable index
<d_bot> <colin> so using odoc is like an ordeal in comparison
romildo has left #ocaml [Leaving]
mro has joined #ocaml
waleee has joined #ocaml
<d_bot> <jonludlam> who's the intended audience of the docs? you and people working on the executable?
<d_bot> <colin> yes
mro has quit [Ping timeout: 244 seconds]
<d_bot> <colin> admittedly, I wouldn't mind packaging it using opam, I just don't know how to do that in a way that plays with the odoc
<d_bot> <jonludlam> right, so easiest for now is to make it a public library - add a (public_name) stanza and touch an opam file in your project root
<d_bot> <colin> I will try that again, I'm sure I got an error with it, I'll make an example project and report back
<rks`> (FTR. the distinction between private and public library comes from dune, so it's unclear that you'd be better off if dune used ocamldoc instead of odoc)
Tuplanolla has joined #ocaml
<d_bot> <colin> well, the distinction is meaningless to me as they're all private, public is just a formality to get odoc to play nicely an not generate stuff with broken links
Guest6112 has joined #ocaml
<d_bot> <jonludlam> right, the private lib docs stuff definitely needs some work 🙂
<d_bot> <jonludlam> do you have an opam file for your executable?
<d_bot> <colin> yes, so then, do I somehow add `public_name`'d libraries to this `opam` file?
<d_bot> <colin> or do I end up putting an opam file in the root of the library
<d_bot> <colin> I get "Error: The current scope doesn't define package "foo"."
<d_bot> <jonludlam> normally all the opam files go at the root of the repository - it's all one repo I presume?
<d_bot> <colin> oh, so you have an opam for the executable root _and_ for each library (define in a subfolder of the executable's code)?
<d_bot> <jonludlam> you don't _need_ to have different opam files for libraries and executables
<d_bot> <colin> I've never really used opam before
<d_bot> <Cyclomatic Complexity> Are there recursive module types in OCaml?
<d_bot> <jonludlam> right, you've declared your package to be called 'example' by making example.opam
<companion_cube> there's recursive modules but they're, hu, ugly
<companion_cube> imho
<d_bot> <jonludlam> so your public_name needs to be related to that
<d_bot> <colin> is there a way to have like multiple packages
<d_bot> <colin> such that if there was more than 1 library
<d_bot> <Cyclomatic Complexity> recursive module types, rather recursive modules
<d_bot> <colin> odoc would be forced to generate documentation with an index page that links to each library
<d_bot> <colin> oh, so if I made more than 1 opam, and the `name.opam` referred to a sub-folder `name/` that had a dune library project
<d_bot> <colin> it will all be collated from `dune build @doc`
<d_bot> <colin> ?
mro has joined #ocaml
<d_bot> <jonludlam> yes, dune builds an index page linking to each package
<companion_cube> Cyclomatic: recursive module types are also a thing yes
<d_bot> <Cyclomatic Complexity> companion_cube: i can't find docs about them, and i get syntax errors on `module rec type` and `module type rec`
<companion_cube> hmmm
<d_bot> <Cyclomatic Complexity> indeed
<companion_cube> Drup uses them I think? or something like that, to avoid writing signatures twice
<companion_cube> I personally never use recursive modules
<d_bot> <Cyclomatic Complexity> i could homogeneize all types and use objects
<d_bot> <colin> ahh, so that's how it works, thanks jon, that's fixed my issue, I should probably RTFM next time :P cheers
<d_bot> <Cyclomatic Complexity> but i like the idea of keeping track of which objects can interact with which objects in the type system
<d_bot> <jonludlam> glad to be able to help 🙂
<Drup> there are no recursive module types
<Drup> only recursive modules, that can contain module types
<companion_cube> ah, well, my bad then.
<d_bot> <Cyclomatic Complexity> a
<d_bot> <Cyclomatic Complexity> aaa
<d_bot> <Cyclomatic Complexity> so, you can substitute a type in a `:=` substitution for a module type
<d_bot> <Cyclomatic Complexity> epic
<d_bot> <Cyclomatic Complexity> so i'll just write my module type in a polymorphic manner, and substitute it everywhere i need it
<d_bot> <Cyclomatic Complexity> hmmmmmmmmmmmmm
<d_bot> <Cyclomatic Complexity> doesn't work, because `Error: invalid package type: only module type identifier and 'with type' constraints are supported`
mro has quit [Ping timeout: 244 seconds]
mro has joined #ocaml
inkbottle[m] has joined #ocaml
wonko_ has joined #ocaml
TheLemonMan has joined #ocaml
orbifx has quit [Quit: orbifx]
Guest6112 has quit [Quit: Client closed]
bartholin_ has quit [Quit: Leaving]
wonko_ has quit [Quit: See You Space Cowboy..]
mikess has quit [Ping timeout: 268 seconds]
_whitelogger has joined #ocaml
<d_bot> <EduardoRFS> technically recursive module types are possible, just that each access layer requires a transformation
<d_bot> <EduardoRFS> or if you like stackoverflow on the typer
mikess has joined #ocaml
olle has quit [Ping timeout: 268 seconds]
neiluj has joined #ocaml
<neiluj> Hello! Is there a way to specify a specific repository for a library in the dependencies of dune-project?
<neiluj> For instance, a gitlab repository.
<companion_cube> no, dune doesn't fetch dependencies for you
<neiluj> thanks, so maybe use an opam pin?
<companion_cube> yep
<companion_cube> oh wait, you mean, in the description in dune project
<neiluj> yes, the dependencies field
<companion_cube> https://dune.readthedocs.io/en/stable/dune-files.html#package I don't see anything related to pinning, only version constraints
<neiluj> all right, opam pin is fine.
<d_bot> <NULL> Maybe constraining to a version which should not be accessible by the opam repo (eg "~dev"), a pin would be the only possible way a user might satisfy these dependencies ?
vizard has quit [Ping timeout: 240 seconds]
daimrod1 is now known as daimrod
vicfred has quit [Quit: Leaving]
mro has quit [Quit: Leaving...]
wonko_ has joined #ocaml
dhil has quit [Ping timeout: 252 seconds]
dmbaturin has joined #ocaml
dmbaturin has quit [Changing host]
olle has joined #ocaml
dhil has joined #ocaml
vizard has joined #ocaml
wonko_ has quit [Ping timeout: 252 seconds]
wonko_ has joined #ocaml
wonko_ has quit [Ping timeout: 268 seconds]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
Hrundi_V_Bakshi has joined #ocaml
Hrundi_V_Bakshi is now known as Stumpfenstiel
dhil has quit [Ping timeout: 264 seconds]
dhil has joined #ocaml
yoctocell has quit [Quit: C-x C-c, Shutting down OS...]
neiluj has quit [Ping timeout: 272 seconds]
dhil has quit [Ping timeout: 268 seconds]
dhil has joined #ocaml
dwt_ has joined #ocaml
almaember has joined #ocaml
almaember has left #ocaml [Leaving]
cedric has joined #ocaml
waleee has quit [Quit: WeeChat 3.1]
waleee has joined #ocaml
neiluj has joined #ocaml
oriba has joined #ocaml
unyu has quit [Remote host closed the connection]
unyu has joined #ocaml
gravicappa has quit [Ping timeout: 268 seconds]
dhil has quit [Ping timeout: 268 seconds]
foo303 has joined #ocaml
dhil has joined #ocaml
johnelse has joined #ocaml
hackinghorn has joined #ocaml
johnelse is now known as johnel
johnel has left #ocaml [#ocaml]
Serpent7776 has quit [Ping timeout: 268 seconds]
johnel has joined #ocaml
vb has quit [Ping timeout: 268 seconds]
vb has joined #ocaml
shawnw has joined #ocaml
neiluj has quit [Quit: Leaving]
Tuplanolla has quit [Quit: Leaving.]
vizard has quit [Ping timeout: 268 seconds]
shawnw has quit [Remote host closed the connection]
cedric has quit [Quit: Konversation terminated!]
Stumpfenstiel has quit [Ping timeout: 264 seconds]
Haudegen has quit [Ping timeout: 240 seconds]
foo303 has quit [Ping timeout: 240 seconds]
dhil has quit [Ping timeout: 268 seconds]
olle has quit [Ping timeout: 268 seconds]