haskell-src-exts support
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user