title: Importing modules as a function, with string as input
body: <p>I want to make a function called 'load' which imports definitions of functions from another file. I know how to import modules, but in my program I want the definitions of the functions to change depending on which module is 'loaded' with this new function. Is there a way to do this? Is there a better way to write my program so that this is not necessary?</p>
  
  <p>I think it's type signature would look something like:
  load :: String -> IO ()
  where the string is the name of the module to be loaded (and the module is in the same directory).</p>
  
  <p>Edit: Thanks for all the replies. Most people agree that this is not the best way to do what I want. Instead, is there a way to declare a global variable from within an I/O program. That is, I want it so that if I type (function "thing") into a function of type String -> IO(), I can still type 'thing' into GHCi to get the value assigned to it... Any suggestions?</p>