ostap / comp

a tool for querying files in various formats
MIT License
43 stars 2 forks source link

generator definition #2

Closed julochrobak closed 11 years ago

julochrobak commented 11 years ago

generator is defined as an expression and does not restrict to an expression of list type

[ a | a <- 3+5]      # what does it iterate through if 3+5 is not a list?
[ a | a <- [3+5]]    # this is straightforward iteration through a list
ostap commented 11 years ago

[a | a <- 3+5]] was resulting in cannot resolve type of 'a' (see decls.go, I am pretty sure it was like this for a while). Anyways I improved the error reporting so it is now '3 + 5' is not a list.