File tree 1 file changed +18
-8
lines changed
1 file changed +18
-8
lines changed Original file line number Diff line number Diff line change @@ -45,14 +45,24 @@ type family WeakenedN (n :: Natural) a :: Type where
45
45
WeakenedN 0 a = a
46
46
WeakenedN n a = Weakened (WeakenedN (n - 1 ) a )
47
47
48
- -- | A "via type" newtype for defining strongweak instances for zero-invariant,
49
- -- coercible newtypes.
50
- --
51
- -- Use like so:
52
- --
53
- -- @
54
- -- deriving via 'SWCoercibly' a instance 'Weaken' ('Identity' a)
55
- -- @
48
+ {- | A "via type" newtype for defining strongweak instances for zero-invariant,
49
+ coercible newtypes.
50
+
51
+ Use like so:
52
+
53
+ @
54
+ deriving 'Weaken' via 'SWCoercibly' a
55
+ @
56
+
57
+ Or standalone:
58
+
59
+ @
60
+ via 'SWCoercibly' a instance 'Weaken' ('Identity' a)
61
+ @
62
+
63
+ Note that usage of this incurs UndecidableInstances. That's life. You can
64
+ write the trivial instances this generates yourself if you so wish
65
+ -}
56
66
newtype SWCoercibly a = SWCoercibly { unSWCoercibly :: a }
57
67
instance Weaken (SWCoercibly a ) where
58
68
type Weakened (SWCoercibly a ) = a
You can’t perform that action at this time.
0 commit comments