a reliable way of dropping levity args?
Richard Eisenberg
eir at cis.upenn.edu
Fri Jan 29 00:39:13 UTC 2016
On Jan 28, 2016, at 5:48 PM, Ömer Sinan Ağacan <omeragacan at gmail.com> wrote:
>
> | Just (tc, args) <- splitTyConApp_maybe ty
> , isUnboxedTupleTyCon tc
> = pprTrace "elimUbxSumRepTypes"
> (text "orig args:" <+> ppr args $$
> text "dropWhile isLevityTy args = " <+> ppr (dropWhile
> isLevityTy args)) $
> concatMap go (drop (length args `div` 2) args)
You want (dropWhile (isLevityTy . typeKind) args). isLevityTy simply checks if its argument is exactly `Levity`.
Does that work?
Richard
More information about the ghc-devs
mailing list