I have a little guess, because I have not seen this binding style before, but I think that Maybe type is used effectively for coding de Bruijn Indexes .
The basic idea is that references to related variables are stored as a number that defines the number of surrounding binders to go through the corresponding binder. So, for example, 0 will refer to the nearest neighboring binder, 1 to the nearest nearest, etc.
I think what happens here is that Maybe used to count binders. So, Nothing equivalent to 0 and refers to the nearest binder, and Just Nothing equivalent to 1 and refers to the nearest nearest, etc.
So, in your example, V Nothing will refer to Lit 1 , while V (Just Nothing) will refer to Lit 3 .
Ganesh sittampalam
source share