-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undocumented bottoms in surprising places #1138
Comments
Fix is up here: #1140 |
Regarding removing the use of
Now I see that, to compare |
@sjakobi: I wouldn't worry too much about it. I'd like to move towards less variants of core utilities. If the partial normalization really bothers people then we could always make |
While running the new
normalizeWithMIsConsistentWithNormalize
property test again with a largermaxSuccesses
, I was surprised by an error fromnormalizeWithM
which I previously believed to be total!The problematic expression boils down to
<>.x || Type
. The standard requires the two arguments of||
to be tested for equivalence if neither normalizes toTrue
orFalse
, andnormalizeWithM
usesjudgmentallyEqual
for this.judgmentallyEqual
is justconvEmpty
andconvEmpty
relies oneval
, which useserror
in a few cases, for example<>.x
.As Haskell functions are generally expected to be total, I think it would be good to document the partiality of
eval
and the functions that rely oneval
.Currently the documentation of e.g.
normalize
even incorrectly claims totality:dhall-haskell/dhall/src/Dhall/Core.hs
Lines 1189 to 1199 in e40e847
Regarding
normalizeWithM
, I wonder whether it could perform the equivalence tests without usingeval
, since it can take care ofbeta-normalization
on its own.The text was updated successfully, but these errors were encountered: