我有下面的代碼,我只想從我的模塊中只導出sphereVolume和sphereArea函數。在haskell導入我們自己的模塊
module Geometry
(sphereVolume
, sphereArea
) where
sphereVolume :: Float -> Float
sphereVolume radius = (4.0/3.0) * pi * (radius^3)
sphereArea :: Float -> Float
sphereArea radius = 4 * pi * (radius^2)
cubeVolume :: Float -> Float
cubeVolume side = cuboidVolume side side side
cubeArea :: Float -> Float
cubeArea side = cuboidArea side side side
cuboidVolume :: Float -> Float -> Float -> Float
cuboidVolume a b c = rectangleArea a b * c
rectangleArea :: Float -> Float -> Float
rectangleArea a b = a * b
當我在寫ghci的我import Geometry
收到以下錯誤
<no location info>:
Could not find module `Geometry':
it is not a module in the current program, or in any known package
我確信他們是在同一個目錄和文件名相同的模塊。我在這裏錯過了什麼?