Commit 9864edf2 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Look through tick-boxes when looking for integral literals in the desugarer

Fixes Trac #8334
parent b84fbabb
......@@ -213,6 +213,11 @@ warnAboutEmptyEnumerations dflags fromExpr mThnExpr toExpr
| otherwise = return ()
getLHsIntegralLit :: LHsExpr Id -> Maybe (Integer, Name)
-- See if the expression is an Integral literal
-- Remember to look through automatically-added tick-boxes! (Trac #8384)
getLHsIntegralLit (L _ (HsPar e)) = getLHsIntegralLit e
getLHsIntegralLit (L _ (HsTick _ e)) = getLHsIntegralLit e
getLHsIntegralLit (L _ (HsBinTick _ _ e)) = getLHsIntegralLit e
getLHsIntegralLit (L _ (HsOverLit over_lit)) = getIntegralLit over_lit
getLHsIntegralLit _ = Nothing
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment