Parsing log files in Haskell
Concerning whatWentWrong, the main problem is that the function isn't total. This means that for Unknown it will fail badly and unconditionally.

If you declare the functions from map and filter as named functions in a where (or let block), you will be able to check for Unknown as well in pattern matching. Also, you can combine several constructors in a pattern. 

There are two options how to fix map: Either return some String for Unknown, or remove such entries. I'll show an example for the latter option using mapMaybe:

whatWentWrong :: [LogMessage] -&gt; [String]
whatWentWrong = mapMaybe getMsg
                . filter filterExp
                . inOrder . build
  where
    filterExp (LogMessage (Error sev) _ _) = sev &gt;= 50
    filterExp _                            = False
    getMsg (LogMessage _ _ s) = Just s
    getMsg _                  = Nothing


Also note that you can declare this function as a composition of functions, in so-called point-free style.