I also think that we could could be less loose with the possible cases in provenance by using a variant (see actual comment above the datatype). This could make this pattern match more obvious. It may however complexify the provenance computation code, so this may turn out to be a bad idea.
I had this thought as well when running through the tutorial, and I think it might be less confusing to students to implement it this way. (Apologies for the thread necromancy.)
I also think that we could could be less loose with the possible cases in
provenance
by using a variant (see actual comment above the datatype). This could make this pattern match more obvious. It may however complexify the provenance computation code, so this may turn out to be a bad idea.