prettyError :: Maybe SourcePos -> Doc -> Doc
prettyError sp message = case sp of
  Nothing -> message
  Just sp -> prettySourcePos sp $+$ message
prettyError :: Maybe SourcePos -> Doc -> Doc
prettyError sp message = case sp of
  Nothing -> message
  Just sp -> prettySourcePos sp $+$ message
prettyError sp message = case sp of
  Nothing -> message
  Just sp -> prettySourcePos sp $+$ message