adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | Current MOOC: https://huit.re/ocamlmooc | OCaml 4.04.0 release notes: http://ocaml.org/releases/4.04.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
brunoro_ has joined #ocaml
jlongster has joined #ocaml
mrf3000 has quit [Remote host closed the connection]
mrf3000 has joined #ocaml
rgrinberg has quit [Ping timeout: 268 seconds]
mrf3000 has quit [Ping timeout: 256 seconds]
douglascorrea has joined #ocaml
orbifx-m2 has joined #ocaml
brunoro_ has quit [Ping timeout: 258 seconds]
orbifx-m has quit [Ping timeout: 260 seconds]
brunoro_ has joined #ocaml
brunoro_ has quit [Ping timeout: 246 seconds]
ryanartecona has quit [Quit: ryanartecona]
brunoro_ has joined #ocaml
orbifx-m has joined #ocaml
copy` has joined #ocaml
orbifx-m2 has quit [Ping timeout: 244 seconds]
brunoro_ has quit [Ping timeout: 256 seconds]
brunoro_ has joined #ocaml
veggie_ has quit [Quit: WeeChat 1.5]
brunoro_ has quit [Ping timeout: 260 seconds]
brunoro_ has joined #ocaml
alienbot has joined #ocaml
brunoro_ has quit [Ping timeout: 265 seconds]
brunoro_ has joined #ocaml
jlongster has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
agarwal1975 has joined #ocaml
Simn has quit [Quit: Leaving]
noddy has joined #ocaml
zirman has joined #ocaml
fluter has quit [Ping timeout: 241 seconds]
brunoro_ has quit [Ping timeout: 248 seconds]
brunoro_ has joined #ocaml
fluter has joined #ocaml
noddy has quit [Ping timeout: 260 seconds]
brunoro_ has quit [Ping timeout: 258 seconds]
silver has quit [Read error: Connection reset by peer]
diphuser has quit [Ping timeout: 260 seconds]
noddy has joined #ocaml
rdavison has joined #ocaml
al-damiri has quit [Quit: Connection closed for inactivity]
mfp has quit [Ping timeout: 268 seconds]
brunoro_ has joined #ocaml
TarVanimelde has quit [Quit: TarVanimelde]
TarVanimelde has joined #ocaml
brunoro_ has quit [Ping timeout: 250 seconds]
zirman has quit [Remote host closed the connection]
brunoro_ has joined #ocaml
yomimono has joined #ocaml
yomimono has quit [Remote host closed the connection]
brunoro_ has quit [Ping timeout: 250 seconds]
zirman has joined #ocaml
brunoro_ has joined #ocaml
Heasummn has joined #ocaml
TarVanimelde has quit [Ping timeout: 258 seconds]
jlongster has joined #ocaml
brunoro_ has quit [Ping timeout: 260 seconds]
brunoro_ has joined #ocaml
zany-wombat has joined #ocaml
douglascorrea has quit [Remote host closed the connection]
douglascorrea has joined #ocaml
<zany-wombat> hola, im reading a paper right now about ad hoc polymorpishm in ocaml from 2014, did anything here make it into the language?
TarVanimelde has joined #ocaml
douglascorrea has quit [Ping timeout: 250 seconds]
jlongster has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
brunoro_ has quit [Ping timeout: 260 seconds]
brunoro_ has joined #ocaml
zany-wombat has quit [Ping timeout: 250 seconds]
brunoro_ has quit [Ping timeout: 258 seconds]
zany-wombat has joined #ocaml
zany-wombat has quit [Client Quit]
brunoro_ has joined #ocaml
rdavison has quit [Quit: rdavison]
brunoro_ has quit [Ping timeout: 265 seconds]
rdavison has joined #ocaml
brunoro_ has joined #ocaml
zaquest has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
brunoro_ has quit [Ping timeout: 250 seconds]
brunoro_ has joined #ocaml
zirman has quit [Remote host closed the connection]
brunoro_ has quit [Ping timeout: 248 seconds]
jsgrant has quit [Quit: Konversation terminated!]
brunoro_ has joined #ocaml
_whitelogger has joined #ocaml
brunoro_ has quit [Ping timeout: 240 seconds]
rdavison has quit [Quit: rdavison]
brunoro_ has joined #ocaml
ggole has joined #ocaml
nomicflux has quit [Quit: nomicflux]
brunoro_ has quit [Ping timeout: 265 seconds]
brunoro_ has joined #ocaml
brunoro_ has quit [Ping timeout: 248 seconds]
rdavison has joined #ocaml
Heasummn has quit [Ping timeout: 265 seconds]
brunoro_ has joined #ocaml
brunoro_ has quit [Ping timeout: 252 seconds]
zirman has joined #ocaml
brunoro_ has joined #ocaml
zirman has quit [Ping timeout: 265 seconds]
brunoro_ has quit [Ping timeout: 240 seconds]
brunoro_ has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
brunoro_ has quit [Ping timeout: 268 seconds]
nomicflux has joined #ocaml
ggole_ has joined #ocaml
brunoro_ has joined #ocaml
ggole has quit [Ping timeout: 260 seconds]
nomicflux has quit [Quit: nomicflux]
kamog has joined #ocaml
brunoro_ has quit [Ping timeout: 245 seconds]
xaimus has quit [Remote host closed the connection]
axiles has quit [Ping timeout: 246 seconds]
Muzer has quit [Read error: Connection reset by peer]
brunoro_ has joined #ocaml
brunoro_ has quit [Ping timeout: 248 seconds]
brunoro_ has joined #ocaml
brunoro_ has quit [Ping timeout: 244 seconds]
brunoro_ has joined #ocaml
rdavison has quit [Quit: rdavison]
rdavison has joined #ocaml
Muzer has joined #ocaml
noddy has quit [Ping timeout: 260 seconds]
axiles has joined #ocaml
slash^ has joined #ocaml
zirman has joined #ocaml
zirman has quit [Ping timeout: 240 seconds]
noddy has joined #ocaml
noddy has quit [Ping timeout: 252 seconds]
AlexRussia has quit [Ping timeout: 260 seconds]
AlexRussia has joined #ocaml
noddy has joined #ocaml
ggole__ has joined #ocaml
ggole_ has quit [Ping timeout: 260 seconds]
AlexDenisov has joined #ocaml
AlexDeni_ has joined #ocaml
AlexDenisov has quit [Ping timeout: 250 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 260 seconds]
copy` has quit [Quit: Connection closed for inactivity]
<companion_cube> Leonidas: oops, must be CCSexpM
<companion_cube> anyway it's going to change again in 1.0, I replaced it with a blocking version that is much much simpler (ocamllex)
brunoro_ has quit [Ping timeout: 252 seconds]
brunoro_ has joined #ocaml
gjaldon has joined #ocaml
_whitelogger has joined #ocaml
rdavison has quit [Quit: rdavison]
brunoro_ has quit [Ping timeout: 250 seconds]
zirman has joined #ocaml
Algebr` has joined #ocaml
zozozo has quit [Ping timeout: 240 seconds]
zirman has quit [Ping timeout: 268 seconds]
Algebr` has quit [Ping timeout: 256 seconds]
Algebr` has joined #ocaml
FreeBirdLjj has joined #ocaml
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 260 seconds]
Algebr` has quit [Ping timeout: 240 seconds]
brunoro_ has joined #ocaml
Algebr` has joined #ocaml
Algebr` has quit [Ping timeout: 256 seconds]
orbifx-m2 has joined #ocaml
brunoro_ has quit [Ping timeout: 260 seconds]
orbifx-m has quit [Ping timeout: 246 seconds]
brunoro_ has joined #ocaml
orbifx-m has joined #ocaml
zozozo has joined #ocaml
orbifx-m2 has quit [Read error: Connection reset by peer]
orbifx-m2 has joined #ocaml
orbifx has joined #ocaml
orbifx-m has quit [Ping timeout: 248 seconds]
FreeBirdLjj has joined #ocaml
orbifx-m has joined #ocaml
orbifx-m2 has quit [Ping timeout: 246 seconds]
FreeBirdLjj has quit [Ping timeout: 245 seconds]
<Khady> I can't resolve the domain name
alienbot has quit [Remote host closed the connection]
brunoro_ has quit [Ping timeout: 256 seconds]
brunoro_ has joined #ocaml
pierpa has joined #ocaml
orbifx-m2 has joined #ocaml
brunoro_ has quit [Ping timeout: 246 seconds]
orbifx-m has quit [Ping timeout: 250 seconds]
balod has joined #ocaml
balod has quit [Remote host closed the connection]
TarVanim_ has joined #ocaml
TarVanimelde has quit [Ping timeout: 258 seconds]
balod has joined #ocaml
copy` has joined #ocaml
mfp has joined #ocaml
brunoro_ has joined #ocaml
TarVanim_ has quit [Quit: TarVanim_]
FreeBirdLjj has joined #ocaml
govg has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 250 seconds]
TarVanimelde has joined #ocaml
brunoro_ has quit [Ping timeout: 265 seconds]
brunoro_ has joined #ocaml
AlexDenisov has joined #ocaml
AlexDeni_ has quit [Ping timeout: 265 seconds]
brunoro_ has quit [Ping timeout: 240 seconds]
brunoro_ has joined #ocaml
brunoro_ has quit [Ping timeout: 250 seconds]
troydm has quit [Ping timeout: 250 seconds]
brunoro_ has joined #ocaml
Simn has joined #ocaml
AlexDeni_ has joined #ocaml
AlexDenisov has quit [Read error: Connection reset by peer]
orbifx has quit [Ping timeout: 268 seconds]
zpe has joined #ocaml
brunoro_ has quit [Ping timeout: 250 seconds]
balod has quit [Remote host closed the connection]
balod has joined #ocaml
AlexDenisov has joined #ocaml
TarVanimelde has quit [Quit: Leaving]
AlexDeni_ has quit [Ping timeout: 246 seconds]
Sim_n has joined #ocaml
TarVanimelde has joined #ocaml
Simn has quit [Ping timeout: 246 seconds]
kamog has quit [Ping timeout: 260 seconds]
AlexDeni_ has joined #ocaml
AlexDenisov has quit [Ping timeout: 250 seconds]
orbifx-m2 has quit [Remote host closed the connection]
malc_ has joined #ocaml
brunoro_ has joined #ocaml
shinnya has joined #ocaml
silver has joined #ocaml
sillyotter has joined #ocaml
sillyotter has quit [Client Quit]
Algebr` has joined #ocaml
brunoro_ has quit [Ping timeout: 244 seconds]
orbifx has joined #ocaml
brunoro_ has joined #ocaml
brunoro_ has quit [Ping timeout: 244 seconds]
Onemorenickname has joined #ocaml
brunoro_ has joined #ocaml
Algebr` has quit [Ping timeout: 260 seconds]
alienbot has joined #ocaml
brunoro_ has quit [Ping timeout: 252 seconds]
troydm has joined #ocaml
cdidd has quit [Ping timeout: 260 seconds]
AlexDeni_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Onemorenickname> hi people
<Onemorenickname> is it possible to have two mutually recursive types in different files ?
ocaml527 has joined #ocaml
cdidd has joined #ocaml
zirman has joined #ocaml
zirman has joined #ocaml
zirman has quit [Changing host]
jnavila has joined #ocaml
<ocaml527> Question about recursive calls
brunoro_ has joined #ocaml
TarVanim_ has joined #ocaml
TarVanimelde has quit [Ping timeout: 268 seconds]
Sim_n has quit [Quit: Leaving]
brunoro_ has quit [Ping timeout: 256 seconds]
zirman has quit [Remote host closed the connection]
brunoro_ has joined #ocaml
<zozozo> Onemorenickname: afaik it's not possible
<Onemorenickname> zozozo : I see
<zozozo> One solution is to make one type polymorphic and instantiate it with the other afterwards
<Onemorenickname> i found some things with making polymorphic types or modules
<Onemorenickname> but the problem is that it's not only two mutually recursive types
<Onemorenickname> and it becomes ugly quite quickly with polymorphism
<zozozo> Then define all types in the same file ?
<Onemorenickname> i guess that's what i will do
<Onemorenickname> but i would have like to have the functions manipulating a type and that type to be in the same file
<zozozo> Well, you can have one big file where you define the types, and then in that file done modules for manipulating the types
<Onemorenickname> i don't understand what you mean by "in that file done modules for manipulating the types"
<orbifx> quit
<zozozo> In that file, *define modules...
orbifx has quit [Quit: WeeChat 1.6]
<zozozo> Sorry I'm on my phone, it's not easy to type long sentences
<Onemorenickname> that's what i've done at the beginning, but my file got quite long, hence the need for separating files
<Onemorenickname> i guess it cant be helped
<zozozo> How long ? I personally have a 2 or 3 thousand line file somewhere where I do that
<ocaml527> Expr( string, Expr, Expr) -> find string (callrecursive Expr) (callrecursive Expr) How do I make such recursive calls ? That call is syntactically wrong.
<ocaml527> Anyone willing to proffer advice.
<companion_cube> this is not even a function, where do you write it?
<ocaml527> That is one pattern in the function.
<companion_cube> ah, one of the branches?
<ocaml527> Yes
<companion_cube> looks ok then, except for the fact that Expr should be either a ternary constructor, or a nullary one,m but not both
<companion_cube> you might want `Expr (s, e1, e2) -> find s (callrecursive e1) (callrecursive e2)`
<companion_cube> (lowercase names for variables)
<ocaml527> Ok. e1 and e2 will be computed first ?
<ocaml527> find depends on the results of those two computations.
<companion_cube> (callrecursive e{1,2}) will be computed before find, yes
<companion_cube> but you should probably use `let` to make the evaluation order clear if it's significant
<ocaml527> That is what I don't know. e1 and e2 are independent.
<ocaml527> Don't want let if this is fine.
<companion_cube> I'm not sure I follow. e1 and e2 are already values; callrecursive e1 (resp. e2) will be computed before the call to find
<companion_cube> that's all that OCaml guarantees
<ocaml527> Results of (callrecursive e1) and (callrecursive e2) are find's parameters.. But these two calls are totally separate. One is not the other's param.
<companion_cube> indeed
<companion_cube> they are computed in an unspecified order, then their results are fed to find
<ocaml527> Let me try then. Ok
<companion_cube> sorry, got to leave :s
<Onemorenickname> zozozo : How do you browse that 2/3k lines file ?
<zozozo> Onemorenickname: I split code in separate modules
<zozozo> Also, it's mainly boilerplate code
<ocaml527> Just tried. Doesn't match (Op ("mod", Op ("and", Op ("mul", Value (-1), Value (-5)), Value (-1)), Value (-1)))\
brunoro_ has quit [Ping timeout: 260 seconds]
brunoro_ has joined #ocaml
octachron has joined #ocaml
Onemorenickname has quit [Read error: Connection reset by peer]
brunoro_ has quit [Ping timeout: 256 seconds]
jbrown has quit [Ping timeout: 246 seconds]
TarVanim_ has quit [Quit: TarVanim_]
jnavila has quit [Remote host closed the connection]
jnavila has joined #ocaml
zirman has joined #ocaml
hyperboreean has quit [Remote host closed the connection]
jbrown has joined #ocaml
zirman has quit [Ping timeout: 256 seconds]
zirman has joined #ocaml
zirman has joined #ocaml
zirman has quit [Changing host]
TarVanimelde has joined #ocaml
brunoro_ has joined #ocaml
brunoro_ has quit [Ping timeout: 260 seconds]
brunoro_ has joined #ocaml
jnavila has quit [Ping timeout: 260 seconds]
Anarchos has joined #ocaml
adi___ has quit [Ping timeout: 260 seconds]
adi____ has joined #ocaml
zirman has quit [Remote host closed the connection]
zirman has joined #ocaml
Simn has joined #ocaml
malc_` has joined #ocaml
ocaml527 has quit [Ping timeout: 260 seconds]
malc_ has quit [Ping timeout: 268 seconds]
zirman has quit [Remote host closed the connection]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
<theblatte> any way to tell opam to compile OCaml without Graphics support?
<theblatte> the x11 dependency is causing issues in Homebrew...
TarVanim_ has joined #ocaml
AlexDenisov has joined #ocaml
TarVanimelde has quit [Ping timeout: 248 seconds]
brunoro_ has quit [Ping timeout: 260 seconds]
<theblatte> opam insists on enabling Graphics support even when x11 is not available it seems
brunoro_ has joined #ocaml
alienbot has quit [Remote host closed the connection]
brunoro_ has quit [Ping timeout: 250 seconds]
brunoro_ has joined #ocaml
brunoro_ has quit [Ping timeout: 250 seconds]
brunoro_ has joined #ocaml
<lobo> is it possible to tell opam to ignore the lock file, when another instance is running? i'm calling "opam config var share" to find merlin/ocp-indent in my vimrc. but this fails and times out, when i run an opam upgrade in another terminal
xavierm02 has joined #ocaml
<xavierm02> Hi. I'm trying to have several implementations of a structure (i_1, i_2, ...), including a lazy one (i_0). To do this, I have a class c and one subclass per implementation (c_0, c_1, ...), and those classes' constructors have type i_k -> c_k. The lazy implementation can also be built from any thing of type c, i.e., there is a constructor c_k -> i_0.
<xavierm02> Then, for binary function X -> X -> X, I build have one implementation per target implementation of X, i.e. a function f_i : c -> c -> c_i. And everything is working well but I can't find a way to make f_i know when its arguments of type c are in fact of type c_i and so it can do the operation more efficiently.
<xavierm02> Here is a toy example: http://pastebin.com/RK4KTXaP
jnavila has joined #ocaml
shinnya has quit [Ping timeout: 268 seconds]
<xavierm02> The simplest way would be to have a method of c of type (I0 of i0 | I1 of i1 | ...) but that wouldn't allow adding new implementations. The next try would be to try the same thing using polymorphic variants, but then the class c becomes polymorphic and so the lazy implementation i_0 also becomes polymorphic and then you can only use the constructor c_k -> i_0 for one k per term of type i_0, i.e. you can't do lazy things on objects with
balod has quit [Remote host closed the connection]
brunoro_ has quit [Ping timeout: 256 seconds]
brunoro_ has joined #ocaml
govg has quit [Ping timeout: 268 seconds]
brunoro_ has quit [Ping timeout: 240 seconds]
brunoro_ has joined #ocaml
zirman has joined #ocaml
gjaldon has quit []
zirman has quit [Ping timeout: 258 seconds]
Algebr` has joined #ocaml
freusque has joined #ocaml
govg has joined #ocaml
nomicflux has joined #ocaml
brunoro_ has quit [Ping timeout: 245 seconds]
<xavierm02> Nevermind, it works: http://pastebin.com/E6wD5Hjy
chris2 has quit [Ping timeout: 246 seconds]
jnavila has quit [Ping timeout: 260 seconds]
Armael has quit [Ping timeout: 250 seconds]
Algebr` has quit [Ping timeout: 260 seconds]
ryanartecona has joined #ocaml
TarVanim_ has quit [Quit: TarVanim_]
Armael has joined #ocaml
chris2 has joined #ocaml
ryanartecona has quit [Ping timeout: 250 seconds]
TarVanimelde has joined #ocaml
pierpa has quit [Remote host closed the connection]
brunoro_ has joined #ocaml
nomicflux has quit [Quit: nomicflux]
demonimin has quit [Remote host closed the connection]
jnavila has joined #ocaml
pierpa has joined #ocaml
demonimin has joined #ocaml
zirman has joined #ocaml
zirman has quit [Changing host]
zirman has joined #ocaml
brunoro_ has quit [Ping timeout: 265 seconds]
<Leonidas> is there any nice highlighting file for the sexp format that is rather popular in OCaml? (aka what Core and containers ship with)
brunoro_ has joined #ocaml
jnavila has quit [Ping timeout: 260 seconds]
stux|RC-only has quit [Ping timeout: 265 seconds]
zirman has quit [Read error: Connection reset by peer]
stux|RC-only has joined #ocaml
zirman has joined #ocaml
brunoro_ has quit [Ping timeout: 250 seconds]
<adrien> Leonidas: in vim I use the elisp one :P
<Leonidas> hmm, yeah, that could work. thanks!
zirman has quit [Ping timeout: 260 seconds]
<Khady> is someone using evil-matchit matchit in emacs to be able to jump from begin/struct/sig to end?
<Khady> I think I just need to convert the vim configuration https://wiki.xenproject.org/wiki/OCaml_Editing#VIM
<Khady> But if somebody did it before it's even better :)
<Leonidas> adrien: where did you get elisp highlighting? can't find anything related
nomicflux has joined #ocaml
nomicflux has quit [Client Quit]
TarVanimelde has quit [Quit: TarVanimelde]
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
TarVanimelde has joined #ocaml
FreeBirdLjj has joined #ocaml
nomicflux has joined #ocaml
jnavila has joined #ocaml
brunoro_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 256 seconds]
ontologiae has joined #ocaml
<Leonidas> I used the common lisp one, seems to do fine
govg has quit [Ping timeout: 250 seconds]
Simn has quit [Ping timeout: 250 seconds]
govg has joined #ocaml
copy` has quit [Quit: Connection closed for inactivity]
Simn has joined #ocaml
zirman has joined #ocaml
ontologiae has quit [Ping timeout: 244 seconds]
govg has quit [Ping timeout: 256 seconds]
tane has joined #ocaml
nomicflux has quit [Quit: nomicflux]
aantron has quit [Quit: Enjoy!]
brunoro_ has quit [Ping timeout: 260 seconds]
Algebr` has joined #ocaml
brunoro_ has joined #ocaml
zpe has quit [Remote host closed the connection]
govg has joined #ocaml
<adrien> Leonidas: in vim I use :set ft=elisp
<xavierm02> How can I enforce a module signature without any effect on what's abstracted / hidden?
brunoro_ has quit [Ping timeout: 256 seconds]
yomimono has joined #ocaml
<ggole__> xavierm02: module M= struct ... end module Unused = (M : S) is probably the easiest way
govg has quit [Ping timeout: 260 seconds]
<Leonidas> adrien: my vim does not know any elisp ft. just a cl filetype.
<Leonidas> which works just fine, no complaints
<adrien> Leonidas: I'm fairly sure I had been using elisp but it seems to be lisp now
<adrien> maybe with vim 8
<adrien> or maybe I was wrong, difficult to tell
<Leonidas> yeah, I only have 7.4, till fedora decides to actually release :)
AlexDenisov has joined #ocaml
govg has joined #ocaml
malc_` has quit [Remote host closed the connection]
brunoro_ has joined #ocaml
brunoro_ has quit [Ping timeout: 260 seconds]
brunoro_ has joined #ocaml
tane has quit [Quit: Leaving]
brunoro_ has quit [Ping timeout: 260 seconds]
nomicflux has joined #ocaml
brunoro_ has joined #ocaml
zpe has joined #ocaml
timclassic has quit [Ping timeout: 240 seconds]
M-ErkkiSeppl has quit [Ping timeout: 245 seconds]
regnat[m] has quit [Ping timeout: 245 seconds]
diamaths[m] has quit [Ping timeout: 256 seconds]
M-jimt has quit [Ping timeout: 256 seconds]
barkmadley[m] has quit [Ping timeout: 240 seconds]
bugabinga[m] has quit [Ping timeout: 240 seconds]
Guest23668[m] has quit [Ping timeout: 258 seconds]
XC[m]1 has quit [Ping timeout: 260 seconds]
regnt[m] has quit [Ping timeout: 245 seconds]
M-martinklepsch has quit [Ping timeout: 245 seconds]
aspiwack[m] has quit [Ping timeout: 246 seconds]
Bluddy[m] has quit [Ping timeout: 260 seconds]
brunoro_ has quit [Ping timeout: 268 seconds]
M-Illandan has quit [Ping timeout: 258 seconds]
M-pesterhazy has quit [Ping timeout: 256 seconds]
srenatus[m] has quit [Ping timeout: 256 seconds]
lpw25[m] has quit [Ping timeout: 260 seconds]
brunoro_ has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
rdavison has joined #ocaml
brunoro_ has quit [Ping timeout: 258 seconds]
brunoro_ has joined #ocaml
Algebr` has quit [Ping timeout: 260 seconds]
beginner has joined #ocaml
<beginner> Is there something special to consider when matching polymorphic variant constructors?
<octachron> beginner, some caution is probably needed since the compiler cannot catch spelling errors and other similar human mistakes
<octachron> also, the typing of polymorphic variant can be quite involved
<octachron> ((( you can use polymorphic variants to implements binary arithmetic for example )))
<beginner> i play around with state machines and atdgen generated messages, but have problem with this code part
<beginner> Types for tag `Task_Creation are incompatible
rdavison has quit [Quit: rdavison]
<xavierm02> ggole: Thank you :)
d0nn1e has quit [Ping timeout: 260 seconds]
<octachron> beginner, are you sure that `Task_creation carry (only) a msg?
<octachron> polymorphic variant tags should have the same type of argument in a given type
Algebr` has joined #ocaml
<octachron> e.g. let "f = function `A -> 0 | `A n -> 1" gives an incompatible types for tag error
<octachron> because the tag `A is used with different kind of argument in the same context
<flux> does atdgen require the use of polymorphic variants?
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
brunoro_ has quit [Ping timeout: 258 seconds]
<beginner> thats the type definition
zpe has quit [Ping timeout: 256 seconds]
average is now known as dolo
axiles has quit [Ping timeout: 260 seconds]
<octachron> beginner, have you tried to add a type constraint to external_stream to ensure that is a "cmd Lwt_stream.t" ?
ygrek has joined #ocaml
copy` has joined #ocaml
dolo is now known as average
nomicflux has quit [Quit: nomicflux]
<beginner> ocatchron: thanks i am trying that right now
zpe has joined #ocaml
<beginner> ocatchron: it worked :)
axiles has joined #ocaml
ggole__ has quit []
brunoro_ has joined #ocaml
kakadu has joined #ocaml
nomicflux has joined #ocaml
brunoro_ has quit [Ping timeout: 252 seconds]
jmiven has quit [Quit: co'o]
jmiven has joined #ocaml
rdavison has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rdavison has quit [Client Quit]
brunoro_ has joined #ocaml
rdavison has joined #ocaml
nomicflux has quit [Quit: nomicflux]
brunoro_ has quit [Ping timeout: 248 seconds]
Heasummn has joined #ocaml
fraggle-boate has quit [Ping timeout: 260 seconds]
Mercuria1Alchemi has quit [Ping timeout: 248 seconds]
rdavison has quit [Quit: rdavison]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
brunoro_ has joined #ocaml
zpe has quit [Ping timeout: 256 seconds]
brunoro_ has quit [Ping timeout: 260 seconds]
brunoro_ has joined #ocaml
beginner has quit [Quit: Page closed]
brunoro_ has quit [Ping timeout: 256 seconds]
brunoro_ has joined #ocaml
douglascorrea has joined #ocaml
brunoro_ has quit [Ping timeout: 265 seconds]
brunoro_ has joined #ocaml
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
brunoro_ has quit [Ping timeout: 260 seconds]
jlouis has quit [Remote host closed the connection]
apache2_ has quit [Remote host closed the connection]
ahf has quit [Write error: Connection reset by peer]
rdavison has joined #ocaml
blahblah has joined #ocaml
jave has quit [Quit: ZNC - http://znc.in]
Arahael has joined #ocaml
brunoro_ has joined #ocaml
jave has joined #ocaml
aantron has joined #ocaml
blahblah has left #ocaml [#ocaml]
jnavila has quit [Ping timeout: 268 seconds]
octachron has quit [Quit: Leaving]
brunoro_ has quit [Ping timeout: 244 seconds]
siaw23 has joined #ocaml
<siaw23> hello i need help. why do i get this error in this code? https://gist.github.com/siaw23/59c3877261a072d66adf835bdcf16ba8
<siaw23> i am getting “The constructor :: does not belong to type llist” and don’t know what the problem is.
ahf has joined #ocaml
brunoro_ has joined #ocaml
<zozozo> siaw23: when you write [1;2;3] it is equivalent to 1 :: 2 :: 3 :: [], where :: and [] are the two list constructors, so naturally [1;2;3] should have the type int list, however, your function expect something of type _ llist
<zozozo> since :: cannot build a value of type _ llist, the type checker complains
xavierm02 has quit [Quit: Page closed]
<zozozo> you probably want : LCons(1, LCons(2, LCons(3, LNil))) instead
<siaw23> zozozo: LCons(1, LCons(2, LCons(3, LNil))) would be the value of the list argument?
<zozozo> well it is a value of type int llist
<zozozo> ah sorry, I misread
<zozozo> so something more like LCons(1, (fun () -> LCons (2, (fun () -> ...))))
<siaw23> zozozo: i can’t seem to get my head around this. look at what i’m getting https://gyazo.com/ea4c60271f536f8fe057a05c3a2415b5
brunoro_ has quit [Ping timeout: 246 seconds]
<zozozo> siaw23: in the last (fun () -> LCons(3, (fun () -> LNil)))
<zozozo> remember, the function must return a value of type '_a llist
<siaw23> zozozo: thanks :)
<siaw23> zozozo: no error but i’m trying to print it. is this wrong? https://gyazo.com/96ec23c55745b6bce8bb57fadabcd374
<siaw23> zozozo: i mean “let x” instead of “val x”
<zozozo> siaw23: won't work
<zozozo> List.map operates on values of type 'a list
<zozozo> here you give it a int llist
<siaw23> zozozo: how can i print the variable in this case?
<zozozo> well, I see two ways : either you write a function to transform an arbitrary 'a llist into a 'a list, and then print the list using code similar to what you pasted above, or you write a printing function that works on llists
yomimono has quit [Ping timeout: 260 seconds]
<siaw23> ufff
<siaw23> ocaml is hard
<siaw23> if not complicated
<zozozo> well, why are you defining a new type for lists ?
<zozozo> well lazy lists I assume
<siaw23> it’s from an excecise from school that i’m trying to undersetand
kakadu has quit [Remote host closed the connection]
<zozozo> well, if you define a new type, it follows that there is (almost) no function that can make use of the specifics of that type, so you have to redo some stuff like printing