How to import an exclamation point (or other operator) from Haskell module

Viewed 2563

Haskell has a Data.Map module which includes, among other functions, a ! function.

fromList [(5,'a'), (3,'b')] ! 1    Error: element not in the map
fromList [(5,'a'), (3,'b')] ! 5 == 'a'

While I can import other functions from the Data.Map module into my code...

import Data.Map(Map, keys, fromList)

...the following does NOT work...

import Data.Map(Map, keys, fromList, !)

I get the following error:

parse error on input `!'

What is the correct syntax to import items like !?

1 Answers
Related