+{-# LANGUAGE TupleSections, ConstraintKinds, CPP #-}
+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
-- | This module extends "Data.List" with extra functions of a similar nature.
-- The package also exports the existing "Data.List" functions.
@@ -156,6 +157,7 @@ lastDef :: a -> [a] -> a
lastDef d xs = foldl (\_ x -> x) d xs -- I know this looks weird, but apparently this is the fastest way to do this: https://hackage.haskell.org/package/base-4.12.0.0/docs/src/GHC.List.html#last
{-# INLINE lastDef #-}
+#if __GLASGOW_HASKELL__ < 907
-- | A total variant of the list index function `(!!)`.