And pattern match on it as well: \begin{haskellcode} addIntToList :: MaybeInt -> [Int] addIntToList (NoError x) = [x] addIntToList (Error str) = [] \end{haskellcode} So if we got an error, we just return an empty list, otherwise we return a list with the \code{Int} as its only element.