Results.hs 320 Bytes
Newer Older
Sven Keidel's avatar
Sven Keidel committed
1 2 3 4 5 6
module Pretty.Results where

import WildcardSemantics

import Data.Foldable

Jente Hidskes's avatar
Jente Hidskes committed
7
import Text.PrettyPrint
Sven Keidel's avatar
Sven Keidel committed
8 9 10 11 12 13 14

ppResults :: (Functor f, Foldable f) => (Term -> Doc) -> f Term -> Doc
ppResults ppTerm res = braces
              $ cat
              $ punctuate (comma <> space)
              $ toList
              $ ppTerm <$> res