printExtension :: LogicGraph -> [Annoted SPEC] -> [Doc]
printExtension lg l = case l of
    [] -> []
    x : r -> printOptUnion lg x ++
             concatMap ((\ u -> case u of
                            [] -> []
                            d : s -> (topKey thenS <+> d) : s) .
                        printOptUnion lg) r
printExtension :: LogicGraph -> [Annoted SPEC] -> [Doc]
printExtension lg l = case l of
    [] -> []
    x : r -> printOptUnion lg x ++
             concatMap ((\ u -> case u of
                            [] -> []
                            d : s -> (topKey thenS <+> d) : s) .
                        printOptUnion lg) r
printExtension lg l = case l of
    [] -> []
    x : r -> printOptUnion lg x ++
             concatMap ((\ u -> case u of
                            [] -> []
                            d : s -> (topKey thenS <+> d) : s) .
                        printOptUnion lg) r