module Main where

import qualified Test.Data.List.Reverse.StrictElement as RevElem
import qualified Test.Data.List.Reverse.StrictSpine as RevSpine
import qualified Test.Data.List      as ListHT
import qualified Test.Data.ListMatch as ListMatch
import qualified Test.Data.Maybe     as MaybeHT
import qualified Test.Data.Function  as FunctionHT


prefix :: String -> [(String, IO ())] -> [(String, IO ())]
prefix msg =
   map (\(str,test) -> (msg ++ "." ++ str, test))

main :: IO ()
main =
   mapM_ (\(msg,io) -> putStr (msg++": ") >> io) $
   concat $
      prefix "ReverseSpine" RevSpine.tests :
      prefix "ReverseElem" RevElem.tests :
      prefix "List"      ListHT.tests :
      prefix "ListMatch" ListMatch.tests :
      prefix "Maybe"     MaybeHT.tests :
      prefix "Function"  FunctionHT.tests :
      []
