Version française
Home     About     Download     Resources     Contact us    
Browse thread
How to expose sum type constructors to an interface
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Felix Dorner <felix_do@w...>
Subject: How to expose sum type constructors to an interface
Hi,

although this might really be a beginner´ s question I´ ll post it here 
and risk to be eaten by the big fish around here...

I am starting to learn ocaml and tonight´ s lesson is how to handle 
modules/interfaces. I come up with this:

In my implementation file module.ml I define: type aType = A | B
How I now need to expose this Type and its constructors to the 
interface  module.mli, because some of the functions declared in the 
interface take a parameter of type "aType". How can I do this?

Thanks for any help,
Felix