<p>Certainly the dependent contract approach will work, but the 'Real -> Real' contract is also safe, so I'll see about generating that.</p>
<p>Sam</p>
<div class="gmail_quote">On Jun 26, 2012 8:37 PM, "Robby Findler" <<a href="mailto:robby@eecs.northwestern.edu">robby@eecs.northwestern.edu</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
In this case, the contract could turn into a dependent one with the<br>
same semantics. Does it make sense for TR to allow a user to declare<br>
the equivalent contract?<br>
<br>
Robby<br>
<br>
On Tue, Jun 26, 2012 at 7:17 PM, Neil Toronto <<a href="mailto:neil.toronto@gmail.com">neil.toronto@gmail.com</a>> wrote:<br>
> Ten minutes in, I've hit a snag. I'd like the stuff in math/functions to<br>
> have precise types. For example, log1p could have the type<br>
><br>
> (case-> (Zero -> Zero)<br>
> (Float -> Float)<br>
> (Real -> Real))<br>
><br>
> It was easy to get the implementation to typecheck, but when I tried to plot<br>
> it in untyped Racket, I got this:<br>
><br>
> Type Checker: The type of log1p cannot be converted to a contract in: log1p<br>
><br>
> I really don't want to have two versions of the library. Could TR use the<br>
> most general type (Real -> Real) as the contract? Or would that be unsound?<br>
><br>
> Neil ⊥<br>
> _________________________<br>
> Racket Developers list:<br>
> <a href="http://lists.racket-lang.org/dev" target="_blank">http://lists.racket-lang.org/dev</a><br>
<br>
_________________________<br>
Racket Developers list:<br>
<a href="http://lists.racket-lang.org/dev" target="_blank">http://lists.racket-lang.org/dev</a><br>
</blockquote></div>