[Haskell-cafe] Re: Best practices for modular programming in Haskell

Keean Schupke k.schupke at imperial.ac.uk
Thu Mar 17 17:14:49 EST 2005


Yes. Its actually very easy once you get how instance resolution
occurs and how constraints work.

I have used this style to code a database interface, and am using the
OOHaskell style (which is related to this kind of stuff) for an application
server (was a SOAP server, but might migrate to the new WebServices
standards).
 
Infact there is only one real limitation, and that is you cannot
(easily) lift an arbitrary IO value to a type. (You can do this but there
must be a limit to the value).

This does seem solvable however - but not with the current ghc/hugs 
architecture.
To lift a value to a type the code depending on that type cannot be 
compiled/type-checked until the value is known. This would be ideally 
suited to
a JIT compiler.

    Keean.

Benjamin Pierce wrote:

>>Actually Haskell fully matches the module system of OCaml -- and then
>>adds some. Haskell provides both generative and applicative (recursive)
>>functors. The following two messages elucidate the correspondence
>>
>>http://www.haskell.org/pipermail/haskell/2004-August/014463.html
>>http://www.haskell.org/pipermail/haskell/2004-September/014515.html
>>    
>>
>
>Wow.
>
>Do people actually develop significant bodies of code in this style?
>
>   - Benjamin
>
>_______________________________________________
>Haskell-Cafe mailing list
>Haskell-Cafe at haskell.org
>http://www.haskell.org/mailman/listinfo/haskell-cafe
>  
>



More information about the Haskell-Cafe mailing list