KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I explored System.Random.StdGen and saw this code in the source. data StdGen = StdGen Int32 Int32 It seems the module export StdGen too. module System.Random ( RandomGen(next, split, genRange) , StdGen ... However, why can't I do this in my code, say like, Prelude System.Random> StdGen 1 2 Not in scope: data constructor `System.Random.StdGen'** In the other hand, I can do this, module F (Foo) where import GHC.Int data Foo = Foo GHC.Int.Int32 GHC.Int.Int32 deriving (Show) and Prelude> Foo 1 2 Foo 1 2 Would someone please kindly tell me how actually this data constructor is hidden?
Tags (comma-separated)
Save Edits
Cancel