on dev help sign in
remove OrderedSubset
commit136b08467b93c4485e4a6c130b880178520fff1d authorEitan Chatav <eitan.chatav@gmail.com> dateWed 5 Dec 2018, 12:00 (8 years ago) parentb314ba5
1 file changed+1−24
squeal-postgresql/src/Squeal/PostgreSQL/Manipulation.hs+1−24
squeal-postgresql/src/Squeal/PostgreSQL/Manipulation.hs+1−24
@@ -21,11 +21,9 @@ Squeal data manipulation language.
2121 , RankNTypes
2222 , ScopedTypeVariables
2323 , TypeApplications
24− , TypeFamilies
2524 , TypeInType
2625 , TypeOperators
2726 , UndecidableInstances
28− , UndecidableSuperClasses
2927#-}
3028
3129module Squeal.PostgreSQL.Manipulation
@@ -59,8 +57,7 @@ module Squeal.PostgreSQL.Manipulation
5957
6058import Control.DeepSeq
6159import Data.ByteString hiding (foldr)
62−import Data.Kind (Constraint)
63−import GHC.TypeLits (ErrorMessage (..), KnownSymbol, Symbol, TypeError)
60+import GHC.TypeLits (KnownSymbol)
6461
6562import qualified Generics.SOP as SOP
6663import qualified GHC.Generics as GHC
@@ -499,26 +496,6 @@ renderConflictTarget (OnConstraint con) =
499496UPDATE statements
500497-----------------------------------------}
501498
502−-- In order to guide type inference, also enforces that a key appearing in
503−-- the common subset prefix of both sup and sub maps to the same value (type).
504−type family OrderedSubsetOf'
505− (origSup :: [(Symbol, a)]) (origSub :: [(Symbol, a)])
506− (sup :: [(Symbol, a)]) (sub :: [(Symbol, a)])
507− :: Constraint where
508− OrderedSubsetOf' _ _ _ '[] = ()
509− OrderedSubsetOf' sup sub ('(xk, xv) ': xs) ('(xk, yv) ': ys) =
510− (xv ~ yv, OrderedSubsetOf' sup sub xs ys)
511− OrderedSubsetOf' sup sub (x ': xs) (y ': ys) =
512− OrderedSubsetOf' sup sub xs (y ': ys)
513− OrderedSubsetOf' sup sub '[] _ = TypeError
514− ( 'Text "The type"
515− ':$$: 'ShowType sub
516− ':$$: 'Text "is not an ordered subset of"
517− ':$$: 'ShowType sup)
518−
519−class (OrderedSubsetOf' sup sub sup sub) => OrderedSubsetOf sup sub where
520−instance (OrderedSubsetOf' sup sub sup sub) => OrderedSubsetOf sup sub where
521−
522499-- | An `update` command changes the values of the specified columns
523500-- in all rows that satisfy the condition.
524501update