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 @@ -22,7 +22,6 @@ module Constrained.Core (
2222 NonEmpty ((:|) ),
2323 Evidence (.. ),
2424 unionWithMaybe ,
25- nubOrd ,
2625) where
2726
2827import Constrained.List (
@@ -130,14 +129,3 @@ instance Typeable c => Show (Evidence c) where
130129-- | Take the union of two `Maybe` values with a given union operator
131130unionWithMaybe :: (a -> a -> a ) -> Maybe a -> Maybe a -> Maybe a
132131unionWithMaybe f ma ma' = (f <$> ma <*> ma') <|> ma <|> ma'
133-
134- -- | Strip out duplicates (in n-log(n) time, by building an intermediate Set)
135- nubOrd :: Ord a => [a ] -> [a ]
136- nubOrd =
137- loop mempty
138- where
139- loop _ [] = []
140- loop s (a : as)
141- | a `Set.member` s = loop s as
142- | otherwise =
143- let s' = Set. insert a s in s' `seq` a : loop s' as
Original file line number Diff line number Diff line change @@ -56,14 +56,15 @@ module Constrained.NumOrd (
5656import Constrained.AbstractSyntax
5757import Constrained.Base
5858import Constrained.Conformance
59- import Constrained.Core (Value (.. ), unionWithMaybe , nubOrd )
59+ import Constrained.Core (Value (.. ), unionWithMaybe )
6060import Constrained.FunctionSymbol
6161import Constrained.GenT
6262import Constrained.Generic
6363import 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 )
You can’t perform that action at this time.
0 commit comments