Re: type inference question

4 views
Skip to first unread message

Jay McCarthy

unread,
Dec 2, 2010, 5:50:56 PM12/2/10
to Jonathan Wilson, BYU CS 330 Fall 2010
On Thu, Dec 2, 2010 at 3:13 PM, Jonathan Wilson
<home.di...@gmail.com> wrote:
>
>> That is not in the syntax of the language
>
> How is it not in the syntax of the language?
>
>  [with (bound-id symbol?) (bound-body Expr?) (body Expr?)]
>
> The bound-body can be any Expr?, and the body can be any Expr?, so
>
> #t being the bound body, is an Expr?, and (bif x 0 1) is also an Expr?.

#t is not an expression nor it is it the valid syntax for an
expression. The syntax allows the SYMBOL 'true and the SYMBOL 'false
not the VALUE #t or the VALUE #f

Jay

>
> I'm just wondering how it isn't in the syntax of the language, when as far
> as I can tell, it clearly satisfies the rules of the language.
>

--
Jay McCarthy <j...@cs.byu.edu>
Assistant Professor / Brigham Young University
http://faculty.cs.byu.edu/~jay

"The glory of God is Intelligence" - D&C 93

Jay McCarthy

unread,
Dec 2, 2010, 6:10:42 PM12/2/10
to Jonathan Wilson, BYU CS 330 Fall 2010
It does make a difference because they "programs" are not programs so
no question about the behavior of your assignment can be answered
about them; i.e. each of those examples should _not_ "pass
unification".

Jay

On Thu, Dec 2, 2010 at 4:07 PM, Jonathan Wilson
<home.di...@gmail.com> wrote:
> But that makes no difference to the actual initial question. (with (x #f)
> (bif x 0 1)) or (with (x 'false) (bif x 0 1)).  Either way, the question is
> exactly the same. Luckily we figured out how to do the id's in the
> generator.

Reply all
Reply to author
Forward
0 new messages