Skip to content

cannot use (!) as an infix operator

When I tried to compile following code with ghc-6.5.20060830,

{-# 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 (l,u) -> unsafeAt arr (index (l,u) i)

I got error messages below

Data/ArrayBZ/Internals/IArray.hs:109:11: Not in scope: `!'
Data/ArrayBZ/Internals/IArray.hs:111:0: Not in scope: `!'
Data/ArrayBZ/Internals/IArray.hs:201:49: Not in scope: `!'

The above code is a part of !ArrayRef library written by Bulat Ziganshin.

Trac metadata
Trac field Value
Version 6.5
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system Unknown
Architecture Unknown
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information