Hello, according to http://www.haskell.org/hierarchical-modules/libraries/ reference-libraries.html#MODULE-HEADER, each module should have a header which contains a line about portability. My question is, if a module is considered non-portable only if it contains non-portable constructs itself, or if a module is also non-portable if it just imports a module which is non-portable. Wolfgang
Wolfgang Jeltsch wrote:
[...] My question is, if a module is considered non-portable only if it contains non-portable constructs itself, or if a module is also non-portable if it just imports a module which is non-portable.
Both, otherwise stating the property "portable" wouldn't help very much. There are already a few examples in the hierarchical libraries, e.g.: http://cvs.haskell.org/cgi-bin/cvsweb.cgi/fptools/libraries/base/Data/STRef.... http://cvs.haskell.org/cgi-bin/cvsweb.cgi/fptools/libraries/base/Text/Read/L... Cheers, S.
Am Sonntag, 21. März 2004 12:36 schrieben Sie:
Wolfgang Jeltsch wrote:
[...] My question is, if a module is considered non-portable only if it contains non-portable constructs itself, or if a module is also non-portable if it just imports a module which is non-portable.
Both, otherwise stating the property "portable" wouldn't help very much.
Well, I discovered that ghci is able to load modules without the -fglasgow-exts option even if they rely on non-portable modules from the hierarchical libraries (like, e.g., Control.Monad.Reader). Is the exact meaning of portable/non-portable documented somewhere?
[...]
Wolfgang
Am Sonntag, 21. März 2004 12:36 schrieben Sie:
Wolfgang Jeltsch wrote:
[...] My question is, if a module is considered non-portable only if it contains non-portable constructs itself, or if a module is also non-portable if it just imports a module which is non-portable.
Both, otherwise stating the property "portable" wouldn't help very much.
Well, I discovered that ghci is able to load modules without the -fglasgow-exts option even if they rely on non-portable modules from the hierarchical libraries (like, e.g., Control.Monad.Reader).
Ultimately, *every* module depends on non-portable modules - somewhere it all has to come down to primitives, and these are wired into each compiler in some magic way. --KW 8-)
Am Montag, 22. März 2004 12:46 schrieben Sie:
Am Sonntag, 21. März 2004 12:36 schrieben Sie:
Wolfgang Jeltsch wrote:
[...] My question is, if a module is considered non-portable only if it contains non-portable constructs itself, or if a module is also non-portable if it just imports a module which is non-portable.
Both, otherwise stating the property "portable" wouldn't help very much.
Well, I discovered that ghci is able to load modules without the -fglasgow-exts option even if they rely on non-portable modules from the hierarchical libraries (like, e.g., Control.Monad.Reader).
Ultimately, *every* module depends on non-portable modules - somewhere it all has to come down to primitives, and these are wired into each compiler in some magic way.
But then Sven Panne's comment would mean that every module has to be documented as non-portable.
--KW 8-)
Wolfgang
participants (3)
-
Keith Wansbrough -
Sven Panne -
Wolfgang Jeltsch