Mathematically a function must evaluate to a value.
For every input within its domain, yes. Whether this is a problem for partial functions will depend on how you define the domain: either exactly the set permitted by the function's type, or the subset of well-typed inputs with an associated value. As far as I can tell the most common definition of the domain for a relation or function is the set of inputs which have at least one associated result; on the other hand, those definitions are not concerned with the function's type. I would say that the input type is only an approximation (superset) of the function's domain, with better type systems permitting closer approximations. (For perspective, I've never known anyone to argue that the result type must perfectly capture the function's range, which is defined much the same way as the set of results associated with at least one input.)
The more relevant these aspects of your language are to practical programs, the less useful reasoning one can do...
There is indeed a spectrum of varying degrees of impurity among impure languages, depending on both language design and custom among its users. However, there is one key area where the classification is binary, and that is in the answer to the question: Does the language assume referential integrity or not? In Haskell the answer is "yes". The compiler will make substitutions under the assumption that evaluation does not have side effects; if you break that expectation, via unsafePerformIO or other means, the result is undefined. In Rust or Javascript the answer is "no", and various optimizations are prevented because the compiler cannot assume that the evaluation of an unknown function will not have side effects.
Even in Haskell you have cases of the same kind of law violation where two expressions should be equivalent (according to the monad laws) but one terminates and the other doesn't.
If one side doesn't terminate then you can never get to the point of observing that they have different results. The point of "fast and loose reasoning" is that you only need to prove that the laws are never broken within the program. The condition "map f . map g == map (f . g)" cannot evaluate to False... but that doesn't mean it must evaluate to True. In Rust or JS, however, that condition could evaluate to false in the presence of side effects.
Comments
For every input within its domain, yes. Whether this is a problem for partial functions will depend on how you define the domain: either exactly the set permitted by the function's type, or the subset of well-typed inputs with an associated value. As far as I can tell the most common definition of the domain for a relation or function is the set of inputs which have at least one associated result; on the other hand, those definitions are not concerned with the function's type. I would say that the input type is only an approximation (superset) of the function's domain, with better type systems permitting closer approximations. (For perspective, I've never known anyone to argue that the result type must perfectly capture the function's range, which is defined much the same way as the set of results associated with at least one input.)
There is indeed a spectrum of varying degrees of impurity among impure languages, depending on both language design and custom among its users. However, there is one key area where the classification is binary, and that is in the answer to the question: Does the language assume referential integrity or not? In Haskell the answer is "yes". The compiler will make substitutions under the assumption that evaluation does not have side effects; if you break that expectation, via unsafePerformIO or other means, the result is undefined. In Rust or Javascript the answer is "no", and various optimizations are prevented because the compiler cannot assume that the evaluation of an unknown function will not have side effects.
If one side doesn't terminate then you can never get to the point of observing that they have different results. The point of "fast and loose reasoning" is that you only need to prove that the laws are never broken within the program. The condition "map f . map g == map (f . g)" cannot evaluate to False... but that doesn't mean it must evaluate to True. In Rust or JS, however, that condition could evaluate to false in the presence of side effects.