Ernesto
Ernesto

Reputation: 139

Could not load my own modules in ghci haskell

i am trying to load a module called Point.hs into a file called Circle.hs by this way:

module Figures.Circle 
( Circle(..)
  , getArea
  , getPerimeter
) where

import qualified Figures.Point as P

here is my Point.hs file:

 module Figures.Point  
( Point(..)  
) where  

this is my directory´s tree:

and this is what ghci´s error says:

Circle.hs:7:1: error:
    Could not find module `Figures.Point'
    Locations searched:
      Figures\Point.hs
      Figures\Point.lhs
      Figures\Point.hsig
      Figures\Point.lhsig
  |
7 | import qualified Figures.Point as P

I follow this guide.

Upvotes: 0

Views: 274

Answers (1)

Noughtmare
Noughtmare

Reputation: 10645

I get the same error if I call ghci from within the Figures directory, that can be avoided by calling ghci from the parent directory, so ghci Figures\Circle.hs.

Upvotes: 1

Related Questions