coerceShow f _p = return . text . show . f . unsafeCoerce# . val
- --TODO pprinting of list terms is not lazy
+ --NOTE pprinting of list terms is not lazy
doList p h t = do
let elems = h : getListTerms t
isConsLast = termType(last elems) /= termType h
. pprDeeperList fsep
. punctuate (space<>colon)
$ print_elems
- else brackets (pprDeeperList fsep$
+ else brackets (pprDeeperList fcat$
punctuate comma print_elems)
where Just a /= Just b = not (a `coreEqType` b)
_ /= _ = True
getListTerms Term{subTerms=[h,t]} = h : getListTerms t
- getListTerms Term{subTerms=[]} = []
+ getListTerms Term{subTerms=[]} = []
getListTerms t@Suspension{} = [t]
getListTerms t = pprPanic "getListTerms" (ppr t)