@@ -11,10 +11,9 @@ module Idris.Package.Parser where
11import Idris.CmdOptions
11import Idris.CmdOptions
12import Idris.Imports
12import Idris.Imports
13import Idris.Package.Common
13import Idris.Package.Common
14−import Idris.Parser.Helpers (HasLastTokenSpan, IdrisInnerParser, MonadicParsing,
14+import Idris.Parser.Helpers (IdrisInnerParser, MonadicParsing, eol, iName,
15− eol, getLastTokenSpan, iName, identifier, isEol,
16− lchar, multiLineComment, packageName,
15+ identifier, isEol, lchar, multiLineComment,
17− parseErrorDoc, reserved, runparser,
16+ packageName, parseErrorDoc, reserved, runparser,
18 simpleWhiteSpace, singleLineComment)
17 simpleWhiteSpace, singleLineComment)
20import Control.Applicative
19import Control.Applicative
@@ -29,9 +28,6 @@ import qualified Text.Trifecta as P
30type PParser = StateT PkgDesc IdrisInnerParser
29type PParser = StateT PkgDesc IdrisInnerParser
32−instance HasLastTokenSpan PParser where
33− getLastTokenSpan = return Nothing
35#if MIN_VERSION_base(4,9,0)
31#if MIN_VERSION_base(4,9,0)
36instance {-# OVERLAPPING #-} P.DeltaParsing PParser where
32instance {-# OVERLAPPING #-} P.DeltaParsing PParser where
37 line = lift P.line
33 line = lift P.line
@@ -83,7 +79,7 @@ pPkgName = (either fail pure . pkgName =<< packageName) <?> "PkgName"
83-- | Parses a filename.
79-- | Parses a filename.
85-- | Treated for now as an identifier or a double-quoted string.
81-- | Treated for now as an identifier or a double-quoted string.
86−filename :: (MonadicParsing m, HasLastTokenSpan m) => m String
82+filename :: (MonadicParsing m) => m String
87filename = (do
83filename = (do
88 filename <- P.token $
84 filename <- P.token $
89 -- Treat a double-quoted string as a filename to support spaces.
85 -- Treat a double-quoted string as a filename to support spaces.