mirror of
https://github.com/github/semantic.git
synced 2024-11-24 08:54:07 +03:00
Read some files in.
This commit is contained in:
parent
8e59553018
commit
58cffa4e4c
20
app/Main.hs
20
app/Main.hs
@ -7,8 +7,24 @@ import Syntax
|
|||||||
import Control.Comonad.Cofree
|
import Control.Comonad.Cofree
|
||||||
import Control.Monad.Free
|
import Control.Monad.Free
|
||||||
import Data.Map
|
import Data.Map
|
||||||
|
import Language.Haskell.Parser
|
||||||
|
import Language.Haskell.Syntax
|
||||||
|
import System.Environment
|
||||||
|
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
main = putStrLn "hello world"
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user