
Hi, when I try to use import like these: import System.Random import Control.Monad I get this error: "Syntax error in input (unexpected keyword "import")". Can you tell me why this happens and how I can fix it? Thanks..

Hi, It is difficult to see why here without the context. Could you paste your code on hpaste.org? Adrien On 19/02/2012 20:50, bahadýr altan wrote:
Hi, when I try to use import like these: import System.Random import Control.Monad
I get this error: "Syntax error in input (unexpected keyword "import")". Can you tell me why this happens and how I can fix it? Thanks..
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners

Perhaps because you put the imports in the middle of your code? imports must be the very first thing at the top of a module. -Brent On Sun, Feb 19, 2012 at 09:56:27PM +0100, Adrien Haxaire wrote:
Hi,
It is difficult to see why here without the context. Could you paste your code on hpaste.org?
Adrien
On 19/02/2012 20:50, bahadýr altan wrote:
Hi, when I try to use import like these: import System.Random import Control.Monad
I get this error: "Syntax error in input (unexpected keyword "import")". Can you tell me why this happens and how I can fix it? Thanks..
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners

Hi, it's hard to see without context, but I'd expect you have misplaced the imports. The imports go between the module header and your first top level definition. Hope this helps, Andreas On 19:50 Sun 19 Feb , bahadýr altan wrote:
Hi, when I try to use import like these: import System.Random import Control.Monad
I get this error: "Syntax error in input (unexpected keyword "import")". Can you tell me why this happens and how I can fix it? Thanks..
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners
participants (4)
-
Adrien Haxaire
-
Andreas Baldeau
-
bahadýr altan
-
Brent Yorgey