From 34375f7d2e41d888b0ebf0f2f88ce61c9cc8de27 Mon Sep 17 00:00:00 2001 From: Paul Cadman Date: Thu, 25 Apr 2024 16:34:50 +0100 Subject: [PATCH] Restore previous version of ImportParents --- src/Juvix/Compiler/Pipeline/ImportParents.hs | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/src/Juvix/Compiler/Pipeline/ImportParents.hs b/src/Juvix/Compiler/Pipeline/ImportParents.hs index b0ee1cbf24..d6cc721465 100644 --- a/src/Juvix/Compiler/Pipeline/ImportParents.hs +++ b/src/Juvix/Compiler/Pipeline/ImportParents.hs @@ -3,23 +3,9 @@ module Juvix.Compiler.Pipeline.ImportParents where import Juvix.Compiler.Concrete.Data import Juvix.Prelude.Base -data ImportParents = ImportParents - { _importParents :: [TopModulePath], - _importParentsSeenModules :: HashSet TopModulePath +newtype ImportParents = ImportParents + { _importParents :: [TopModulePath] } + deriving newtype (Semigroup, Monoid) makeLenses ''ImportParents - -instance Semigroup ImportParents where - s1 <> s2 = - ImportParents - { _importParents = s1 ^. importParents <> s2 ^. importParents, - _importParentsSeenModules = s1 ^. importParentsSeenModules <> s2 ^. importParentsSeenModules - } - -instance Monoid ImportParents where - mempty = - ImportParents - { _importParents = mempty, - _importParentsSeenModules = mempty - }