adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.07.1 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.07/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml | Due to ongoing spam, you must register your nickname to talk on the channel
crowley95 has quit [Ping timeout: 250 seconds]
crowley95 has joined #ocaml
crowley95 has quit [Ping timeout: 246 seconds]
al-damiri has quit [Quit: Connection closed for inactivity]
ziyourenxiang has joined #ocaml
crowley95 has joined #ocaml
crowley95 has quit [Client Quit]
jmiven has quit [Quit: co'o]
jmiven has joined #ocaml
crowley95 has joined #ocaml
pierpa has joined #ocaml
ctrlsbstr has joined #ocaml
Ou42 has joined #ocaml
<Ou42> hello. quick Q.. hoping to ask and dash with newfound knowledge
<Ou42> OCaml FUN MOOC last week!!! :p if given a type .... a la .... type 'e rel = 'e -> 'e list
<Ou42> and then we create functions that take an 'e rel and return an 'e rel ... shouldn't 'e rel be in the signature for the function?
<lyxia> why not 'e rel -> 'e rel
<Ou42> ???
<Ou42> I guess my Q is this... I made a function iter_rel that has this type sig:
<Ou42> val iter_rel : ('a -> 'a list) -> int -> 'a -> 'a list = <fun>
<Ou42> but I'm curious if I've done something wrong or if that is normal that it didn't infer the 'e rel type
<Ou42> mind you this passes the FUN MOOC grader, so it's not so much that as I'm curious if there are things that could be better or if it is just my imagination.
<lyxia> Oh I see, sorry I misunderstood. Yes, that is fine.
<lyxia> as far as the compiler is concerned, 'e rel and 'e -> 'e list are identical.
<lyxia> for documentation this might matter, and you can make your intent explicit by annotating your function or by using a .mli file.
dsp has joined #ocaml
aplainzetakind has quit [Ping timeout: 250 seconds]
<Ou42> @lyxia, tyvm!
<Ou42> sorry for the pauses... i tried to fit in a little learning while getting ready to head out. TYVM!
Ou42 has left #ocaml ["Closing Window"]
Ou42 has joined #ocaml
Ou42 has quit [Quit: Going offline, see ya! (www.adiirc.com)]
demonimin has joined #ocaml
mfp has quit [Ping timeout: 268 seconds]
demonimin has quit [Quit: bye]
demonimin has joined #ocaml
ctrlsbstr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tormen has joined #ocaml
tormen_ has quit [Ping timeout: 272 seconds]
roygbiv has joined #ocaml
jao has quit [Ping timeout: 246 seconds]
jao has joined #ocaml
tsani has quit [Ping timeout: 252 seconds]
gravicappa has joined #ocaml
tsani has joined #ocaml
KeyJoo has joined #ocaml
pierpa has quit [Ping timeout: 256 seconds]
infinity0 has quit [Ping timeout: 245 seconds]
al_ has joined #ocaml
al_ has quit [Client Quit]
infinity0 has joined #ocaml
philtor has quit [Ping timeout: 250 seconds]
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jao has quit [Ping timeout: 250 seconds]
roygbiv has quit [Quit: ™]
engil has joined #ocaml
nicoo has quit [Ping timeout: 256 seconds]
nicoo has joined #ocaml
ygrek__ has quit [Ping timeout: 272 seconds]
EvilBill21 has joined #ocaml
EvilBill21 has quit [Remote host closed the connection]
clockish has quit [Quit: bye]
clockish has joined #ocaml
KeyJoo has quit [Quit: KeyJoo]
sagotch has joined #ocaml
kvda has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nolanv has quit [Ping timeout: 246 seconds]
nolanv has joined #ocaml
groovy2shoes has quit [Excess Flood]
groovy2shoes has joined #ocaml
dsp has quit [Ping timeout: 250 seconds]
vbmithr has quit [Ping timeout: 250 seconds]
dsp has joined #ocaml
gareppa has joined #ocaml
vbmithr has joined #ocaml
asymptotically has joined #ocaml
Guest47098 has joined #ocaml
Guest47098 has quit [Read error: Connection reset by peer]
Haudegen has joined #ocaml
themsay has quit [Ping timeout: 250 seconds]
themsay has joined #ocaml
mengu has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
pierpal has quit [Remote host closed the connection]
gravicappa has quit [Ping timeout: 240 seconds]
ollehar has joined #ocaml
mfp has joined #ocaml
aplainzetakind has joined #ocaml
gravicappa has joined #ocaml
gareppa has quit [Quit: Leaving]
AltGr has joined #ocaml
AltGr has left #ocaml [#ocaml]
mengu has quit [Quit: Leaving...]
nolanv has quit [Ping timeout: 246 seconds]
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
Haudegen has quit [Remote host closed the connection]
pierpal has joined #ocaml
ep1morphism has quit [Ping timeout: 250 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
sagotch has quit [Quit: Leaving.]
shmibs has quit [Quit: leaving =o]
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
asymptotically has quit [Remote host closed the connection]
pierpal has quit [Read error: Connection reset by peer]
ep1morphism has joined #ocaml
pierpal has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
pierpal has quit [Ping timeout: 244 seconds]
pierpal has joined #ocaml
shmibs has joined #ocaml
pierpal has quit [Ping timeout: 246 seconds]
sagotch has joined #ocaml
asymptotically has joined #ocaml
aplainzetakind has quit [Ping timeout: 250 seconds]
gravicappa has quit [Ping timeout: 250 seconds]
pierpal has joined #ocaml
Haudegen has joined #ocaml
pierpal has quit [Ping timeout: 268 seconds]
pzp has joined #ocaml
jao has joined #ocaml
FreeBirdLjj has joined #ocaml
gravicappa has joined #ocaml
zolk3ri has joined #ocaml
pierpal has joined #ocaml
pierpal has quit [Ping timeout: 250 seconds]
spew has joined #ocaml
pierpal has joined #ocaml
zolk3ri has quit [Remote host closed the connection]
jao has quit [Ping timeout: 245 seconds]
al-damiri has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 245 seconds]
FreeBirdLjj has joined #ocaml
ygrek has joined #ocaml
Haudegen has quit [Remote host closed the connection]
<wilfredh> if I have a foo.ml, is the corresponding .mli file always in the same directory and called foo.mli?
<wilfredh> I'm thinking of writing a quick editor script for switching between .ml and .mli
<Drup> In 99.9% of the cases, yes
<Drup> emacs tuareg has that, under C-c C-a
<companion_cube> on vim I have \s for switching, it's by default
KeyJoo has joined #ocaml
<wilfredh> ooh, fabulous. I'm an Emacs user, FWIW
<wilfredh> I'd found merlin-switch-to-mli, but that seems to do something else
asymptotically has quit [Quit: Leaving]
<wilfredh> ideally my editor would also highlight if there's a .mli file for the current file, I might knock something together if tuareg doesn't have that
ygrek has quit [Ping timeout: 240 seconds]
<Fardale> companion_cube: thanks !
emily has quit [Quit: down for repairs]
<companion_cube> ?
<Fardale> for the \s on vim
zolk3ri has joined #ocaml
<companion_cube> ah, right
<companion_cube> it's so useful!
<companion_cube> also, the ctrlp plugin to navigate
<zolk3ri> hai
pzp has quit [Quit: Connection closed for inactivity]
_y has joined #ocaml
<_y> gnnnnnnnnii
<_y> sorry, i just needed to spit my frustration aloud
<_y> because i am trying to lint ocaml
<_y> and constructions like “type t = (*no pipe*) Constr” or “fun x : return_type -> expr” are a nightmare
<companion_cube> _y: can't you just reuse the standard parser?
<_y> companion_cube, nope, it’s for vim ^^
<companion_cube> ah, well
<_y> on the expressiveness of vim linting: there are “regions” but, as far as i can tell, there is no direct way to describe a grammar such as “itemA followed by itemB followed by itemC, any other sequence is a syntax error”
<_y> not even adding that comments are allowed between each token, and what not
<_y> there is a project to add AST-based linters to neovim, which should make everyone happy if it lands in vim at some point
<_y> anyway
<_y> has anyone ever seen or written “fun x : return_type -> expr” in ocaml code, or can i throw away linting support for this ?
zolk3ri has quit [Quit: leaving]
<nore> _y: I used "fun (x : return_type) -> expr" a few days ago
<_y> nore, that’s not the same thing
<nore> oops yes
<_y> this one is fine, it’s a regular type expression ended by the outer closing parenthesis :-)
<nore> I think I already used that syntax with let, not sure if I ever did with fun
<nore> but I guess it's not a problem with let, because it is ended by the "="?
<_y> the issue with “fun x : typ -> expr” is that the arrow is not part of the type expression but instead ends it
<_y> exactly
<nore> well the type expression has lower priority than the arrow
<nore> (or higher, I never know, whatever)
<_y> using => instead of -> at the expression level would probably have been a good idea
marvin3 has quit [Ping timeout: 250 seconds]
bartholin has joined #ocaml
ctrlsbstr has joined #ocaml
ctrlsbstr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ollehar has quit [Ping timeout: 250 seconds]
emily has joined #ocaml
ctrlsbstr has joined #ocaml
fraxamo has joined #ocaml
emily has quit [Ping timeout: 264 seconds]
themsay has quit [Ping timeout: 250 seconds]
emily has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 268 seconds]
sagotch has quit [Ping timeout: 260 seconds]
gravicappa has quit [Ping timeout: 252 seconds]
ziyourenxiang has quit [Ping timeout: 246 seconds]
KeyJoo has quit [Quit: KeyJoo]
zolk3ri has joined #ocaml
ygrek has joined #ocaml
tormen has quit [Ping timeout: 244 seconds]
tormen has joined #ocaml
zolk3ri has quit [Ping timeout: 256 seconds]
zolk3ri has joined #ocaml
kakadu_ has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
slamzy has joined #ocaml
jnavila has joined #ocaml
slamzy has quit [K-Lined]
jao has joined #ocaml
slamzy has joined #ocaml
aplainzetakind has joined #ocaml
jarindyk2 has joined #ocaml
<jarindyk2> Hello. Is it possible to do something like "type I is range 1 .. 10;" in OCaml? If not, is it possible to implement it and make sure the checking is done at compile-time?
marvin2 has joined #ocaml
<octachron> For small range? You can define a sum type "type t = N0 | .... | N10 `.
tane has joined #ocaml
bartholin has quit [Remote host closed the connection]
slamzy1234 has joined #ocaml
zolk3ri has quit [Quit: Lost terminal]
slamzy12345 has joined #ocaml
slamzy has quit [Remote host closed the connection]
jarindyk2 has quit [Quit: Lost terminal]
slamzy1234 has quit [Ping timeout: 256 seconds]
fraxamo has quit [Quit: Leaving]
slamzy1234 has joined #ocaml
slamzy12345 has quit [Ping timeout: 256 seconds]
kvda has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ctrlsbstr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ctrlsbstr has joined #ocaml
ctrlsbstr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
quarters has quit [Ping timeout: 252 seconds]
ctrlsbstr has joined #ocaml
jnavila has quit [Remote host closed the connection]
emily has quit [Quit: Reconnecting]
emily has joined #ocaml
quarters has joined #ocaml
kvda has joined #ocaml
quarters has quit [Changing host]
quarters has joined #ocaml
quarters has joined #ocaml
kakadu_ has quit [Remote host closed the connection]
tane has quit [Quit: Leaving]