Guest13105 has quit [Killed (weber.freenode.net (Nickname regained by services))]
infinity0_ is now known as infinity0
FreeBirdLjj has joined #ocaml
zolk3ri has quit [Quit: Lost terminal]
silver has quit [Read error: Connection reset by peer]
tane has quit [Quit: Leaving]
al-damiri has quit [Quit: Connection closed for inactivity]
sz0 has quit [Quit: Connection closed for inactivity]
mfp has quit [Ping timeout: 252 seconds]
jimmyrcom has quit [Ping timeout: 256 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
kamog has joined #ocaml
Haudegen has quit [Read error: Connection reset by peer]
FreeBirdLjj has quit [Ping timeout: 248 seconds]
KeyJoo has quit [Ping timeout: 264 seconds]
FreeBirdLjj has joined #ocaml
invrsi has quit [Ping timeout: 268 seconds]
jimmyrcom has joined #ocaml
cobreadmonster has joined #ocaml
ygrek has quit [Ping timeout: 265 seconds]
Soni has quit [Ping timeout: 264 seconds]
cbot has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
sonologico has joined #ocaml
pierpa has quit [Quit: Page closed]
mk9 has joined #ocaml
mbuf has joined #ocaml
cobreadmonster has quit [Quit: Connection closed for inactivity]
mk9 has quit [Quit: mk9]
smlquery has joined #ocaml
<smlquery>
Hi! I know this is an OCaml forum, but I was wondering if someone could help me with a question about SML.
<flux>
we usually try :)
<smlquery>
Thanks flux! Here's the question: I want to define some signature S = sig type t; type u = t option; end. In other words, I make the signature enforce the relationship between t and u, and have it so that structs that implement S can define t and get u for free.
<smlquery>
What is the "correct" way to go about doing this?
KeyJoo has joined #ocaml
<flux>
smlquery, you use functors
<smlquery>
Hmm, I /am/ using functors but the compiler is still forcing me to duplicate the definition of u in the struct.
<flux>
hmm actually I wonder if this is actually possible in SML. I would probably need to use 'module type of'.
<smlquery>
module type of?
<smlquery>
Gosh, SML has so many keywords…
<flux>
I was going for: module Foo (X : sig type t end) = struct type t = X.t type u = t option end - but that makes a module. to make a signature (= OCaml's module type??) out of it, one would use module type of Foo
<flux>
well not of Foo but of Foo(sig type t = int end)
<smlquery>
^^ The above gist has the relevant extract from my code.
<flux>
ah, I forgot I can use 'functor', needed to read some ocaml syntax :)
<flux>
but that's actually not relevant here
<flux>
so you can do that and then end in the trouble you're having
<smlquery>
Right — I feel like I shouldn't have to repeat those two lines and that there must be a "correct" way to do this.
<flux>
I don't think it's possible to avoid repetition without adding some other code with that same repetition in another level
<smlquery>
Really? That is quite strange.
<flux>
signatures and modules just are some two entities where modules are checked against signatures; nothing is automatically used from the signature in the module
<smlquery>
Hmm. Can a functor generate a signature rather than a struct?
<flux>
in OCaml you can write module type Z = functor (Y : sig end) -> sig end
<smlquery>
Hmm.
<smlquery>
Okay.
<flux>
are you thinking perhaps be that you remove the two other fields from PARSER and then have a functor for creating an augmented PARSER?
<smlquery>
Yeah.
<flux>
in OCaml you can write: module ParserAug = functor(P : PARSER) -> struct include P type o = t option end not sure if 'include' is available in SML
<flux>
that would then be used on top of the module, so module Parser2 = ParserAug(Parser) , so no need to have a functor on signatures
<smlquery>
You can do `include` and `open` in SML.
<smlquery>
Not sure what the difference is.
<flux>
'include' is as if you write (copy) the stuff right there, 'open' just brings it accessible to the local scope
<smlquery>
I see — so include would (for example) re-run things with side effects.
<flux>
well, probably not. maybe it's more close to saying type t = P.t and similarly copying everything
<smlquery>
Err, so won't they have equivalent effects then?
<flux>
effects, no, but values and types, yes :). I think the effects are evaluated when you pass the module to the functor in the first place, include is not going to evaluate the side effects again..
<smlquery>
Oh, sorry for ambiguous wording — I meant effects in the sense of "won't `include` and `open` do the same thing from my (the programmer's) point of view"?
<flux>
no. when you include something, it's available for 'exporting' to external visibility
<flux>
inside the module they seem the same, yes, but not outside
<smlquery>
Aha. Thanks.
<flux>
for example if I replaced the 'include' with 'open' in my previous fragment, I would not have defined t
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 264 seconds]
smlquery has quit [Ping timeout: 260 seconds]
TarVanimelde has joined #ocaml
cbot has quit [Read error: Connection reset by peer]
cbot has joined #ocaml
andreas_ has joined #ocaml
BitPuffin|osx has joined #ocaml
mfp has joined #ocaml
argent_smith has joined #ocaml
jimmyrcom has quit [Ping timeout: 248 seconds]
cbot has quit [Quit: Leaving]
TheLemonMan has joined #ocaml
kakadu has joined #ocaml
TarVanimelde has quit [Quit: TarVanimelde]
FreeBird_ has quit [Remote host closed the connection]
invrsi has joined #ocaml
ziyourenxiang has joined #ocaml
silver has joined #ocaml
kerrhau has quit [Ping timeout: 248 seconds]
FreeBirdLjj has joined #ocaml
<infinity0>
ocaml 4.05 finally in debian testing
<infinity0>
anyone had problems with 4.06?
FreeBirdLjj has quit [Ping timeout: 256 seconds]
freusque has joined #ocaml
FreeBirdLjj has joined #ocaml
infinity0 has quit [Remote host closed the connection]
zolk3ri has joined #ocaml
infinity0 has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 268 seconds]
FreeBirdLjj has joined #ocaml
<argent_smith>
not yet )
<argent_smith>
actually I compile everything in docker images/containers these days )
<argent_smith>
almost nothing in usual *nix userland
mbuf has quit [Quit: Leaving]
ousado_ has quit [Ping timeout: 264 seconds]
Guest42834 has joined #ocaml
mk9 has joined #ocaml
mbuf has joined #ocaml
igarnier has joined #ocaml
<igarnier>
Hi everyone!
<reynir>
hi!
<Phlogistique>
hi
<zolk3ri>
hey!
Guest42834 has quit [Remote host closed the connection]
mk9 has quit [Quit: mk9]
Haudegen has joined #ocaml
mk9 has joined #ocaml
mk9 has quit [Client Quit]
invrsi has quit [Ping timeout: 264 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
<igarnier>
do you guys know whether one can lift the subtyping relation to module signatures in a nice way? Right now, if I'm not mistaken, module inclusion does not automatically take subtyping into account.
<Drup>
igarnier: it does
<Drup>
module M : sig val x : [> `Foo | `Bar] end = struct let x = `Foo end
<Drup>
that works
jimmyrcom has joined #ocaml
<Drup>
igarnier: do you have a specific example in mind ?
<reynir>
I never saw this before »type 'a t2 = [< `A ] as 'a«, is it the same as »type [> `A] t2 = [> `A]« ?
<reynir>
erm
<reynir>
nevermind
<Drup>
oh, that's an interesting example
jnavila has joined #ocaml
<Drup>
I'm actually not sure what the answer is
<Drup>
I'm not even completely convinced that this is sound in the presence of type subsitutions
<Drup>
igarnier: you might want to ask on the bug tracker, if you do, please link the ticket, I'm curious
freusque has quit [Ping timeout: 256 seconds]
jnavila has quit [Ping timeout: 252 seconds]
freusque has joined #ocaml
<igarnier>
Alright, let's do that. I'm not used to submitting stuff to the tracker, I hope they don't mind low-priority stuff like this.
<Drup>
No, it's fine, and you have a higher risk of getting an enlighted answer by Jacques garrigue telling you that, *of course*, this is not supported because of <insert insane piece of code> would do the wrong thing otherwise :D
<igarnier>
Drup: what title would you suggest to describe that's issue
<igarnier>
ahah, I see :)
<Drup>
"module check and constraint in type declarations"
<Drup>
module inclusion*
ziyourenxiang has quit [Ping timeout: 268 seconds]
<Drup>
mh, the < are in the wrong directions too :/
<igarnier>
What do you mean by 'wrong' ?
ziyourenxiang has joined #ocaml
<Drup>
It should be [> `A ] and [> `A | `B ] for it to have a chance to be correct
jnavila has joined #ocaml
<aantron>
Drup: so you think lwt, and friends, should be moved all into ocsigen, or out of ocsigen into a new org?
<Drup>
aantron: well, it depends what *you* want to do :D
<aantron>
if out, i guess we could park it all in the-lambda-church, it has a cool name :p my main concern is how many people have access to merging in case i step out of the house today and get hit by a truck :p
<aantron>
ownership*
<zolk3ri>
never go outside
<aantron>
true :p
tane has joined #ocaml
<Drup>
aantron: err, no. If you do something, just do an "lwt" org
<aantron>
okay
<Drup>
or move to the ocaml one
<Drup>
or stay in the ocsigen one
<aantron>
im honestly fine with how it is at the moment
<Drup>
but park everything together and avoid silly names that are annoying to find :]
kolko has joined #ocaml
<aantron>
the lambda church? :p
<Drup>
(also, that's really the merlin org more than anything else)
<aantron>
yeah but it's empty now that merlin has been moved to ocaml
<aantron>
well there are still repos in it
Jesin has joined #ocaml
<Drup>
anyway, that was just a suggestion, since lwt is splitting and getting it's own CI and documentation and being all independent :p
mfp has quit [Ping timeout: 265 seconds]
<aantron>
yeah actually the own CI and documentation is happening due to the "initiative" of the centralized one going down, right? :p i mean i had plans to make this eventually anyway, but it's happening sooner than i'm ready
<aantron>
well thats more for the docs
<reynir>
aantron: please don't get hit by a truck (and happy new year) :)
<aantron>
lol, more: truck, please don't hit aantron.. thanks, happy new year too :)
<reynir>
heh
<reynir>
may your 2018 be truck-free !
<zolk3ri>
vehicle-free!
<reynir>
bicycles are okay
<Drup>
aantron: well, the fact that it went down (did it ?) was not really intended ...
<aantron>
lol
<aantron>
well i see that ocsigen.org-data has most recent automated commit on july 27
<Drup>
ah
<Drup>
"oups"
jnavila has quit [Read error: Connection reset by peer]
sapristi has joined #ocaml
freusque has quit [Quit: WeeChat 1.9.1]
<aantron>
:D
freusque has joined #ocaml
invrsi has quit [Ping timeout: 265 seconds]
jnavila has joined #ocaml
ziyourenxiang has quit [Ping timeout: 248 seconds]
sh0t has joined #ocaml
sapristi has quit [Ping timeout: 252 seconds]
sh0t has quit [Remote host closed the connection]
<igarnier>
bye guys, thanks Drup for the help!
igarnier has quit []
TheLemonMan has quit [Ping timeout: 240 seconds]
al-damiri has joined #ocaml
Haudegen has quit [Ping timeout: 252 seconds]
invrsi has joined #ocaml
mfp has joined #ocaml
mbuf has quit [Quit: Leaving]
freusque has quit [Ping timeout: 252 seconds]
jimmyrcom has quit [Ping timeout: 264 seconds]
freusque has joined #ocaml
Haudegen has joined #ocaml
sapristi has joined #ocaml
jnavila has quit [Ping timeout: 265 seconds]
aciniglio has quit [Ping timeout: 248 seconds]
Haudegen has quit [Ping timeout: 260 seconds]
kakadu has quit [Remote host closed the connection]
kakadu has joined #ocaml
TheLemonMan has joined #ocaml
Haudegen has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
invrsi has quit [Ping timeout: 248 seconds]
freusque has quit [Ping timeout: 240 seconds]
ygrek has joined #ocaml
aegray_ has joined #ocaml
freusque has joined #ocaml
aegray has quit [Ping timeout: 240 seconds]
freusque has quit [Ping timeout: 246 seconds]
_andre has quit [Quit: leaving]
freusque has joined #ocaml
freusque has quit [Ping timeout: 252 seconds]
sapristi has quit [Quit: Leaving]
Soni has joined #ocaml
freusque has joined #ocaml
kakadu has quit [Remote host closed the connection]
kakadu has joined #ocaml
dedgrant has joined #ocaml
kerrhau has joined #ocaml
zolk3ri has quit [Remote host closed the connection]
jnavila has joined #ocaml
invrsi has joined #ocaml
jao has quit [Ping timeout: 265 seconds]
BitPuffin|osx has quit [Ping timeout: 248 seconds]
Jesin has quit [Ping timeout: 252 seconds]
jnavila has quit [Remote host closed the connection]
cbot has joined #ocaml
mk9 has joined #ocaml
argent_smith has quit [Quit: Leaving.]
jao has joined #ocaml
kakadu has quit [Remote host closed the connection]
whoman has joined #ocaml
mk9 has quit [Ping timeout: 252 seconds]
andreas_ has quit [Quit: Connection closed for inactivity]