haskell-src-exts support

This commit is contained in:
Niklas Broberg
2005-04-27 09:19:44 +00:00
parent 389c1ce711
commit deacb85627
2 changed files with 4 additions and 6 deletions

View File

@ -28,9 +28,7 @@ import Data.List
import Data.Char
import Data.Either
import Language.Haskell.Parser
import Language.Haskell.Syntax
import Language.Haskell.Pretty
import Language.Haskell.Hsx
--
-- | parse a file (as a string) as Haskell src
@ -40,7 +38,7 @@ parse :: FilePath -- ^ module name
-> Either String HsModule -- ^ abstract syntax
parse f fsrc =
case parseModuleWithMode (ParseMode f) fsrc of
case parseFileContentsWithMode (ParseMode f) fsrc of
ParseOk src -> Right src
ParseFailed loc _ -> Left $ srcmsg loc
where