Commit 775107b9 authored by md9ms's avatar md9ms
Browse files

Actually _use_ the parser in parsePackageDesc

parent e8784ced
......@@ -164,10 +164,13 @@ setOptions c xs desc@BuildInfo{options=opts}
notImp :: String -> a
notImp s = error $ s ++ " not yet implemented"
-- |Parse the given package file. FIX: don't use read / show.
-- |Parse the given package file.
parsePackageDesc :: FilePath -> IO PackageDescription
parsePackageDesc p
= openFile p ReadMode >>= hGetContents >>= return . read
parsePackageDesc p = do h <- openFile p ReadMode
str <- hGetContents h
case parseDescription str of
Left e -> error (show e) -- FIXME
Right x -> return x
data PError = Parsec ParseError | FromString String
deriving Show
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment