I don't have pg installed so I can't run your code but I assume you are breaking on the vector pattern matching. Pattern matching using : only works because the : operator is a constructor in lists.
>:i (:)
data [] a = ... | a : [a]
Remember that : is an infix operator, but it is comparable to Just, Left, or Right. You are trying to use a list constructor to pattern match on a vector which looks nothing like a list.
However you can do this sort of pattern matching by using vector's (or almost any other collection's) toList function:
hostaddr:port:dbname:username:password:rest = toList vec
<- is a monadic binding. You use it when you are dealing with a datatype that happens to be an instance of Monad. It happens to be the only way to get anything out of an IO type, which is what you are using it for here. If something is just using plain types, Int, String, etc, just use lets.