I think you could just skip some small pieces that tie it all together.
Firstly, you have a perfectly fine data type MyType, which contains strings:
data MyType = MyType String deriving (Show)
Now you want to write a function that scans a list of this type, printing each element as it appears. We do this through recursion on the list type.
Since lists have two cases: an empty list, []and the cons argument (:), we have two branches:
display :: [MyType] -> IO ()
display [] = return ()
display ((MyType name):xs) = do
putStrLn name
display xs
, , , , , . , , , . MyType:
table =
[ MyType "john"
, MyType "don"
, MyType "eric"
, MyType "trevor"
]
, main
main = display table
: , ( data).