From 87a658d45bd931a1e5b1f422938446a8e03c9d6b Mon Sep 17 00:00:00 2001 From: Patrick Thomson Date: Wed, 2 Oct 2019 10:59:54 -0400 Subject: [PATCH] Fix tests and squash warnings. --- semantic-python/test/Directive.hs | 1 - semantic-python/test/Instances.hs | 2 +- semantic-python/test/Test.hs | 3 +-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/semantic-python/test/Directive.hs b/semantic-python/test/Directive.hs index d9ed052a2..c3a0cfcdc 100644 --- a/semantic-python/test/Directive.hs +++ b/semantic-python/test/Directive.hs @@ -13,7 +13,6 @@ import qualified Data.Core.Parser as Core.Parser import qualified Data.Core.Pretty as Core.Pretty import Data.ByteString.Char8 (ByteString) import qualified Data.ByteString.Char8 as ByteString -import Data.List.NonEmpty (NonEmpty) import System.Process import qualified Text.Trifecta as Trifecta diff --git a/semantic-python/test/Instances.hs b/semantic-python/test/Instances.hs index f24b684dc..3d5f52482 100644 --- a/semantic-python/test/Instances.hs +++ b/semantic-python/test/Instances.hs @@ -35,7 +35,7 @@ instance ToJSON1 Named where -- The correct thing to do here is to manually munge the bytestring -- together as a builder, but we don't even hit this code path, -- so it will do for now. - liftToEncoding f _ (Named name a) = f a + liftToEncoding f _ (Named _name a) = f a instance ToJSON2 Incr where liftToJSON2 f _ g _ = \case diff --git a/semantic-python/test/Test.hs b/semantic-python/test/Test.hs index af691d9f7..202dbf42b 100644 --- a/semantic-python/test/Test.hs +++ b/semantic-python/test/Test.hs @@ -29,7 +29,6 @@ import Data.String (fromString) import GHC.Stack import qualified Language.Python.Core as Py import Prelude hiding (fail) -import qualified Source.Span as Source (Span) import Streaming import qualified Streaming.Prelude as Stream import qualified Streaming.Process @@ -100,7 +99,7 @@ fixtureTestTreeForFile fp = HUnit.testCaseSteps (Path.toString fp) $ \step -> wi . runFail . runReader (fromString @Py.SourcePath . Path.toString $ fp) . runReader @Py.Bindings mempty - . Py.compile @(TSP.Module Source.Span) @_ @(Term (Ann :+: Core)) + . Py.compile @TSP.Module @_ @(Term (Ann :+: Core)) <$> result for_ directives $ \directive -> do