on master help sign in
Improve error message for bad ports
commita3099a76165cd1974386a37bbd70e698b602a4d6 authorEvan Czaplicki <evancz@users.noreply.github.com> dateFri 2 Feb 2018, 00:12 (9 years ago) parent1c54fcd
1 file changed+2−3
src/Reporting/Error/Canonicalize.hs+2−3
src/Reporting/Error/Canonicalize.hs+2−3
@@ -421,7 +421,7 @@ toReport source localizer err =
421421 "I recommend matching matching the record as a variable and unpacking it later."
422422 )
423423
424− PortPayloadInvalid region portName badType invalidPayload ->
424+ PortPayloadInvalid region portName _badType invalidPayload ->
425425 let
426426 formatDetails (aBadKindOfThing, elaboration) =
427427 Report.Report "PORT ERROR" region [] $
@@ -431,8 +431,7 @@ toReport source localizer err =
431431 "The `" <> N.toString portName <> "` port is trying to transmit " <> aBadKindOfThing <> ":"
432432 ,
433433 H.stack
434− [ H.indent 4 (H.dullyellow (Type.toDoc localizer badType))
435− , elaboration
434+ [ elaboration
436435 , H.link "Hint"
437436 "Ports are not a traditional FFI, so if you have tons of annoying ports, definitely read"
438437 "ports"