[Haskell-beginners] Re: confusion about parameterized types.
Michael Litchard
michael at schmong.org
Mon Aug 30 12:55:04 EDT 2010
Okay, ski (of Freenode fame) helped me with the first problem. Now I
need to figure out how to use specific types.
given
> module Main where
> import System.Environment
> import PrepData
> data ProcessData =
> ProcessData { flatfile :: String
> , processfunc :: [String] -> Table StudentsOrActivities Value
> }
> main = undefined
and
> module PrepData where
> data Value = Cost Int | ID Int
> type Tname = String
> data StudentsOrActivities = Students String | Activities String
> data Table soa v = PopTable
> { tableName :: Tname
> , tableColumns :: [(soa, v)]
> } deriving (Show, Read)
> popStudents :: [String] -> Table Students ID
> popStudents flatFile = undefined
is it clear what I am trying to do in popStudents?
here's the error I get
PrepData.lhs:10:35:
Not in scope: type constructor or class `Students'
PrepData.lhs:10:44: Not in scope: type constructor or class `ID'
More information about the Beginners
mailing list