@@ -40,9 +40,6 @@ module TypeFun.Data.List
4040 , ElementIsUniq
4141 , UniqElements
4242 , UniqElements'
43− -- * Unsafe helpers
44− , appendId
45− , subListId
4643 ) where
4744
4845import Data.Type.Bool
@@ -51,7 +48,6 @@ import GHC.TypeLits
5148import TypeFun.Data.Eq
5249import TypeFun.Data.Maybe
5350import TypeFun.Data.Peano
54−import Unsafe.Coerce
5551
5652------------------------------------------------------------------------
5753-- NOTE: Errors type classes. These type classes are not in separate --
@@ -108,13 +104,6 @@ type family (:++:) (a :: [k]) (b :: [k]) :: [k] where
108104 '[] :++: b = b
109105 (a ': as) :++: b = a ': (as :++: b)
110106
111−appendId
112− :: forall proxy l r
113− . proxy l
114− -> (l ~ (l :++: '[]) => r)
115− -> r
116−appendId = unsafeCoerce id
117−
118107type IndexOf a s = FromJust (IndexOfMay a s)
119108
120109type IndexOfMay a s = IndexOfMay' Z a s
@@ -168,12 +157,6 @@ type family SubList (a :: [k]) (b :: [k]) :: Constraint where
168157 SubList '[] bs = ()
169158 SubList (a ': as) bs = (Elem a bs, SubList as bs)
170159
171−subListId
172− :: forall proxy l r
173− . proxy l
174− -> (SubList l l => r) -> r
175−subListId _ = unsafeCoerce id
176−
177160type family NotSubList (a :: [k]) (b :: [k]) :: Constraint where
178161 NotSubList '[] bs = ()
179162 NotSubList (a ': as) bs = (NotElem a bs, NotSubList as bs)