@@ -380,13 +380,17 @@ coercible = primClassOf (P.primSubName "Coerce") "Coercible" $ T.unlines
380
380
, " This class does not have regular instances; instead they are created"
381
381
, " on-the-fly during type-checking according to a set of rules."
382
382
, " "
383
- , " First, Coercible obeys reflexivity, any type has the same representation"
384
- , " as itself and symmetry, pairs of types can be coerced both ways :"
383
+ , " First, Coercible obeys reflexivity - any type has the same representation"
384
+ , " as itself:"
385
385
, " "
386
386
, " instance coercibleReflexive :: Coercible a a"
387
+ , " "
388
+ , " Second, Coercible obeys symmetry - if a type `a` can be coerced to some"
389
+ , " other type `b`, then `b` can also be coerced back to `a`:
390
+ , " "
387
391
, " instance coercibleSymmetric :: Coercible a b => Coercible b a "
388
392
, " "
389
- , " Second , for every type constructor there is an instance that allows one"
393
+ , " Third , for every type constructor there is an instance that allows one"
390
394
, " to coerce under the type constructor (`data` or `newtype`). For example,"
391
395
, " given a definition:"
392
396
, " "
@@ -402,7 +406,7 @@ coercible = primClassOf (P.primSubName "Coerce") "Coercible" $ T.unlines
402
406
, " such as `b` is thus typically referred to as a \" phantom\" type), `b` and `b'`"
403
407
, " can differ arbitrarily."
404
408
, " "
405
- , " Third , for every `newtype NT = MkNT T`, there is a pair of instances which"
409
+ , " Fourth , for every `newtype NT = MkNT T`, there is a pair of instances which"
406
410
, " permit coercion in and out of the `newtype`:"
407
411
, " "
408
412
, " instance coercibleNewtypeLeft :: Coercible a T => Coercible a NT"
@@ -411,7 +415,7 @@ coercible = primClassOf (P.primSubName "Coerce") "Coercible" $ T.unlines
411
415
, " To prevent breaking abstractions, these instances are only usable if the"
412
416
, " constructor `MkNT` is exported."
413
417
, " "
414
- , " Fourth , every pair of unsaturated type constructors can be coerced if"
418
+ , " Fifth , every pair of unsaturated type constructors can be coerced if"
415
419
, " there is an instance for the fully saturated types. For example,"
416
420
, " given the definitions:"
417
421
, " "
0 commit comments