kakadu_ has quit [Remote host closed the connection]
spew has quit [Quit: Connection closed for inactivity]
brettgilio has quit [Quit: Quit]
jao has quit [Ping timeout: 258 seconds]
silver has quit [Read error: Connection reset by peer]
brettgilio has joined #ocaml
Haudegen has quit [Ping timeout: 268 seconds]
brettgilio has quit [Quit: Quit]
brettgilio has joined #ocaml
mal`` has quit [Quit: Leaving]
mal`` has joined #ocaml
tormen_ has joined #ocaml
tormen has quit [Ping timeout: 268 seconds]
DabsR has joined #ocaml
DabsR has quit [Client Quit]
gravicappa has joined #ocaml
ggole has joined #ocaml
_whitelogger has joined #ocaml
_whitelogger has joined #ocaml
dborisog has joined #ocaml
kleisli has quit [Ping timeout: 260 seconds]
_whitelogger has joined #ocaml
sagax has joined #ocaml
kleisli has joined #ocaml
_whitelogger has joined #ocaml
_whitelogger has joined #ocaml
bartholin has quit [Quit: Leaving]
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
domovoy_ has quit [Quit: Leaving]
kleisli has quit [Ping timeout: 265 seconds]
kakadu_ has joined #ocaml
kakadu__ has joined #ocaml
kakadu_ has quit [Ping timeout: 260 seconds]
Guest68587 has quit [Quit: Bye bye ✋]
crowley95 has joined #ocaml
kakadu_ has joined #ocaml
kakadu__ has quit [Ping timeout: 260 seconds]
jao has joined #ocaml
tane has joined #ocaml
ygrek has joined #ocaml
kakadu_ has quit [Ping timeout: 258 seconds]
kakadu__ has joined #ocaml
kakadu_ has joined #ocaml
kakadu__ has quit [Ping timeout: 268 seconds]
ygrek has quit [Ping timeout: 268 seconds]
Haudegen has joined #ocaml
TheRuralJuror has joined #ocaml
TheRuralJuror has quit [Client Quit]
dborisog has quit [Ping timeout: 260 seconds]
_whitelogger has joined #ocaml
_whitelogger has joined #ocaml
ygrek has joined #ocaml
luna_is_here has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 260 seconds]
dborisog has joined #ocaml
kakadu__ has joined #ocaml
kakadu_ has quit [Ping timeout: 265 seconds]
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
count3rmeasure has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
silver has joined #ocaml
silver has quit [Remote host closed the connection]
kakadu_ has joined #ocaml
kakadu__ has quit [Ping timeout: 258 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
<rwmjones>
anyone know if a menir (or ocamlyacc?) grammar can get the current line number? my ocamllex lexer is counting line numbers, but I don't know if I can get the lexbuf from the parser
<thizanne>
you can use $startpos and $endpos in your rules productions
<thizanne>
those have type Lexing.position, which is a record that includes line number
<rwmjones>
ah nice
<companion_cube>
just remember to update the lexbuf when you do meet a \n
<rwmjones>
works, thanks
<rwmjones>
yeah I have that code already
<rwmjones>
never really sure why lexers don't just do that automatically though, because in my lexer is a pita
<rwmjones>
*it is a
<rwmjones>
multi-line strings etc have to have special handling
<companion_cube>
I imagine one could have a different notion of newline?
<rwmjones>
I guess so, also "performance"
<companion_cube>
:D
domovoy has joined #ocaml
<domovoy>
hi
<domovoy>
http://paste.debian.net/1121981/ gives me about line 19: '{res with content = v}' 'This record expression is expected to have type t | The field content does not belong to type t' any idea why? (i have a type t defined, but how is it getting in this portion of code? it only manipulates 'type doc_declaration'
<domovoy>
ho, t also have a filed 'title'... maybe they are confused. how to solve that?
<Armael>
add a type annotation to "res" (the argument of the function)
<Armael>
let parse_doc (res: doc_declaration) k = ...
<domovoy>
yeah, just discovered that thanks
<domovoy>
but i'm not really pleased with that. guess i should create submodules for this kind of stuff, keep things clean
<Armael>
yeah it's generally better to avoid having several record types that share fields within the same scope
<Armael>
having submodules sounds good
<Armael>
(that share field names*)
bartholin has joined #ocaml
<domovoy>
i have quite a bunch of these 'parse this type' function (making a RAML parser), so i think it makes sense to create a submodule for each of those, so they have their own `type t` and `let parse ...`
<Armael>
yeah
ygrek has joined #ocaml
<domovoy>
i'm starting to like ocaml, at the begining i was quite lost with all those types and match and strange constructs, but when you start to understand how it works, it's quite fun :) and strong typing is a good thing
<Armael>
:)
jnavila has joined #ocaml
jnavila has quit [Ping timeout: 260 seconds]
jnavila has joined #ocaml
ziyourenxiang has quit [Ping timeout: 268 seconds]