Don't crash when pretty-printing bad joins
authorSimon Peyton Jones <simonpj@microsoft.com>
Tue, 1 May 2018 10:11:46 +0000 (11:11 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Tue, 1 May 2018 11:57:48 +0000 (12:57 +0100)
commit07cc6039dccff82790bf1d84a81e26df234ad899
treeb9c771b364646f1a989f87a9b012e93b06ed63ac
parent4e45ebeea097b662076936f5a50c0873d8737923
Don't crash when pretty-printing bad joins

Trac #15108 showed that the Core pretty-printer would
crash if it found a join-point binding with too few lambda
on the RHS.  That is super-unhelpful!  Lint will find it,
but pretty-printing should not crash.

This patch just makes the pretty printer behave more robustly;
it leaves the job of error reporting to Lint.
compiler/coreSyn/PprCore.hs