sharing datatypes : best practice ?

Taesch, Luc luc.taesch@csfb.com
Fri, 11 May 2001 09:56:37 +0200


do u isolate just the datatype, or a few related with, in a very small file (header like, i would say)
or some basic accessor function with it ?

isnt it leading to massiv quantities of small files ?



> -----Original Message-----
> From: Jan Kort [mailto:kort@science.uva.nl]
> Sent: Donnerstag, 10. Mai 2001 16:36
> To: Taesch, Luc
> Cc: 'haskell@haskell.org'
> Subject: Re: sharing datatypes : best practice ?
> 
> 
> "Taesch, Luc" wrote:
> > 
> > i ve developped a datatype in a module P, and another 
> module will use it, and most probably a few others, and its 
> quite central to the apps Im building.
> > 
> > what is the best organisation ?
> > 
> > -import module P everywhere
> > - isolate this datatype in a module, which would be 
> imported everywhere ?(very "include like")
> > - merging the module around this datatype ?
> > 
> > this last option  is not a good option here as :
> > - this would be too big
> > - P is generated by Happy.
> 
> Hi Luc,
> Isolating the datatype in a module is what I always do.
> Only "Main.hs" calls the happy parser and just about
> every module uses the datatype, so it makes sense to
> separate them.
> 
>   Jan
> 

This message is for the named person's use only.  It may contain 
confidential, proprietary or legally privileged information.  No 
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please immediately delete it and all
copies of it from your system, destroy any hard copies of it and notify the
sender.  You must not, directly or indirectly, use, disclose, distribute, 
print, or copy any part of this message if you are not the intended 
recipient. CREDIT SUISSE GROUP and each of its subsidiaries each reserve
the right to monitor all e-mail communications through its networks.  Any
views expressed in this message are those of the individual sender, except
where the message states otherwise and the sender is authorised to state 
them to be the views of any such entity.
Unless otherwise stated, any pricing information given in this message is 
indicative only, is subject to change and does not constitute an offer to 
deal at any price quoted.
Any reference to the terms of executed transactions should be treated as 
preliminary only and subject to our formal written confirmation.