Haskell Prelude Hiding, UNDO?

In one file, I need to use the usual prelude (++) operator, and I also want to implement my own behavior for (++). I used import Prelude hiding (++)the top of my file, defined my own (++) operator, and now below, I want to refer to the usual prelude (++). How to achieve this?

+5
source share
2 answers

Record

import qualified Prelude

in addition to

import Prelude hiding ((++))

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

+14
source

Tsuyoshi Ito, . , , (++), , , , , , .

: "abc" Prelude.++ "def" .

, <++> infix, ​​ `append`?

+4

All Articles