Personal tools

Talk:Import

From HaskellWiki

(Difference between revisions)
Jump to: navigation, search
(added code tag)
m (No details on "full" import)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
  +
=== Multiple Imports of the same Module ===
  +
 
Recently on Haskell-Cafe, the topic of imports came up. I noticed this page does not detail the ability to import the same module multiple times under different conditions. Here's an example:
 
Recently on Haskell-Cafe, the topic of imports came up. I noticed this page does not detail the ability to import the same module multiple times under different conditions. Here's an example:
   
Line 11: Line 13:
   
 
I'm not sure if this is exclusive to GHC, or whether it's H98. If it's the latter, then it should probably be on this page. If it's the former, it may still be good to have here.
 
I'm not sure if this is exclusive to GHC, or whether it's H98. If it's the latter, then it should probably be on this page. If it's the former, it may still be good to have here.
  +
  +
  +
=== Prelude ===
  +
  +
At the bottom of the page, we could add these links for people interested in not importing prelude or importing an alternative version of it:
  +
  +
* [[Prelude]]
  +
* [[No_import_of_Prelude|FAQ: No import of Prelude]]
  +
  +
[[User:Tanimoto|tanimoto]] 14:52, 16 September 2008 (UTC)
  +
  +
== No details on "full" import ==
  +
  +
I mean import Mod( C(..) )
  +
  +
See e.g. http://www.haskell.org/onlinereport/modules.html 5.3.1
  +
  +
--[[User:Qrilka|Qrilka]] 08:12, 25 October 2011 (UTC)

Latest revision as of 08:12, 25 October 2011

[edit] 1 Multiple Imports of the same Module

Recently on Haskell-Cafe, the topic of imports came up. I noticed this page does not detail the ability to import the same module multiple times under different conditions. Here's an example:

module Main where
 
import qualified Prelude as P
import Prelude ((++),show,($))
 
main = P.putStrLn (show $ P.length $ [1] ++ [2,3])

I'm not sure if this is exclusive to GHC, or whether it's H98. If it's the latter, then it should probably be on this page. If it's the former, it may still be good to have here.


[edit] 2 Prelude

At the bottom of the page, we could add these links for people interested in not importing prelude or importing an alternative version of it:

tanimoto 14:52, 16 September 2008 (UTC)

[edit] 3 No details on "full" import

I mean import Mod( C(..) )

See e.g. http://www.haskell.org/onlinereport/modules.html 5.3.1

--Qrilka 08:12, 25 October 2011 (UTC)