I am a beginner with Haskell and I've started seeing errors similar to:
Illegal parallel list comprehension: use -fglasgow-exts
I am working within ghci
and with ghc
but only due to the fact that it was the first one I found on a search.
I'm curious if this is the type of situation one would want to avoid moving forward. Any searches I've turned up mention that these extensions expose underlying facilities that may (or may not) be useful.
A specific example is
fibs = 0 : 1 : [ a + b | a <- fibs | b <- tail fibs ]
I assume the fact that both a
and b
are reading from the list at the same time causes problems here...? So, if the glasgow extensions are the only means to support this construct is it more common to generate the list another way or just assume that the extensions will be available?
Thanks in advance for any input.
[EDIT] Sorry if this was not entirely clear, but my question is if including glasgow (or any other) extensions is considered bad practice. The example above was just to illustrate the type of error that prompted this question.