[Haskell-cafe] create a type for selecting functions already in the module

Oterman-Fernandez, Ana-Maria Ana-Maria.Oterman-Fernandez at Rolls-Royce.com
Thu Feb 3 10:49:55 EST 2005


I have implemented a module with some functions and now I would like to create a type for selecting between this functions:

For example: if f1, f2,...fn are the names of the functions in the module, I need to do something like this:

data Consult = f1 | f2 |....| fn  

for applying them whenever the user wants.

but by this way is not possible.

Do you know how can I do this? Thank you!

Ana Maria

The data contained in, or attached to, this e-mail, may contain confidential information. If you have received it in error you should notify the sender immediately by reply e-mail, delete the message from your system and contact +44 (0) 1332 242424 (the Rolls-Royce IT Security Director) if you need assistance. Please do not copy it for any purpose, or disclose its contents to any other person.

An e-mail response to this address may be subject to interception or monitoring for operational reasons or for lawful business practices.

(c) 2005 Rolls-Royce plc

Registered office: 65 Buckingham Gate, London SW1E 6AT Company number: 1003142. Registered in England.

More information about the Haskell-Cafe mailing list