Question - Point of Doctrine for typei

7 views
Skip to first unread message

Dan Haskin

unread,
Dec 14, 2011, 7:48:11 PM12/14/11
to byu-cs-330-Fall-2011
I know that the following:

(infer-type (parse '(fun (x) (bif (tempty? x) (tempty) (tcons (tfirst
x) (trest x)))) ) )

should resolve to something like this:

list(x) -> list(x)

But my question is, should the following:

(infer-type (parse '(x x)))

resolve to anything other than an "unbound identifier" error?

the same goes for something like

(infer-type (parse '(with (x y) (* x x)))) - should it resolve to (t-
num) or should it throw an error?

Jay McCarthy

unread,
Dec 14, 2011, 9:02:06 PM12/14/11
to byu-cs-330...@googlegroups.com
Both should error with an unbound identifier


--
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
Reply all
Reply to author
Forward
0 new messages