File tree Expand file tree Collapse file tree 2 files changed +2
-13
lines changed Expand file tree Collapse file tree 2 files changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -129,4 +129,3 @@ instance Typeable c => Show (Evidence c) where
129129-- | Take the union of two `Maybe` values with a given union operator
130130unionWithMaybe :: (a -> a -> a ) -> Maybe a -> Maybe a -> Maybe a
131131unionWithMaybe f ma ma' = (f <$> ma <*> ma') <|> ma <|> ma'
132-
Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ import Constrained.List
6464import Constrained.PrettyUtils
6565import Control.Applicative ((<|>) )
6666import Control.Arrow (first )
67+ import Data.Containers.ListUtils
6768import Data.Foldable
6869import Data.Kind
6970import Data.List (nub )
@@ -362,17 +363,6 @@ conformsToNumSpec i (NumSpecInterval ml mu) = maybe True (<= i) ml && maybe True
362363-- implementations are found here
363364-- =====================================================================
364365
365- -- | Strip out duplicates (in n-log(n) time, by building an intermediate Set)
366- nubOrd :: Ord a => [a ] -> [a ]
367- nubOrd =
368- loop mempty
369- where
370- loop _ [] = []
371- loop s (a : as)
372- | a `Set.member` s = loop s as
373- | otherwise =
374- let s' = Set. insert a s in s' `seq` a : loop s' as
375-
376366-- | Builds a MemberSpec, but returns an Error spec if the list is empty
377367nubOrdMemberSpec :: Ord a => String -> [a ] -> Specification a
378368nubOrdMemberSpec message xs =
@@ -936,7 +926,7 @@ instance Logic IntW where
936926
937927 propagateMemberSpec AddW (HOLE :<: i) es =
938928 memberSpec
939- (nub $ mapMaybe (safeSubtract i) (NE. toList es))
929+ (nubOrd $ mapMaybe (safeSubtract i) (NE. toList es))
940930 ( NE. fromList
941931 [ " propagateSpecFn on (" ++ show i ++ " +. HOLE)"
942932 , " The Spec is a MemberSpec = " ++ show es -- show (MemberSpec @HasSpec @TS es)
You can’t perform that action at this time.
0 commit comments