>>>>> "Hans" == Hans Aberg <[EMAIL PROTECTED]> writes:

    Hans> Speed may not be as crucial as for Hugs ...

It is a difficult question to tell what is fast enough or not.
Here, I like to mention three situations in writing Haskell
programs. Maybe, other people can tell about other situations.

(1) Usual case: 
    And this is the case that will benefit a lot from the new ghc.
    You are working on a module without changing the interface. 
    Thus, no other module must be recompiled. 20 seconds compilation
    time on a Ultra Sparc or on a PC would be acceptable, I think.
    Consider that a lot of trials may be necessary, e.g., because
    you have problems with the IO behavior (readFile,GUIs,etc.).

(2) Occurs quite regularly:
    You are adding a constructor to an algebraic data type in a module
    which is required by many others. However, the new constructor
    is only used in a single module. Nevertheless, you have to recompile
    a lot of modules. As long as you had hugs, you could test your
    changes before starting a long recompilation with ghc.
    Anyway, it would be good to encapsulate the basic data types 
    of your project such
    that their name can be imported without need to import their
    definition. In this case, access would be by special access
    functions and not directly by pattern matching. 
    (An inter-module optimizer could work on this overnight to
     replace access functions by pattern matching. This compiled version
     is incompatible with the other and only good for final use.) 
    Recompilation would be
    restricted to the module that contains the data type definitions and
    the access functions. I'm sorry if that's already possible
    or against some fundamental principles.

(3) Occurs sometime:
    You decided to replace data structure A, e.g., a list, that appears
    in many modules by data structure B which is more efficient, e.g., a
    tree. Unfortunately, you used a type synonym or an algebraic data
    type instead of an abstract data type. How can you do the change
    with hugs fast? Change the definition of A and correct every
    type error. Here, the use of an interpreter can be very powerful.
    On the other hand, GHC may give all type errors at once and with
    a higher precision.

-- 
 Christoph Herrmann
 E-mail:  [EMAIL PROTECTED]
 WWW:     http://brahms.fmi.uni-passau.de/cl/staff/herrmann.html



  
 

      

    
          






Reply via email to