Sam,<div><br></div><div>Is there a function in racket which will - given a name - display the function/variable signature in the REPL?</div><div><br></div><div>I am thinking about haskell prelude(REPL) that gives me the type signature when I enter :t &lt;func name&gt; in the repl?</div>
<div><br></div><div>With Thanks</div><div>Bikal<br><br><div class="gmail_quote">On Mon, Apr 30, 2012 at 1:48 PM, Sam Tobin-Hochstadt <span dir="ltr">&lt;<a href="mailto:samth@ccs.neu.edu" target="_blank">samth@ccs.neu.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Mon, Apr 30, 2012 at 12:51 AM, Bikal Gurung &lt;<a href="mailto:gbikal@gmail.com">gbikal@gmail.com</a>&gt; wrote:<br>

&gt; Hi All,<br>
&gt;<br>
&gt; I am investigating typed racket. I was wondering if someone could help with<br>
&gt; answering the questions below.<br>
&gt;<br>
&gt; 1) Can we mix/import modules written in untyped racket to a module that is<br>
&gt; used typed racket. I have experimented with a few modules using and they<br>
&gt; seem to work in general but not really sure about the mechanism that makes<br>
&gt; it work. How does racket make the untyped code and typed code work together<br>
&gt; if they do? Is this in a case by case basis, ie. module/library by library<br>
&gt; basis?<br>
<br>
</div>Yes, you can mix typed modules and untyped modules in the same<br>
program.  This is one of the most fundamental features of Typed<br>
Racket.  To use a typed module from an untyped module, just require it<br>
-- contracts are inserted automatically to check the operation.  To<br>
use an untyped module from a typed module, use `require/typed&#39; to<br>
specify the type.<br>
<div class="im"><br>
&gt; 2) What is the canonical racket paradigm? use typed racket or untyped<br>
&gt; racket? Or is this more an issue of a preference/style?<br>
<br>
</div>This is very much an issue of style.  I think there are a number of<br>
advantages of type systems for maintenance, optimization,<br>
documentation, and organization, so I encourage you to use Typed<br>
Racket.  However, if you use plain Racket, Typed Racket is designed to<br>
make it easy to switch, a module at a time, when you decide you want<br>
types.<br>
<div class="im"><br>
&gt; 3) Are typed racket programs faster than untyped ones? The documentation<br>
&gt; says so but I was wondering if there has been any benchmark or study being<br>
&gt; done on this topic.<br>
<br>
</div>Yes, Typed Racket has an optimizing compiler (by Vincent St-Amour)<br>
which uses the type information to make your program go faster.  You<br>
can see some benchmark results in our papers<br>
<a href="http://www.ccs.neu.edu/racket/pubs/padl12-stff.pdf" target="_blank">http://www.ccs.neu.edu/racket/pubs/padl12-stff.pdf</a> and<br>
<a href="http://www.ccs.neu.edu/racket/pubs/pldi11-thacff.pdf" target="_blank">http://www.ccs.neu.edu/racket/pubs/pldi11-thacff.pdf</a> .<br>
<div class="im"><br>
&gt; 4) Can typed racket module be used in the context of untyped racket module?<br>
<br>
</div>Yes, you can just `require` the typed module, and it should work.<br>
<div class="im"><br>
&gt; 5) Is there a Hindlye/Milner style type inferencing algorithm for typed<br>
&gt; racket being worked on?<br>
<br>
</div>The Typed Racket type system contains a number of features that go<br>
beyond what&#39;s supported in Hindley/Milner style type systems, and so<br>
we can&#39;t use that inference system.  Currently, Typed Racket uses<br>
local type inference to infer many of the types in your program, but<br>
we&#39;d like to infer more of them -- this is an ongoing area of<br>
research.  However, inferring all the types in the program, the way<br>
that ML and Haskell do, is not a goal of Typed Racket -- having type<br>
annotations there makes the program self-documenting and easier to<br>
understand, improves type error messages, and supports advanced type<br>
system features.<br>
<br>
Thanks for your interest in Typed Racket, and if you have any more<br>
questions, please ask.<br>
<span class="HOEnZb"><font color="#888888">--<br>
sam th<br>
<a href="mailto:samth@ccs.neu.edu">samth@ccs.neu.edu</a><br>
</font></span></blockquote></div><br></div>