Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Beginner Question

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Beginner Question


Chronological Thread 
  • From: Jonathan <jonikelee AT gmail.com>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] Beginner Question
  • Date: Sat, 08 Nov 2014 19:34:40 -0500

On 11/08/2014 06:52 PM, Saulo Araujo wrote:
One more doubt. In the code below, the Coq compiler complains about the
lines with Some value. It says "The constructor Some expects 1 argument.".
When I change from Some value to Some v everything works fine. Is there
something special about "Some value"?

Fixpoint getValues objects name :=
match objects with
| object :: objects' =>
match getValue object name with
| Some value =>
match getValues objects' name with
| Some value' => Some (List.app value value')
| None => None
end
| None => None
end
| [] => Some []
end.



I would have to see the whole file prior to that definition to tell you what is going wrong. The use of "value" in a binding position, such as in that match statement, shouldn't be a problem - but it might be the case that Coq isn't inferring the types the way you expect, depending on what comes before getValues.

-- Jonathan





Archive powered by MHonArc 2.6.18.

Top of Page