div package:ghc-lib-parser

integer division truncated toward negative infinity WARNING: This function is partial (because it throws when 0 is passed as the divisor) for all the integer types in base.
pattern synonym for division *
pattern synonym for division *
simultaneous div and mod WARNING: This function is partial (because it throws when 0 is passed as the divisor) for all the integer types in base.
Division: /
Divergence characterises whether something surely diverges. Models a subset lattice of the following exhaustive set of divergence results:
  • n nontermination (e.g. loops)
  • i throws imprecise exception
  • p throws precise exception
  • c converges (reduces to WHNF).
The different lattice elements correspond to different subsets, indicated by juxtaposition of indicators (e.g. nc definitely doesn't throw an exception, and may or may not reduce to WHNF).
Dunno (nipc)
|
ExnOrDiv (nip)
|
Diverges (ni)
As you can see, we don't distinguish n and i. See Note [Precise exceptions and strictness analysis] for why p is so special compared to i.
Definitely throws an imprecise exception or diverges.
True of dyadic operators that can fail only if the second arg is zero! This function probably belongs in an automagically generated file.. but it's such a special case I thought I'd leave it here for now.
The Diverging set; empty if no match can lead to divergence. If it wasn't empty, we have to turn redundancy warnings into inaccessibility warnings for any subclauses.
Definitely throws a *precise* exception, an imprecise exception or diverges. Never converges, hence isDeadEndDiv! See scenario 1 in Note [Precise exceptions and strictness analysis].