You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
module Main where
|
|
|
|
|
|
|
|
|
|
import Lib
|
|
|
|
|
import QuoteSource.DDE
|
|
|
|
|
import QuoteSource.DataImport
|
|
|
|
|
import Control.Concurrent hiding (readChan)
|
|
|
|
|
import Control.Monad
|
|
|
|
|
import Control.Monad.IO.Class
|
|
|
|
|
import Data.IORef
|
|
|
|
|
import Graphics.UI.Gtk hiding (Action, backspace)
|
|
|
|
|
import Control.Concurrent.BoundedChan
|
|
|
|
|
import Data.ATrade
|
|
|
|
|
import QuoteSource.TableParsers.AllParamsTableParser
|
|
|
|
|
import QuoteSource.TableParser
|
|
|
|
|
|
|
|
|
|
callback :: DdeCallback
|
|
|
|
|
callback = undefined
|
|
|
|
|
|
|
|
|
|
main :: IO ()
|
|
|
|
|
main = do
|
|
|
|
|
chan <- newBoundedChan 1000
|
|
|
|
|
forkIO $ forever $ do
|
|
|
|
|
tick <- readChan chan
|
|
|
|
|
when (datatype tick == Price) $ print tick
|
|
|
|
|
dis <- initDataImportServer [MkTableParser $ mkAllParamsTableParser "allparams"] chan "atrade"
|
|
|
|
|
void initGUI
|
|
|
|
|
window <- windowNew
|
|
|
|
|
window `on` deleteEvent $ do
|
|
|
|
|
liftIO mainQuit
|
|
|
|
|
return False
|
|
|
|
|
widgetShowAll window
|
|
|
|
|
mainGUI
|
|
|
|
|
|