I have several data types in an IO context like:
a :: IO String
b :: IO FilePath
c :: String -> IO String
I want to put them all together in one data object like:
data Configdata = Configdata String FilePath (String -> String)
So I don't have to get each value for its own out of the IO context, but just out of IO Configdata
.
The critical point where I don't have a solution is how I can transform String -> IO String
to IO (String -> String)
.
Hoogle doesn't give me any functions which are capable of doing this.
I am not sure if it's maybe even not possible, since the input of the function is possibly infinite.
Does someone have a solution or an explanation why it's not possible? I know that using a list instead of a function is an option, but I would prefer using a function if possible.