main :: IO ()
main = do
    opt <- parseArgs
    input <- B.readFile "linker"
    case opt of
        StartGui -> do
            static <- getStaticDir
            startGUI defaultConfig {tpStatic=Just static} setup
        _ -> case ELF.parse ELF.parseFile input of
                Right value ->
                    case opt of
                        GetProgramHeader -> putStrLn $ show (ELF.programHeaders value) 
                        GetSectionHeader -> putStrLn $ show (ELF.sectionHeaders value) 
                        GetHeader -> putStrLn $ show (ELF.header value) 
                        GetSections -> putStrLn $ show (ELF.sections value)
                Left d -> putStrLn d

{--
 - Make an element draggable
 --}
main :: IO ()
main = do
    opt <- parseArgs
    input <- B.readFile "linker"
    case opt of
        StartGui -> do
            static <- getStaticDir
            startGUI defaultConfig {tpStatic=Just static} setup
        _ -> case ELF.parse ELF.parseFile input of
                Right value ->
                    case opt of
                        GetProgramHeader -> putStrLn $ show (ELF.programHeaders value) 
                        GetSectionHeader -> putStrLn $ show (ELF.sectionHeaders value) 
                        GetHeader -> putStrLn $ show (ELF.header value) 
                        GetSections -> putStrLn $ show (ELF.sections value)
                Left d -> putStrLn d

{--
 - Make an element draggable
 --}
main = do
    opt <- parseArgs
    input <- B.readFile "linker"
    case opt of
        StartGui -> do
            static <- getStaticDir
            startGUI defaultConfig {tpStatic=Just static} setup
        _ -> case ELF.parse ELF.parseFile input of
                Right value ->
                    case opt of
                        GetProgramHeader -> putStrLn $ show (ELF.programHeaders value) 
                        GetSectionHeader -> putStrLn $ show (ELF.sectionHeaders value) 
                        GetHeader -> putStrLn $ show (ELF.header value) 
                        GetSections -> putStrLn $ show (ELF.sections value)
                Left d -> putStrLn d

{--
 - Make an element draggable
 --}