By default LaTeX does not insert word breaks in type writer fonts, because the font has no dedicated character for hyphenations. But you can set the ‘-‘ as the corresponding character:
% line breaks in tt fonts
\newcommand{\origttfamily}{}
\let\origttfamily=\ttfamily
\renewcommand{\ttfamily}{\origttfamily \hyphenchar\font=`\-}