on master help sign in
Rename remaining ErrorUnlessTrue families.
f3cc231Will Jones
src/Data/Generics/Sum/Constructors.hs+4−4
@@ -29,14 +29,14 @@ class AsConstructor (ctor :: Symbol) a s | s ctor -> a where
29
29
30instance
30instance
31 ( Generic s
31 ( Generic s
32− , ErrorUnlessTrue ctor s (HasCtorP ctor (Rep s))
32+ , ErrorUnless ctor s (HasCtorP ctor (Rep s))
33 , GAsConstructor ctor (Rep s) a
33 , GAsConstructor ctor (Rep s) a
34 ) => AsConstructor ctor a s where
34 ) => AsConstructor ctor a s where
35
35
36 _Ctor = repIso . _GCtor @ctor
36 _Ctor = repIso . _GCtor @ctor
37
37
38−type family ErrorUnlessTrue (ctor :: Symbol) (s :: Type) (contains :: Bool) :: Constraint where
38+type family ErrorUnless (ctor :: Symbol) (s :: Type) (contains :: Bool) :: Constraint where
39− ErrorUnlessTrue ctor s 'False
39+ ErrorUnless ctor s 'False
40 = TypeError
40 = TypeError
41 ( 'Text "The type "
41 ( 'Text "The type "
42 ':<>: 'ShowType s
42 ':<>: 'ShowType s
@@ -44,7 +44,7 @@ type family ErrorUnlessTrue (ctor :: Symbol) (s :: Type) (contains :: Bool) :: C
44 ':<>: 'ShowType ctor
44 ':<>: 'ShowType ctor
45 )
45 )
46
46
47− ErrorUnlessTrue _ _ 'True
47+ ErrorUnless _ _ 'True
48 = ()
48 = ()
49
49
50class GAsConstructor (ctor :: Symbol) (f :: Type -> Type) a | ctor f -> a where
50class GAsConstructor (ctor :: Symbol) (f :: Type -> Type) a | ctor f -> a where
src/Data/Generics/Sum/Typed.hs+4−4
@@ -30,14 +30,14 @@ class AsType a s where
30
30
31instance
31instance
32 ( Generic s
32 ( Generic s
33− , ErrorUnlessTrue a s (HasPartialTypeP a (Rep s))
33+ , ErrorUnless a s (HasPartialTypeP a (Rep s))
34 , GAsType (Rep s) a
34 , GAsType (Rep s) a
35 ) => AsType a s where
35 ) => AsType a s where
36
36
37 _Typed = repIso . _GTyped
37 _Typed = repIso . _GTyped
38
38
39−type family ErrorUnlessTrue (a :: Type) (s :: Type) (contains :: Bool) :: Constraint where
39+type family ErrorUnless (a :: Type) (s :: Type) (contains :: Bool) :: Constraint where
40− ErrorUnlessTrue a s 'False
40+ ErrorUnless a s 'False
41 = TypeError
41 = TypeError
42 ( 'Text "The type "
42 ( 'Text "The type "
43 ':<>: 'ShowType s
43 ':<>: 'ShowType s
@@ -45,7 +45,7 @@ type family ErrorUnlessTrue (a :: Type) (s :: Type) (contains :: Bool) :: Constr
45 ':<>: 'ShowType a
45 ':<>: 'ShowType a
46 )
46 )
47
47
48− ErrorUnlessTrue _ _ 'True
48+ ErrorUnless _ _ 'True
49 = ()
49 = ()
50
50
51class GAsType (f :: Type -> Type) a where
51class GAsType (f :: Type -> Type) a where