On Thu, Aug 01, 2002 at 02:34:00PM -0700, Hal Daume III wrote: > ... > Now, I want in my executable my user to be able to say "-model=0" and so > on in the command line and for it to use the appropriate model. Each of > these models will go in a separate module. > > One way to do this would be to import all of the models qualified and then > if they choose Model0, pass to the "go" function Model0.prepareData, > Model0.initialize, etc. This is fine, simple, good. But it doesn't > enforce at all the types of the functions.
I don't understand what you mean by this. Surely the "go" function is polymorphic over the types in the model, but requires matching types? I don't think you can get Haskell to not "enforce at all the types of the functions". I must be missing something. --Dylan
msg11314/pgp00000.pgp
Description: PGP signature