haskell - Syntax for importing methods of type classes -


i noticed ghc doesn't complain if import (or export) methods of type classes directly:

import prelude (signum) 

as opposed using "constructor" syntax:

import prelude (num(signum)) 

because of this, assumed former syntax ok , went it. however, ran odd issue frominteger, former syntax doesn't work -- ghc accept silently, complain later frominteger never exported in first place. did happen stumble upon unspecified behavior in language?

here's minimal test case:

-- a.hs module (frominteger) import prelude (frominteger)  -- b.hs module b import prelude () import f = frominteger 


Comments

Popular posts from this blog

c# - Unity IoC Lifetime per HttpRequest for UserStore -

Change the color of an oval at click in Java AWT -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -