27 lines
597 B
Haskell
Executable File
27 lines
597 B
Haskell
Executable File
-- Splat into global namespace
|
|
import Data.List
|
|
|
|
-- Splat specific items into global namespace
|
|
import Data.List (nub, sort)
|
|
|
|
-- Splat everything but specific items
|
|
import Data.List hiding (nub)
|
|
|
|
-- Import, but not in global namespace
|
|
import qualified Data.List
|
|
|
|
-- Import, but not in global namespace, but with alias
|
|
import qualified Data.List as L
|
|
|
|
-- In Geometry.hs
|
|
module Geometry (
|
|
sphereVolume,
|
|
cubeArea -- exported functions
|
|
) where
|
|
|
|
sphereVolume :: Float -> Float
|
|
sphereVolume radius = (4.0 / 3.0) * pi * (radius ^ 3)
|
|
|
|
cubeVolume :: Float -> Float
|
|
cubeVolume side = side * side * side
|