desugar :: E -> E
desugar (L (KW "package" : ID name p : topLevels))
    = L $ [ KW "package", ID name p ] <> imports <> decls
    where
        (imports, decls) = swapWith addReturn
                         . swapPrintf
                         . swapPrint
                         . span isImport $ topLevels

        swapPrint  = swapAddImport importFmt (eq (KW "print")) (ID "fmt.Println" Nothing)
        swapPrintf = swapAddImport importFmt (eq (KW "printf")) (ID "fmt.Printf" Nothing)
desugar :: E -> E
desugar (L (KW "package" : ID name p : topLevels))
    = L $ [ KW "package", ID name p ] <> imports <> decls
    where
        (imports, decls) = swapWith addReturn
                         . swapPrintf
                         . swapPrint
                         . span isImport $ topLevels

        swapPrint  = swapAddImport importFmt (eq (KW "print")) (ID "fmt.Println" Nothing)
        swapPrintf = swapAddImport importFmt (eq (KW "printf")) (ID "fmt.Printf" Nothing)
desugar (L (KW "package" : ID name p : topLevels))
    = L $ [ KW "package", ID name p ] <> imports <> decls
    where
        (imports, decls) = swapWith addReturn
                         . swapPrintf
                         . swapPrint
                         . span isImport $ topLevels

        swapPrint  = swapAddImport importFmt (eq (KW "print")) (ID "fmt.Println" Nothing)
        swapPrintf = swapAddImport importFmt (eq (KW "printf")) (ID "fmt.Printf" Nothing)