I am trying to export only a subset of the names from the Haskell module, but ghci gladly allows me to access even hidden names.
module Hiding (shown, calc) where
calc = shown * hidden
shown :: Int
shown = 3
hidden :: Int
hidden = 2
But when trying this in ghci I get:
Prelude> :l Hiding.hs
[1 of 1] Compiling Hiding ( Hiding.hs, interpreted )
Ok, modules loaded: Hiding.
*Hiding> hidden
2
What am I doing wrong?
(Edit: what is it worth, I am using ghci 6.12.3 on Arch Linux)
source
share