As a side note, about 2 lines after: let mockFlags | isVersion2 = [] | otherwise = ["-D__HADDOCK__"] Could be written more compactly as: let mockFlags = ["-D__HADDOCK__" | not isVersion2] I love list comprehensions :-) Thanks Neil