so we’re doing this assignment at Uni and i have a serious craving to do the assignment in haskell. Its a simulation of a stock trading engine. Situation is that we have data coming in from a csv and we wish to parse each record and process it in a certain way dependent on which market phase its allocated to. Justification for using haskell, is that i view the trading engine as heavy functional system.
I have had haskell experience before but only minor experience, never anything this big.
We were wanting to run a thread which would import the csvs into a queue of unprocessed orders and then have the main program access this queue for processing each order. However how could i achieve this? I know in C# i would just set up the class so it could access the CSVParser class that would hold the unprocessed queue. This also means that the import thread would be continuously running through all the market phases or until it finished importing the csv file.
Any guidance on how to achieve this would be great! (not looking for a fully typed script, just what things in haskell i would need to look at)
It’s not clear what you’re asking for.
forkIOfrom Control.Concurrent.Chanfrom Control.Concurrent.Chan. Other Control.Concurrent.* abstractions are available (there’s also the stm package if you find yourself needing something more heavy duty).