Version française
Home     About     Download     Resources     Contact us    
Browse thread
polymorphic variants, long form
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: luc.maranget@i...
Subject: Re: [Caml-list] polymorphic variants, long form
> What is the proper 'long name' of a polymorphic variant?
> module S = struct type a = [`Foo of int] end
> 
> How do I refer to `Foo without opening S?  Both S.`Foo and `S.Foo are 
> syntax errors.
> 
> Jacques

'Foo does the job, it does not refer to any previous type definition.

% ocaml
        Objective Caml version 3.11.0

# `Foo;;
- : [> `Foo ] = `Foo

-- Luc