diff --git a/src/Regex/Internal/Num.hs b/src/Regex/Internal/Num.hs index 8d3a9c7..fdb9285 100644 --- a/src/Regex/Internal/Num.hs +++ b/src/Regex/Internal/Num.hs @@ -133,9 +133,7 @@ mkSignedIntRange minus plus wordRangeDec (low,high) = case (negR, nonNegR) of {-# INLINE mkSignedIntRange #-} absw :: Int -> Word -absw x = if x == minBound - then fromIntegral (abs (x+1) + 1) - else fromIntegral (abs x) +absw = fromIntegral . abs ------------------- -- Parsing ranges