Commit c7611977 authored by simonpj@microsoft.com's avatar simonpj@microsoft.com

Add LANGUAGE BangPatterns

To do this we need to define (!) prefix, thus
   (!) arr i = ....
rather than infix
parent 3b991c0a
{-# OPTIONS_GHC -XNoBangPatterns -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -XBangPatterns -fno-warn-unused-imports #-}
{-# OPTIONS_HADDOCK hide #-}
-- XXX With a GHC 6.9 we get a spurious
-- Data/Array/Base.hs:26:0:
......@@ -295,7 +295,7 @@ type ListUArray e = forall i . Ix i => (i,i) -> [e] -> UArray i e
{-# INLINE (!) #-}
-- | Returns the element of an immutable array at the specified index.
(!) :: (IArray a e, Ix i) => a i e -> i -> e
arr ! i = case bounds arr of
(!) arr i = case bounds arr of
(l,u) -> unsafeAt arr $ safeIndex (l,u) (numElements arr) i
{-# INLINE indices #-}
......
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