English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Phantom types: transparency vs rogue unification
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-06-25 (15:02)
From: Jacques Carette <carette@m...>
Subject: Re: [Caml-list] Phantom types: transparency vs rogue unification
How about leaving your type opaque but changing your implementation of 
parse to
        let parse s = Stringies.make (float_of_string s)
In my tests, this works as you intended.

Note that I would personally implement Stringies_IO a Functor over 
Stringies rather than having explicit dependencies.