Opened 8 years ago

Closed 8 years ago

Last modified 6 years ago

#883 closed bug (worksforme)

cannot use (!) as an infix operator

Reported by: aotani@… Owned by:
Priority: normal Milestone: 6.6
Component: Compiler Version: 6.5
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

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.

Change History (4)

comment:1 Changed 8 years ago by aotani@…

  • Resolution set to worksforme
  • Status changed from new to closed

This problem is not occured when compiling with ghc-6.5.20060831. Sorry for my annoying report.

comment:2 Changed 8 years ago by simonpj

Actually, there was a missing case in -fbang-patterns, which I have now fixed. So it was a useful report.

Simon

comment:3 Changed 6 years ago by simonmar

  • Architecture changed from Unknown to Unknown/Multiple

comment:4 Changed 6 years ago by simonmar

  • Operating System changed from Unknown to Unknown/Multiple
Note: See TracTickets for help on using tickets.