Version française
Home     About     Download     Resources     Contact us    
Browse thread
Camlp4 question
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jacques Le Normand <rathereasy@g...>
Subject: Camlp4 question
Hello list,
how does one define type parameter syntax with camlp4?
right now I'm using:

  test:
    [[
       "mytype" ; options = OPT parameters  ; ident = a_LIDENT; "=" ; ctyp
-> (ident,atoms)
     ]];

  parameters:
    [
      ["(";params = comma_type_parameter;")" -> params]
    |
    [tp = type_parameter -> tp ]];

Is this the right way to do it or has parameters already been defined
elsewhere?

--Jacques L.