Re CLC issue 292 Avoid using partial init and last
The motivation for this pull request is:
- https://github.com/haskell/core-libraries-committee/issues/292
At some point, GHC versions may warn that init and last are partial, giving advice about alternatives (including unsnoc). This pull request seeks to anticipate that, by avoiding the use of partial functions at the two places where the time package uses init and/or last.
I have converted the pull request to draft because it has been suggested that, compared to other approaches, unsnoc has performance issues. I am looking into that.
Sorry, I missed this PR when submitting #275, which superseds it. I think the PR can be closed now.
test code still needs fixing. Lemme go fix it.
OK done.