* [Caml-list] sig
@ 2011-10-07 16:57 Walter Cazzola
2011-10-07 17:00 ` Vincent Aravantinos
2011-10-07 20:46 ` Stefano Zacchiroli
0 siblings, 2 replies; 5+ messages in thread
From: Walter Cazzola @ 2011-10-07 16:57 UTC (permalink / raw)
To: OCaML Mailing List
Dear all,
sorry for being so dumb but I've still problems with types and the sig
syntax.
I'm trying to write a Graph ADT:
module type GraphADT =
sig
type 'a graph
val EmptyGraph : 'a graph
val AddNode : 'a * 'a graph -> 'a graph
end;;
but when I try to evaluate it I get:
Syntax error: 'end' expected, the highlighted 'sig' might be unmatched
pointing to the row inbetween type and the first val but I don't
understand why and how to solve it.
Any help is welcome as always
TIA
Walter
--
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] sig
2011-10-07 16:57 [Caml-list] sig Walter Cazzola
@ 2011-10-07 17:00 ` Vincent Aravantinos
2011-10-09 14:18 ` Walter Cazzola
2011-10-07 20:46 ` Stefano Zacchiroli
1 sibling, 1 reply; 5+ messages in thread
From: Vincent Aravantinos @ 2011-10-07 17:00 UTC (permalink / raw)
To: Walter Cazzola; +Cc: OCaML Mailing List
values should start with a low case char: EmptyGraph -> emptyGraph,
AddNode -> addNode
Le 7 oct. 11 à 12:57, Walter Cazzola a écrit :
> Dear all,
> sorry for being so dumb but I've still problems with types and the sig
> syntax.
>
> I'm trying to write a Graph ADT:
>
> module type GraphADT =
> sig
> type 'a graph
> val EmptyGraph : 'a graph
>
> val AddNode : 'a * 'a graph -> 'a graph
> end;;
>
> but when I try to evaluate it I get:
>
> Syntax error: 'end' expected, the highlighted 'sig' might be
> unmatched
>
> pointing to the row inbetween type and the first val but I don't
> understand why and how to solve it.
>
> Any help is welcome as always
>
> TIA
> Walter
> --
>
> --
> Caml-list mailing list. Subscription management and archives:
> https://sympa-roc.inria.fr/wws/info/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] sig
2011-10-07 17:00 ` Vincent Aravantinos
@ 2011-10-09 14:18 ` Walter Cazzola
0 siblings, 0 replies; 5+ messages in thread
From: Walter Cazzola @ 2011-10-09 14:18 UTC (permalink / raw)
To: Vincent Aravantinos; +Cc: OCaML Mailing List
[-- Attachment #1: Type: TEXT/PLAIN, Size: 556 bytes --]
On Fri, 7 Oct 2011, Vincent Aravantinos wrote:
> values should start with a low case char: EmptyGraph -> emptyGraph, AddNode
> -> addNode
what a silly thing, you are right, thank you
Walter
--
Walter Cazzola, PhD - Associate Professor, DICo, University of Milano
E-mail: cazzola@dico.unimi.it Ph.: +39 02 503 16300 Fax: +39 02 503 16253
· · · ---------------------------- · · · ---------------------------- · · ·
... recursive: adjective, see recursive ...
· · · ---------------------------- · · · ---------------------------- · · ·
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] sig
2011-10-07 16:57 [Caml-list] sig Walter Cazzola
2011-10-07 17:00 ` Vincent Aravantinos
@ 2011-10-07 20:46 ` Stefano Zacchiroli
2011-10-09 15:16 ` Walter Cazzola
1 sibling, 1 reply; 5+ messages in thread
From: Stefano Zacchiroli @ 2011-10-07 20:46 UTC (permalink / raw)
To: caml-list
On Fri, Oct 07, 2011 at 06:57:54PM +0200, Walter Cazzola wrote:
> Dear all, sorry for being so dumb but I've still problems with types
> and the sig syntax.
No problem, it's always nice to help new people discovering the mighty
OCaml :) As a heads-up, there is also a very helpful beginner's list,
documented in the trailer of every message posted to this list:
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
You might want to try it out as well.
Happy OCaml-ing!
Cheers.
--
Stefano Zacchiroli zack@{upsilon.cc,pps.jussieu.fr,debian.org} . o .
Maître de conférences ...... http://upsilon.cc/zack ...... . . o
Debian Project Leader ....... @zack on identi.ca ....... o o o
« the first rule of tautology club is the first rule of tautology club »
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] sig
2011-10-07 20:46 ` Stefano Zacchiroli
@ 2011-10-09 15:16 ` Walter Cazzola
0 siblings, 0 replies; 5+ messages in thread
From: Walter Cazzola @ 2011-10-09 15:16 UTC (permalink / raw)
To: Stefano Zacchiroli; +Cc: caml-list
[-- Attachment #1: Type: TEXT/PLAIN, Size: 765 bytes --]
On Fri, 7 Oct 2011, Stefano Zacchiroli wrote:
> On Fri, Oct 07, 2011 at 06:57:54PM +0200, Walter Cazzola wrote:
>> Dear all, sorry for being so dumb but I've still problems with types
>> and the sig syntax.
> No problem, it's always nice to help new people discovering the mighty
> OCaml :) As a heads-up, there is also a very helpful beginner's list,
> documented in the trailer of every message posted to this list:
>> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> You might want to try it out as well.
Indeed you are right, I will give it a try even if some of my questions
(see the message with subject «with clause») didn't find a solution in
this list and I'm quite sure they will not solved in the beginner list
as well.
Walter
--
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-10-09 15:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-07 16:57 [Caml-list] sig Walter Cazzola
2011-10-07 17:00 ` Vincent Aravantinos
2011-10-09 14:18 ` Walter Cazzola
2011-10-07 20:46 ` Stefano Zacchiroli
2011-10-09 15:16 ` Walter Cazzola
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox