Data type field name from module I defined is "not in scope"
I have a Haskell file called Types.hs that contains this definition, among others: module Types ( KnapsackItem ) where data KnapsackItem = KnapsackItem { weight :: Int, cost :: Int } deriving (Show, Eq) Then there’s my Main.hs (also shortened here for simplicity): import Types evalTotal :: [KnapsackItem] -> [KnapsackItem] -> (Int, Int, String) evalTotal… Read More Data type field name from module I defined is "not in scope"