--------------------------------------------------------
-- Utils
--------------------------------------------------------

errorsToGhcException :: [Located String] -> GhcException
errorsToGhcException errs =
    UsageError $
        intercalate "\n" [ showUserSpan True l ++ ": " ++ e | L l e <- errs ]
errorsToGhcException :: [Located String] -> GhcException
errorsToGhcException errs =
    UsageError $
        intercalate "\n" [ showUserSpan True l ++ ": " ++ e | L l e <- errs ]
errorsToGhcException errs =
    UsageError $
        intercalate "\n" [ showUserSpan True l ++ ": " ++ e | L l e <- errs ]