on master help sign in
Skip parens within tuples
commite6b3f452a903f0f245d5cc1c86ec7da4ed380ed9 authorEvan Czaplicki <info@elm-lang.org> dateThu 22 Oct 2015, 18:06 (11 years ago) parent9c1239a
1 file changed+6−2
src/Reporting/Render/Type.hs+6−2
src/Reporting/Render/Type.hs+6−2
@@ -195,8 +195,12 @@ diff localizer context leftType rightType =
195195 (docApp localizer context rightName (map (docType localizer App) rightArgs))
196196
197197 else
198− docApp localizer context leftName
199− <$> sequenceA (zipWith (go App) leftArgs rightArgs)
198+ let
199+ subContext =
200+ if Var.isTuple leftName then None else App
201+ in
202+ docApp localizer context leftName
203+ <$> sequenceA (zipWith (go subContext) leftArgs rightArgs)
200204
201205 (Type.App _ _, Type.App _ _) ->
202206 error "Type applications without concrete names should not get here."