// Idea here is to test the following property: // When a function is called recursively it has locally a monomorphic type. // Therefore the definition of cons does not work even if it works // with a proper type annotation. data Vec a = Nil | Zero (Vec (a,a)) | One a (Vec (a,a)) // cons :: a -> Vec a -> Vec a cons x Nil = One x Nil cons x (Zero ps) = One x ps cons x (One y ps) = Zero (cons (x, y) ps) -- 11:21-11:42: Expected got . 11:32-11:38: Expected got <(b, c)>. 11:39-11:41: Expected got .