1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 08:54:07 +03:00

Fix a couple of errors in the tests.

This commit is contained in:
Rob Rix 2019-09-26 13:40:22 -04:00
parent 94f6f8e29f
commit e5ef1e67ef
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7
2 changed files with 3 additions and 2 deletions

View File

@ -17,6 +17,7 @@ import qualified Data.ByteString.Char8 as BC
import qualified Data.ByteString.Lazy.Char8 as BLC
import qualified Data.ByteString.Streaming.Char8 as ByteStream
import Data.Either
import Data.Language (PerLanguageModes(..))
import Data.Set (Set)
import Data.Traversable
import Data.Typeable
@ -121,4 +122,4 @@ knownFailuresForPath tsDir (Just path)
parseFilePath :: (Member (Error SomeException) sig, Member Distribute sig, Member Task sig, Member Files sig, Carrier sig m, MonadIO m) => Path.RelFile -> m Bool
parseFilePath path = readBlob (fileForRelPath path) >>= parseTermBuilder @[] TermShow . pure >>= const (pure True)
parseFilePath path = readBlob (fileForRelPath path) >>= runReader (PerLanguageModes Nothing) . parseTermBuilder @[] TermShow . pure >>= const (pure True)

View File

@ -95,7 +95,7 @@ diffFilePaths session paths
parseFilePath :: TaskSession -> Path.RelFile -> IO (Either SomeException ByteString)
parseFilePath session path = do
blob <- readBlobFromFile (fileForRelPath path)
res <- runTask session $ parseTermBuilder TermSExpression (toList blob)
res <- runTask session . runReader (PerLanguageModes Nothing) $ parseTermBuilder TermSExpression (toList blob)
pure (runBuilder <$> res)
-- | Read two files to a BlobPair.