chenglou changed the topic of #reasonml to: http://facebook.github.io/reason/. Public channel logs at http://irclog.whitequark.org/reasonml
StyxAlso has joined #reasonml
struk|desk has joined #reasonml
rgrinberg has joined #reasonml
apache2_ has joined #reasonml
apache2 has quit [Remote host closed the connection]
seangrove has quit [Ping timeout: 260 seconds]
rgrinberg has quit [Ping timeout: 276 seconds]
seangrove has joined #reasonml
Sergio965 has joined #reasonml
<Sergio965> Hey all! I tried writing a simple variant type (type maybe 'a = | Some 'a | None) but I get "invalid module item".
<Sergio965> That's the only thing I have in the file. What am I missing?
<Sergio965> Oh, hmm.
<Sergio965> Nevermind. Looks like refmt is failing with "Fatal error: exception Not_found"
<Sergio965> Bummer. Guess there's no way to run rebuild without refmt?
<Sergio965> Oh, I see. refmt is everything.
<bsansouci> missing semi coloin?
<bsansouci> missing semi colon*
<Sergio965> Weird. I removed the #0.0.6 from the pinning and it seemed to work.
<Sergio965> (Rather, it works)
<bsansouci> type maybe 'a = | Some of 'a | None
<bsansouci> Need an `of` keyword ^
<Sergio965> Not in Reason though, right?...
<schmave> Originally it needed of, even in reason, not sure if they fixed that in a more recent version
<Sergio965> Seems to work okay.
<schmave> Looks like they might have finally pushed the change on June 8th, so in master but not released yet https://github.com/facebook/reason/commit/20ac378109a61cf7f42f22bcb5e8b62fc4ec2278
<Sergio965> Ah..I see.
<Sergio965> That would explain exactly what I saw, then.
<Sergio965> The docs should say something about this....
<Sergio965> Is there no let _ in _ in reason?
<bsansouci> The docs correspond to master... The opam version is still 0.0.6
<bsansouci> Nope, semi colons at the end instead of "in"
<Sergio965> I mean, when I want to bind a variable only inside a scope.
<Sergio965> I need to do { let _ ; ... }?
<bsansouci> What do you mean inside a scope?
<bsansouci> what ocaml code do you want?
<Sergio965> So, I'm trying to do: print_string switch x { ... }, but this doesn't work. I have to do print_string (switch x { ... }).
<Sergio965> I thought maybe doing: let s = switch x { ... } in print_string s would work, but it doesn't.
<bsansouci> you do need parens to help indicate precedence. If you want to bind the return of the switch only to be used by the print_string right under and nothing else, you can nest them in curly braces
<bsansouci> `{
<bsansouci> let s = switch x { ... };
<bsansouci> print_string s;
<bsansouci> };`
<Sergio965> But isn't `switch` a keyword?
<Sergio965> Should `switch ...` all be a single unit?
<bsansouci> ¯\_(ツ)_/¯
<Sergio965> Haha
<Sergio965> Alrighty. :)
<chenglou> this should help big time
chenglou changed the topic of #reasonml to: facebook.github.io/reason/. Public channel logs at irclog.whitequark.org/reasonml. github.com/facebook/reason/wiki/Newcomer-Tips-&-Tricks
copy` has quit [Quit: Connection closed for inactivity]
StyxAlso has quit [Quit: StyxAlso]
Algebr` has joined #reasonml
rgrinberg has joined #reasonml
Algebr` has quit [Ping timeout: 250 seconds]
copy` has joined #reasonml
Algebr` has joined #reasonml
Algebr` has quit [Ping timeout: 250 seconds]
rgrinberg has quit [Ping timeout: 250 seconds]
Algebr` has joined #reasonml
rgrinberg has joined #reasonml
seangrove has quit [Ping timeout: 240 seconds]
Algebr` has quit [Remote host closed the connection]
seangrove has joined #reasonml
rgrinberg has quit [Ping timeout: 252 seconds]
grandy____ has joined #reasonml
<grandy____> hello, just curios how close reason is to being something I could use for a simple react app ?
<grandy____> (or is it perhaps something I could use now by targeting js) ...
<bsansouci> grandy____: hey!
<grandy____> hello!
<bsansouci> I think a lot of stuff needs to be figured out... i.e.: there is only one exploration that I know of: https://github.com/fxfactorial/ocaml-reactjs
<grandy____> bsansouci: ahh ok, cool...
<grandy____> bsansouci: going to be keeping an eye on reason, as it appears to be addressing most of the things I want :)
<bsansouci> What are the things you want? :D
<grandy____> bsansouci: the ability to target js and native platforms, and all the type system / functional stuff from ocaml .. using flow + immutable.js + invariant is cool but it feels heavy compared to something like reason
<bsansouci> Do you use react native right now?
<grandy____> bsansouci: yep
<Sergio965> Are there API docs somewhere?
<Sergio965> Or is there nothing added to the OCaml stdlibs?
<bsansouci> Nothing's added so far from what I know, you can use the normal stdlib
rgrinberg has joined #reasonml
kentwilliam has joined #reasonml
kentwilliam has quit [Remote host closed the connection]
kentwilliam has joined #reasonml
kentwilliam has quit [Remote host closed the connection]
kentwilliam has joined #reasonml
kentwilliam has quit [Remote host closed the connection]
kentwilliam has joined #reasonml
rgrinberg has quit [Ping timeout: 244 seconds]
kentwilliam has quit [Remote host closed the connection]
kentwilliam has joined #reasonml
Algebr` has joined #reasonml
Algebr` has quit [Ping timeout: 250 seconds]
kentwilliam has quit [Remote host closed the connection]