Gelly
Gelly

Reputation: 13

Unable to import modules in haskell

I'm really new to haskell, and I'm having a problem importing any modules whatsoever.

When I load an .hs file that contains nothing but

import Data.list

it gives me an error of

file.hs:1:8: parse error on input Data.list

I know I must be making a really basic error somewhere, because imports seem to be working for everyone else, even in all the tutorials. Is it because I've changed my directory with :cd? Or is it how my GHCi was downloaded?

Upvotes: 1

Views: 289

Answers (2)

Jonathan Fischoff
Jonathan Fischoff

Reputation: 1487

Modules start with capital letters

 import Data.List

Upvotes: 6

jamshidh
jamshidh

Reputation: 12060

Module names are capitalized.

Capitalize the word "List".

import Data.List

Upvotes: 3

Related Questions