haskellimportmoduleoperatorshaskell-prelude

Haskell Prelude with hiding, how to undo?


In one file I need to use the regular prelude (++) operator and I also wish to implement my own behaviour for (++). I have used import Prelude hiding (++) at the top of my file, defined my own (++) operator and now further below I wish to refer to the regular Prelude's (++). How do I achieve this?


Solution

  • Write

    import qualified Prelude
    

    in addition to

    import Prelude hiding ((++))
    

    at the beginning of the code, and write Prelude.++ where you need ++ in Prelude.