[Haskell-beginners] confusion about parameterized types.

Michael Litchard michael at schmong.org
Mon Aug 30 12:15:03 EDT 2010


Here is a record I defined

> module PrepData where
> data Value = Cost Int | ID Int
> type Tname = String
> data StudentsOrActivites = Students String | Activities String
> data Table soa v = PopTable
>       { tableName :: Tname
>       , tableColumns :: [(soa, v)]
>       } deriving (Show, Read)

I'm trying to define another record in terms of Table

> data ProcessData =
>    ProcessData { flatfile :: String
>                , processfunc :: String ->


what I would like processfunc to be is a function that takes a String
and returns a Table. The type variables are tripping me up. Could
someone help me work out the syntax, and the clarifying of my intent?


More information about the Beginners mailing list