<Drup>
whitequark: right now, I'm very tempted to write a ppx that transforms "Lwt.return ()" (resp [], None, false, true) into Lwt.return_unit (resp ..) :D
<whitequark>
do it
<whitequark>
actually, just add it to ppx_lwt.
<Drup>
certainly not by default.
<Drup>
and I will call the option "silly little optimisation"
<whitequark>
I would say by default
<whitequark>
I see no issues that could come from that
<Drup>
I can't think of any scenario where it would bite you in the ass, but I'm sure it exists.
<whitequark>
I don't think it does
<Drup>
(I overloaded Lwt.return once, when writing the ppx for lwt, "Lwt.return" was emiting the relevant ast ...)
<Drup>
(but the ppx was not called on itself, so it's """safe""")
<whitequark>
...
<whitequark>
you've engineered your own demise, I would say
<Drup>
what, it was very clever ! :D
<Drup>
(I also did it for jsoo's ppx)
<whitequark>
holy crap, someone made a textmate snippet for *every stdlib function*
<whitequark>
... and the reason is, there is some hack in myocamlbuild to gather the dependencies, and it quietly broke, possibly when I upgraded OASIS to 0.4 from 0.3.
<whitequark>
I don't want to be alive
morphles has joined #ocaml
<whitequark>
... ocamlbuild extends the stdlib String?
SethTIsue has quit [Quit: SethTIsue]
PM has joined #ocaml
SethTIsue has joined #ocaml
boogie has joined #ocaml
ysz_ has quit [Remote host closed the connection]
waneck has quit [Ping timeout: 240 seconds]
SethTIsue has quit [Client Quit]
ysz_ has joined #ocaml
Hannibal_Smith has joined #ocaml
ollehar has quit [Ping timeout: 272 seconds]
badkins has quit [Remote host closed the connection]
zpe has quit [Remote host closed the connection]
rand000_ has quit [Ping timeout: 250 seconds]
manizzle has quit [Ping timeout: 260 seconds]
manizzle has joined #ocaml
ysz_ has quit [Remote host closed the connection]
fraggle-boate has quit [Remote host closed the connection]
manizzle has quit [Max SendQ exceeded]
manizzle has joined #ocaml
rand000 has joined #ocaml
demonimin_ is now known as demonimin
fraggle-boate has joined #ocaml
hcarty has joined #ocaml
<hcarty>
Has the handling of git tags changed in opam 1.2.0?
<hcarty>
I have a local repository with a package defined with a git URL (ssh://host:post/repo/#v0.1.0). This works under opam 1.1.0. Under 1.2.0rc4 I get "fatal: Couldn't find remote ref v0.1.0"
<hcarty>
"port" not "post"
hausdorff has joined #ocaml
eikke has quit [Ping timeout: 265 seconds]
bezirg has joined #ocaml
badkins has joined #ocaml
fraggle-boate has quit [Remote host closed the connection]
<thomasga>
does pack and module aliases are supposed to work well together?
ollehar has joined #ocaml
jonludlam has quit [Ping timeout: 240 seconds]
<thomasga>
hcarty: report on the bug tracker, looks like a regression ...
<_obad_>
actually I have a CLI that uses lambda-term, and the resulting binary has no dependencies, except that it insists on using the camomile unicode database
<whitequark>
this is a known problem with camomile.
<_obad_>
I guess I could ask the user to install their system's version of camomile
claudiuc has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
manizzle has quit [Ping timeout: 245 seconds]
sheijk has quit [Quit: .]
sepp2k has quit [Quit: Konversation terminated!]
thomasga has joined #ocaml
thomasga1 has joined #ocaml
jwatzman|work has joined #ocaml
thomasga has quit [Ping timeout: 260 seconds]
<pyon>
Can top-level modules (that is, modules that correspond to individual *.ml files) be mutually recursive?
<Drup>
no
<pyon>
Oh, well.
<mrvn>
you can lift the recursion
<mrvn>
or have a common file and then include each half of the recursive modules in the top-level files
<pyon>
Makes sense. :-)
hausdorff has quit [Remote host closed the connection]
<ggole>
I find that really annoying on occasion
hhugo has joined #ocaml
hausdorff has joined #ocaml
hausdorff has quit [Remote host closed the connection]
Anarchos has joined #ocaml
samrat has quit [Ping timeout: 245 seconds]
Thooms has joined #ocaml
Thooms has quit [Client Quit]
Thooms has joined #ocaml
oriba has joined #ocaml
samrat has joined #ocaml
BitPuffin has quit [Ping timeout: 258 seconds]
hausdorff has joined #ocaml
thomasga1 has quit [Quit: Leaving.]
thomasga has joined #ocaml
<ollehar>
if I want refined types, should I learn agda instead of coq?
panini has quit [Remote host closed the connection]
koderok has joined #ocaml
<Drup>
depends, do you want to do proofs or programs ?
koderok has quit [Remote host closed the connection]
kakadu has joined #ocaml
manizzle has joined #ocaml
pyon has quit [Quit: brb]
<Anarchos>
ollehar what is a refined type ?
ontologiae has joined #ocaml
Simn has quit [Quit: Leaving]
pyon has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
<ollehar>
Drup: programs
<ollehar>
Anarchos: where int is not only int, but maybe 0 < i < 10
<Anarchos>
ok
<Drup>
ollehar: then Agda, or Idris
<Drup>
(or Haskell ....)
thomasga has quit [Quit: Leaving.]
<Drup>
there is refinement framework in Haskell, but meh.
<mrvn>
ollehar: you can encode limits into phantom types
<Drup>
ahah mrvn, cute.
<Drup>
yeah, and you can count unary with types
<Drup>
don't do that.
<mrvn>
looks like someone puked but it works.
<ollehar>
mrvn: yeah, I know, have done it
xorpse has joined #ocaml
<mrvn>
Drup: you can count dezimal with phantom types too
<ollehar>
time to take the next step
<Drup>
ollehar: If you really want to experiment on programming with dependent types, I would say Idris. Just be aware that it is, indeed, experimental.
<ollehar>
hm
<ollehar>
OK
Bluddy has joined #ocaml
<Bluddy>
whitequark: any chance on supporting inline records in utop?
axiles has quit [Remote host closed the connection]
hhugo has quit [Quit: Leaving.]
sinelaw has joined #ocaml
<sinelaw>
hi. in: let x = []
<sinelaw>
what is the type of x?
<adrien>
'a list
<sinelaw>
oops.
<adrien>
rather
<sinelaw>
let x = ref []
<ggole>
'_a list
<ggole>
:)
<sinelaw>
is what I really meant.
<adrien>
'a list ref
<adrien>
as ggole said :)
<ggole>
Yeah, with a ref
<adrien>
"'_a list ref" then
<ggole>
The '_a means that the type variable can only every be one type
<sinelaw>
I know that the compiler ends up assigning an "unknown type" (not type variable) to x and later collapses it to a certain value. Is this what the _ indicates?
tnguyen has joined #ocaml
<ggole>
It's not polymorphic like let x = [] can be
hhugo has joined #ocaml
<ggole>
Yes.
<sinelaw>
right, value restriction.
hhugo has quit [Client Quit]
<ggole>
OCaml has a relaxed variant of the value restriction
<sinelaw>
so may actual question is, how is does this fit into hindley-milner
<sinelaw>
*how does
<sinelaw>
ggole, let's assume no relaxation
<sinelaw>
I'm trying to see how this can be implemented
<ggole>
Well
<sinelaw>
normally one associates variable names with type schemes
<sinelaw>
e.g. forall a. a list
<sinelaw>
so in this case it would just be: a list (no quantification)
<ggole>
Traditionally polymorphism is done by generalising, that is, creating type schemas for, let bound values, and instantiating the type schema (making the relevant type variables fresh) at each use of the variable.
<sinelaw>
yeah
<ggole>
If you simply don't make the type variables fresh, then you get essentially the '_a behaviour
<sinelaw>
but we do know the structure of the type at the time of the let binding
<sinelaw>
right?
<ggole>
Yep
<ggole>
You should be able to tell which variables to generalise and which not to at that point
<sinelaw>
ok. I'm trying to implement value restriction in another syntax and i'm kinda stuck because you have sepearate variable declaration and variable assignment
badkins has quit [Remote host closed the connection]
<sinelaw>
(not actually stuck, because there is an obvious ugly solution)
<sinelaw>
ggole, so when the variable is declared, nothing is known about it at all.
<ggole>
Hmm.
<ggole>
I guess you have to delay things until you do somehow.
<ggole>
That does sound a bit messy.
hausdorff has quit [Remote host closed the connection]
hhugo has joined #ocaml
<sinelaw>
yes.
<sinelaw>
ggole, I tried by assigning it a fresh type variable
<sinelaw>
that is wrong because it leaves it polymorphic
<ggole>
Yeah. You really need to wait until you see the term.
<sinelaw>
I mean i tried to assign it a quantified type schema
hausdorff has joined #ocaml
<ggole>
Is it like Java's assignment rules? You can do int x; if (cond()) { x = 1; } else { x = 2; }?
<sinelaw>
yes, but in java you have type ascriptions
<sinelaw>
so no problem.
<troydm>
any llvm binding experts here?
<troydm>
I have a slight problem with LLVM kaleidoscope tutorial
<ggole>
I think you'll need to walk the function collecting every initialising assignment, and then union their types... blurgh.
<sinelaw>
ggole, more like C#: var x; if ... x = 1 else x = 2
<sinelaw>
actually C# disallows that :)
<ggole>
Right, same issue there.
<sinelaw>
var decls are required to assign unambiguous values
<troydm>
namely this line of code refuses to compile with llvm 3.4 bindings DataLayout.add (ExecutionEngine.target_data the_execution_engine) the_fpm;
<ggole>
Anyway, I have to go: good luck with your problem o/
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
ggole has quit []
<troydm>
I've found that DataLayout.add function name changed to DataLayout.add_to_pass_manager
nicoo has quit [Remote host closed the connection]
<troydm>
however I can't find ExecutionEngine.target_data function nor it's changed equivalent
nicoo has joined #ocaml
ollehar has quit [Ping timeout: 240 seconds]
olauzon has quit [Ping timeout: 245 seconds]
olauzon has joined #ocaml
hhugo has quit [Read error: No route to host]
morphles has quit [Ping timeout: 260 seconds]
hhugo has joined #ocaml
manud has joined #ocaml
ollehar has joined #ocaml
olauzon has quit [Quit: olauzon]
olauzon has joined #ocaml
ontologiae has quit [Ping timeout: 244 seconds]
olauzon has quit [Quit: olauzon]
troydm has quit [Quit: What is hope? That all of your wishes and all of your dreams come true? (C) Rau Le Creuset]