You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
q2::Q [Text]
q2 = [ z
| a <- agencies
, z <- [ a_nameQ a | a_nameQ a =="EdinTours" ]
]
This is a well-formed query and it executes correctly. However, trying to desugar it via showDesugaredOptQ optResugar q2 leads to:
DSH: Impossible happened at ("src/Database/DSH/Translate/CL2NKL.hs",288,37)
CallStack (from HasCallStack):
error, called at src/Database/DSH/Translate/CL2NKL.hs:288:37 in DSH-0.13.0.1-EuPUolq064bCwy8rK7h5w4:Database.DSH.Translate.CL2NKL
The problem lies in the definition of desuagrQuals that expects that every comprehension will eventually contain a BindQ qualifier - clearly not the case for a comprehension containing only a GuardQ.
I know that q2 might look a bit contrived but I've actually been hit by this issue in my work on provenance, where queries get transformed to a form that does not contain a generator, just guards.
The text was updated successfully, but these errors were encountered:
jstolarek
changed the title
Comprehensiond without a generator do not desugar
Comprehensions without a generator do not desugar
Apr 27, 2017
Say I have a table containing agencies:
And I write a query that looks like this:
This is a well-formed query and it executes correctly. However, trying to desugar it via
showDesugaredOptQ optResugar q2
leads to:The problem lies in the definition of
desuagrQuals
that expects that every comprehension will eventually contain aBindQ
qualifier - clearly not the case for a comprehension containing only aGuardQ
.I know that
q2
might look a bit contrived but I've actually been hit by this issue in my work on provenance, where queries get transformed to a form that does not contain a generator, just guards.The text was updated successfully, but these errors were encountered: