Small refactor of getRuntimeRep
authorSimon Peyton Jones <simonpj@microsoft.com>
Mon, 28 Aug 2017 16:33:59 +0000 (17:33 +0100)
committerBen Gamari <ben@smart-cactus.org>
Tue, 29 Aug 2017 18:31:43 +0000 (14:31 -0400)
commitcbf472384b5b583c24d1a1a32f3fa58d4f1501b1
treeaed00d889e4b88a9dec0bb154f154741cba3acc5
parentd913594f1bc471ab5ac4299e12c59efb91b60d84
Small refactor of getRuntimeRep

Instead of using a string argument, use HasDebugCallStack.
(Oddly, some functions were using both!)

Plus, use getRuntimeRep rather than getRuntimeRep_maybe when
if the caller panics on Nothing. Less code, and a better debug
stack.

(cherry picked from commit a6c448b403dbe8720178ca82100f34baedb1f47e)
12 files changed:
compiler/coreSyn/MkCore.hs
compiler/deSugar/DsBinds.hs
compiler/deSugar/DsExpr.hs
compiler/deSugar/DsUtils.hs
compiler/iface/TcIface.hs
compiler/prelude/TysWiredIn.hs
compiler/typecheck/TcExpr.hs
compiler/typecheck/TcHsType.hs
compiler/typecheck/TcInstDcls.hs
compiler/typecheck/TcRnDriver.hs
compiler/types/Type.hs
compiler/vectorise/Vectorise/Exp.hs