adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.02.3 announced http://ocaml.org/releases/4.02.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
ollehar has quit [Quit: ollehar]
ncthom91 has joined #ocaml
larhat2 has quit [Ping timeout: 244 seconds]
larhat1 has joined #ocaml
KDr2 has quit [Quit: Leaving]
ggVGc has quit [Ping timeout: 240 seconds]
madroach has quit [Read error: Connection reset by peer]
ggVGc has joined #ocaml
ncthom91 has quit [Quit: Textual IRC Client: www.textualapp.com]
madroach has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
olibjerd has quit [Ping timeout: 246 seconds]
madroach has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
pacmann has quit [Remote host closed the connection]
madroach has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
rgrinberg has joined #ocaml
madroach has joined #ocaml
rgrinberg has quit [Ping timeout: 260 seconds]
madroach has quit [Read error: Connection reset by peer]
madroach has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
Muzer has quit [Ping timeout: 260 seconds]
madroach has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
orbifx has quit [Ping timeout: 250 seconds]
madroach has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
struk|desk has joined #ocaml
Muzer has joined #ocaml
FreeBirdLjj has joined #ocaml
madroach has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
jfntn has quit [Remote host closed the connection]
madroach has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
MercurialAlchemi has joined #ocaml
madroach has joined #ocaml
shinnya has quit [Ping timeout: 240 seconds]
madroach has quit [Read error: Connection reset by peer]
nullcatx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
madroach has joined #ocaml
<tobiasBora> Hello !
madroach has quit [Read error: Connection reset by peer]
<tobiasBora> What is the name of the types that begin with a ` ? For example `Ok, `Five 5... ?
<jmasseo> 'tag'?
madroach has joined #ocaml
<tobiasBora> I don't think... They are used a lot in Ocsigen for example.
<python476> variant ?
<python476> `https://realworldocaml.org/v1/en/html/variants.html` search Polymorphic Variant
MercurialAlchemi has quit [Ping timeout: 272 seconds]
nullcatxxx_ has joined #ocaml
struktured has joined #ocaml
madroach has joined #ocaml
__uu__ has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
madroach has joined #ocaml
Algebr has joined #ocaml
madroach has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
madroach has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
madroach has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
madroach has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
olibjerd has joined #ocaml
Algebr has quit [Ping timeout: 240 seconds]
madroach has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
rgrinberg has joined #ocaml
madroach has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
Denommus has quit [Ping timeout: 240 seconds]
madroach has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
teiresias has quit [Quit: leaving]
madroach has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
darkf has joined #ocaml
meiji11 has joined #ocaml
madroach has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
madroach has joined #ocaml
rgrinberg has quit [Ping timeout: 250 seconds]
olibjerd has quit [Ping timeout: 268 seconds]
rgrinberg has joined #ocaml
madroach has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
raazdaan has joined #ocaml
raazdaan has quit [Client Quit]
huza has joined #ocaml
rgrinberg has quit [Ping timeout: 246 seconds]
tmtwd has quit [Remote host closed the connection]
tmtwd has joined #ocaml
rgrinberg has joined #ocaml
MercurialAlchemi has joined #ocaml
Mercuria1Alchemi has joined #ocaml
madroach has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
ygrek has joined #ocaml
madroach has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
huza has quit [Quit: WeeChat 0.3.8]
rgrinberg has quit [Ping timeout: 265 seconds]
madroach has joined #ocaml
madroach has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
Mercuria1Alchemi has quit [Ping timeout: 252 seconds]
madroach has joined #ocaml
meiji11 has quit [Ping timeout: 255 seconds]
madroach has joined #ocaml
mac10688 has quit [Ping timeout: 260 seconds]
madroach has quit [Read error: Connection reset by peer]
rossberg has quit [Ping timeout: 240 seconds]
madroach has joined #ocaml
slimane has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
rossberg has joined #ocaml
madroach has joined #ocaml
Mercuria1Alchemi has joined #ocaml
rgrinberg has joined #ocaml
Kakadu has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #ocaml
rgrinberg has quit [Ping timeout: 246 seconds]
demonimin has quit [Remote host closed the connection]
demonimin has joined #ocaml
madroach has joined #ocaml
Mercuria1Alchemi has quit [Ping timeout: 255 seconds]
MercurialAlchemi has quit [Ping timeout: 272 seconds]
Lis has quit [Read error: Connection reset by peer]
stux|RC-only has quit [Ping timeout: 250 seconds]
stux|RC-only has joined #ocaml
tmtwd has quit [Ping timeout: 264 seconds]
rgrinberg has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rgrinberg has quit [Ping timeout: 250 seconds]
MercurialAlchemi has joined #ocaml
shinnya has joined #ocaml
kushal has joined #ocaml
orbifx has joined #ocaml
Haudegen has quit [Ping timeout: 256 seconds]
kushal has quit [Ping timeout: 250 seconds]
zpe has joined #ocaml
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
masse is now known as MasseR
orbifx has quit [Ping timeout: 272 seconds]
Haudegen has joined #ocaml
python476 has quit [Ping timeout: 246 seconds]
kushal has joined #ocaml
octachron has joined #ocaml
ely-se has joined #ocaml
olibjerd has joined #ocaml
demonimin has quit [Ping timeout: 250 seconds]
demonimin has joined #ocaml
demonimin has quit [Excess Flood]
demonimin has joined #ocaml
demonimin has quit [Ping timeout: 246 seconds]
demonimin has joined #ocaml
MercurialAlchemi has quit [Remote host closed the connection]
mort___ has joined #ocaml
larhat1 has quit [Read error: Connection reset by peer]
larhat2 has joined #ocaml
<zozozo> tobiasBora: they are called polymorphic Variants indeed
<companion_cube> o.;
<companion_cube> o/
AltGr has joined #ocaml
ygrek has quit [Ping timeout: 252 seconds]
larhat2 has quit [Quit: Leaving.]
sepp2k has joined #ocaml
orbifx has joined #ocaml
kushal has quit [Quit: Leaving]
orbifx has quit [Quit: AtomicIRC: The nuclear option.]
orbifx has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 260 seconds]
rand_ has joined #ocaml
sepp2k has quit [Quit: Leaving.]
MercurialAlchemi has joined #ocaml
teiresias has joined #ocaml
sepp2k has joined #ocaml
charpi` has joined #ocaml
charpi has quit [Ping timeout: 256 seconds]
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 260 seconds]
slimane has quit [Quit: Bye]
FreeBird_ has quit [Ping timeout: 250 seconds]
slimane has joined #ocaml
jwatzman|work has joined #ocaml
kushal has joined #ocaml
freehck has joined #ocaml
AltGr has left #ocaml [#ocaml]
BitPuffin|osx has quit [Ping timeout: 260 seconds]
struktured has quit [Ping timeout: 260 seconds]
emias has quit [Quit: Bye]
emias has joined #ocaml
toolslive has joined #ocaml
troydm has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
jwatzman|work has joined #ocaml
superboum has joined #ocaml
libertas has joined #ocaml
rand_ has quit [Ping timeout: 260 seconds]
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 240 seconds]
superboum has quit [Quit: superboum]
superboum has joined #ocaml
uggwar has joined #ocaml
freehck` has joined #ocaml
freehck has quit [Ping timeout: 240 seconds]
ollehar has joined #ocaml
pacmann has joined #ocaml
superboum has quit [Quit: superboum]
superboum has joined #ocaml
ollehar has quit [Ping timeout: 260 seconds]
Guest99686 is now known as micro_
rgrinberg has joined #ocaml
BitPuffin has joined #ocaml
ollehar has joined #ocaml
tmtwd has joined #ocaml
ollehar has quit [Ping timeout: 250 seconds]
kushal has quit [Quit: Leaving]
<tobiasBora> Thank you zozozo and python476 !
dlancar has joined #ocaml
dlancar is now known as mantal
olibjerd has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
ely-se has quit [Quit: leaving]
ely-se has joined #ocaml
rgrinberg has quit [Ping timeout: 265 seconds]
ollehar has joined #ocaml
rgrinberg has joined #ocaml
ivan\ has quit [Ping timeout: 246 seconds]
kushal has joined #ocaml
ivan\ has joined #ocaml
Haudegen has quit [Ping timeout: 255 seconds]
kushal has quit [Quit: Leaving]
kushal has joined #ocaml
<pacmann> Is there a simpler way to achieve this? http://pastebin.com/FhVaAcWu
<pacmann> If raise an exception then return false, else return true
<dmbaturin> let foo = try ignore @@ <expr>; true with _ -> false
<octachron> you can also pattern match on exception for ocaml ≥ 4.02
<pacmann> How do you pattern match on exception?
Haudegen has joined #ocaml
kakadu_ has joined #ocaml
<octachron> let f x = match x with exception Not_found -> true | _ -> false;;
superboum has quit [Quit: superboum]
<pacmann> Thank you
shinnya has quit [Ping timeout: 255 seconds]
superboum has joined #ocaml
ollehar has quit [Remote host closed the connection]
rand has joined #ocaml
ggole has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 272 seconds]
rand has quit [Quit: leaving]
NingaLeaf has joined #ocaml
jeffmo has joined #ocaml
flx_ has joined #ocaml
<ely-se> No problem!
flxx has joined #ocaml
j14159_ has joined #ocaml
S11001001_ has joined #ocaml
Enjolras_ has joined #ocaml
ely-se has quit [Quit: leaving]
damason_afk has joined #ocaml
kakadu_ has quit [Quit: Konversation terminated!]
toolslive has quit [*.net *.split]
sepp2k has quit [*.net *.split]
orbifx has quit [*.net *.split]
MasseR has quit [*.net *.split]
iZsh has quit [*.net *.split]
lopex has quit [*.net *.split]
j14159 has quit [*.net *.split]
damason has quit [*.net *.split]
jave has quit [*.net *.split]
tautologico has quit [*.net *.split]
jyc has quit [*.net *.split]
mariusae has quit [*.net *.split]
strmpnk has quit [*.net *.split]
baum has quit [*.net *.split]
rom1504 has quit [*.net *.split]
Leonidas has quit [*.net *.split]
mietek has quit [*.net *.split]
bbc has quit [*.net *.split]
flx has quit [*.net *.split]
bitbckt has quit [*.net *.split]
flux has quit [*.net *.split]
S11001001 has quit [*.net *.split]
Snark has quit [*.net *.split]
Enjolras has quit [*.net *.split]
flx_ is now known as flux
j14159_ is now known as j14159
sepp2k has joined #ocaml
baum has joined #ocaml
jave has joined #ocaml
bitbckt has joined #ocaml
iZsh has joined #ocaml
Snark has joined #ocaml
mantal has quit [Ping timeout: 268 seconds]
S11001001_ is now known as S11001001
jeffmo_ has joined #ocaml
jeffmo has quit [Ping timeout: 244 seconds]
jeffmo_ is now known as jeffmo
MasseR has joined #ocaml
Leonidas has joined #ocaml
lopex has joined #ocaml
<Leonidas> pattern matching with exceptions is so incredibly convenient, best thing since pattern matching itself.
orbifx has joined #ocaml
mariusae has joined #ocaml
paddymahoney has joined #ocaml
<pacmann> I noticed that You can't do something like: match expression with exception MyException | 0 -> false | _ -> true
<pacmann> You need to leave the exception pattern alone
strmpnk has joined #ocaml
<edwin> would exception _ work?
<pacmann> Yes
<sgeisenh> pacmann: somewhat of a tangent - you can match over expressions with type exn
<ggole> exception _ has to be at top level like any other exception match
jyc has joined #ocaml
<pacmann> I mean this http://pastebin.com/rQU6JJeH
paddymahoney has quit [Remote host closed the connection]
tautologico has joined #ocaml
paddymahoney has joined #ocaml
rom1504 has joined #ocaml
<ggole> Ah, yeah
toolslive has joined #ocaml
octachron has quit [Quit: Leaving]
mietek has joined #ocaml
MercurialAlchemi has joined #ocaml
slash^ has joined #ocaml
nullcatxxx_ has joined #ocaml
rand has joined #ocaml
homieomorphism has joined #ocaml
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tane has joined #ocaml
tane has quit [Client Quit]
nullcatxxx_ has joined #ocaml
tane has joined #ocaml
superboum has quit [Quit: superboum]
superboum has joined #ocaml
lostman has joined #ocaml
kay-slimane has joined #ocaml
qdwang2 has joined #ocaml
SHODAN has joined #ocaml
slimane has quit [Ping timeout: 260 seconds]
k1000 has quit [Ping timeout: 250 seconds]
qdwang2 has quit [Ping timeout: 260 seconds]
zpe has quit [Remote host closed the connection]
qdwang has joined #ocaml
qdwang has quit [Client Quit]
qdwang has joined #ocaml
qdwang has quit [Client Quit]
superboum has quit [Ping timeout: 240 seconds]
jwatzman|work has quit [Quit: jwatzman|work]
homieomorphism has quit [Quit: Textual IRC Client: www.textualapp.com]
k1000 has joined #ocaml
sepp2k has quit [Quit: Leaving.]
superboum has joined #ocaml
malex has joined #ocaml
<malex> Hi, what changed in 4.02 from 4.01 to case the ocamlbuild error "Error: This expression has type Lexing.lexbuf but an expression was expected of type Ocamlbuild_pack.Loc.source = string" ? Full paste http://paste.ofcode.org/TnQ5nkm8b548YMx53sJDyB
jonludlam has joined #ocaml
mort___ has quit [Ping timeout: 246 seconds]
<def`> what if you comment line 24?
<def`> (but keep line 25)
<malex> File "myocamlbuild.ml", line 67, characters 11-29:
<malex> Error: This expression has type Lexing.lexbuf -> string list but an expression was expected of type string list
<malex> 67 end (find_packages ())
<malex> doesn't make sense
<def`> I d say it's a problem with associativity of &
mal`` has quit [Ping timeout: 240 seconds]
<def`> try with explicit parens (and uncommenting line 24)
<malex> Where should the explicit parentheses be?
<def`> blank_sep_strings (Lexing.from_string (run ...))
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<malex> Thanks, but it produces the same "Error: This expression has type Lexing.lexbuf..." error
jonludlam has quit [Ping timeout: 246 seconds]
<def`> ok I was wrong sorry
<malex> I pretty much just encountered ocaml for the first time, trying to build software that depends on some ocaml modules, so not sure what's going on.
python476 has joined #ocaml
<def`> could you upload the file somewhere?
<malex> https://github.com/mwells/ocaml-cgi/issues/5 is the only thing I found
superboum has quit [Ping timeout: 268 seconds]
<def`> don't worry it is something simple but hard to tell out of context
<malex> I installed ocaml 4.02.3 + opam and 'opam install'ed all dependencies.
nullcatxxx_ has joined #ocaml
jwatzman|work has joined #ocaml
<def`> malex: blank_sep_strings takes the name of the file as an argument
<def`> for producing error messages
<def`> blank_sep_strings "<ocamlfind list | cut -d' ' -f1>" &
<def`> or blank_sep_strings "<shell>" &
<def`> it's only for informational purposes
^elyse^ has joined #ocaml
<malex> def`: Thank you! The build is going now.
<def`> good :)
bbc has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
orbifx has quit [Ping timeout: 246 seconds]
darkf has quit [Quit: Leaving]
zpe has joined #ocaml
Haudegen has quit [Ping timeout: 246 seconds]
zpe has quit [Ping timeout: 268 seconds]
k1000 has quit [Ping timeout: 244 seconds]
superboum has joined #ocaml
k1000 has joined #ocaml
Haudegen has joined #ocaml
tane has quit [Quit: Verlassend]
kdas_ has joined #ocaml
kdas_ has quit [Read error: Connection reset by peer]
kushal has quit [Ping timeout: 250 seconds]
k1000 has quit [Ping timeout: 265 seconds]
superboum has quit [Ping timeout: 250 seconds]
ygrek has joined #ocaml
jeffmo has quit [Ping timeout: 250 seconds]
rand has quit [Ping timeout: 268 seconds]
jgjl has joined #ocaml
BitPuffin has quit [Ping timeout: 246 seconds]
k1000 has joined #ocaml
paddymahoney has quit [Ping timeout: 240 seconds]
Kakadu has quit [Quit: Page closed]
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jeffmo has joined #ocaml
larhat1 has joined #ocaml
nullcatxxx_ has joined #ocaml
shinnya has joined #ocaml
jeffmo has quit [Ping timeout: 268 seconds]
ggole has quit []
jeffmo has joined #ocaml
freehck` has quit [Ping timeout: 240 seconds]
jabesed has joined #ocaml
orbifx has joined #ocaml
rbocquet has quit [Quit: WeeChat 1.1.1]
jabesed has quit [Ping timeout: 246 seconds]
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
orbifx has quit [Ping timeout: 244 seconds]
j0sh has joined #ocaml
<j0sh> is there any way to "exclude" a particular (G)ADT branch when doing pattern matching, short of adding phantom type annotations to every branch?
Kakadu has joined #ocaml
<Drup> define "exclude"
<j0sh> suppose i have a few branches in a GADT but i only want to match on some subset of the branch
<Drup> and what do you want to do in the other cases ?
<j0sh> i've been doing this by adding an extra phantom parameter to the type but that's pretty inflexible, especially if i want to add special cases/'tags' for various branches
<j0sh> Drup: what do i want to do in other cases... nothing i guess? the intention is that the data should never have that "shape", eg gets rejected by the compiler
<Drup> ok, so you don't have the choice than to somehow encode that constraint into the type
<Drup> how to do that depends a lot of the actual application, adding an extra phantom parameter is a rather common solution.
<j0sh> i don't really have a problem with encoding the constraint via phantom types (even though it sort of ends up 'polluting' the rest of the ADT)
<j0sh> the real problem is if two (or more) branches have different phantom type constraints then it becomes really cumbersome to specify the allowed types
orbifx has joined #ocaml
<Drup> Yes.
orbifx2 has joined #ocaml
<j0sh> so, no solution to that? :) (is there a name/label/theory or something for this class of problems?)
<Drup> j0sh: if you give details, maybe, but right now your problem is far too abstract
<j0sh> haven't had much luck in googling possible approaches, partially because i'm not 100% sure what terms could be useful (eg, "define 'exclude'")
englishm has joined #ocaml
<j0sh> Drup: yeah, fair enough
<Drup> well, it's just basic gadt stuff, really
<j0sh> so concretely i'm trying to model SQL, specificially the WHERE and HAVING clauses... they are identical except that HAVING allows filtering by the result of aggregate functions (count, sum, etc)
orbifx has quit [Ping timeout: 260 seconds]
<j0sh> so in the case of an aggregate type being specified, I want the whole branch to be marked as "aggregate" or something so it cant be used in a WHERE clause
<Drup> yeah, you're good for an extra type variable.
<j0sh> i should think some more about how to model it with non-gadts, that would prob end up being more straightforward
<Drup> (you know about macaque, do you ?)
<j0sh> i've heard of it but havent really looked into it
* j0sh checks macaque out
kay-slimane has quit [Quit: Bye]
slash^ has quit [Read error: Connection reset by peer]
mort___ has joined #ocaml
tmtwd has quit [Ping timeout: 272 seconds]
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gsingh93_ has joined #ocaml
zpe has joined #ocaml
larhat2 has joined #ocaml
larhat1 has quit [Read error: Connection reset by peer]
Mercuria1Alchemi has joined #ocaml
ncthom91 has joined #ocaml
larhat1 has joined #ocaml
larhat2 has quit [Read error: Connection reset by peer]
Mercuria1Alchemi has quit [Remote host closed the connection]
lostman has quit [Quit: Connection closed for inactivity]
rand has joined #ocaml
Mercuria1Alchemi has joined #ocaml
ygrek has quit [Ping timeout: 268 seconds]
stormogulen has joined #ocaml
Mercuria1Alchemi has quit [Ping timeout: 272 seconds]
mort___ has quit [Quit: Leaving.]
MercurialAlchemi has quit [Ping timeout: 244 seconds]
lobo has joined #ocaml
^elyse^ has quit [Quit: Leaving]
stormogulen has left #ocaml ["ERC (IRC client for Emacs 24.5.1)"]
jonludlam has joined #ocaml
mal`` has joined #ocaml
ygrek has joined #ocaml
zpe has quit [Remote host closed the connection]
ollehar has joined #ocaml
nullcatxxx_ has joined #ocaml
tane has joined #ocaml
swgillespie has joined #ocaml
nullcatxxx_ has quit [Ping timeout: 244 seconds]
pyx has joined #ocaml
pyx has quit [Client Quit]
tane has quit [Quit: Verlassend]
englishm has quit [Read error: Connection reset by peer]
ollehar has quit [Quit: ollehar]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mac10688 has joined #ocaml
vpm has quit [Quit: co'o]
orbifx2 has quit [Read error: Connection reset by peer]
vpm has joined #ocaml
Kakadu has quit [Remote host closed the connection]
gsingh93_ has quit [Quit: Connection closed for inactivity]
lobo has quit [Quit: sleep]
rgrinberg has quit [Ping timeout: 240 seconds]
rand has quit [Quit: leaving]
nullcatxxx_ has joined #ocaml