• Daniel Trstenjak's avatar
    More diff friendly pretty printing of cabal files · 73dd1c26
    Daniel Trstenjak authored
    Now the 'fieldGet' function of 'FieldDescr' does the
    whole pretty printing of the field. Previously only the
    values have been pretty printed by 'fieldGet' and the
    name of the field with the colon have been printed
    in the 'PrettyPrint' module.
    But this separation made it more difficult to handle the
    pretty printing of fields differently, because some fields
    should be just printed in one lines and others - having several
    values - should be printed nested with each value on a new line.
    This difference in the printing of the fields is now handled by
    the 'FieldDescr' constructor functions in 'ParseUtils'.
    Now the 'listField' and 'commaListField' functions create 'FieldDescr'
    that nest their values and all other functions create one line
    for the whole field.