Question: Hindley-Milner Algorithm Say I have the letters A, B representing type variables which are initially unbound and a,b,c representing type constructors. I need then to

Hindley-Milner Algorithm

Say I have the letters A, B representing type variables which are initially unbound and a,b,c representing type constructors. I need then to show the bindings of type variables obtained through unification (or explain why if it fails).

I'm given the following pair of types:

a(A,b(c)) and a(B,A) 

I have two questions:

1) What do they mean by type constructor? to me this; a(A,b(c)), looks like a is the type constructor here which is a function taking two parameters.

2) Can someone show me what approach they would take? I looked here to understand the concept: http://www.cs.cornell.edu/courses/cs3110/2011sp/Lectures/lec26-type-inference/type-inference.htm

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!