1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 17:04:47 +03:00
semantic/app/Main.hs
2015-11-24 13:23:18 -05:00

40 lines
922 B
Haskell

module Main where
import Diff
import Patch
import Term
import Syntax
import Control.Comonad.Cofree
import Control.Monad.Free
import Data.Map
import Data.Maybe
import Data.Set
import Language.Haskell.Parser
import Language.Haskell.Syntax
import System.Environment
import GHC.Generics
import Foreign
import Foreign.CStorable
import Foreign.C.Types
data TSLanguage = TsLanguage deriving (Show, Eq, Generic, CStorable)
foreign import ccall "prototype/doubt-difftool/doubt-difftool-Bridging-Header.h ts_language_c" ts_language_c :: IO (Foreign.Ptr TSLanguage)
main :: IO ()
main = do
args <- getArgs
let (a, b) = files args in do
a' <- parseModuleFile a
b' <- parseModuleFile b
return (a', b')
return ()
parseModuleFile :: FilePath -> IO (ParseResult HsModule)
parseModuleFile file = do
contents <- readFile file
return $ parseModule contents
files (a : as) = (a, file as) where
file (a : as) = a