
10 Sep
2014
10 Sep
'14
2:16 p.m.
Is this what you are looking for?
data Foo pl = Foo {
label :: pl -> String,
payload :: pl
}
On Wed, Sep 10, 2014 at 2:06 PM, martin
Hello all
if I have a record like
data Foo pl = Foo { label :: String, payload :: pl }
how can I create a similar type where I can populate label so it is not a plain string, but a function which operates on payload? Something like
label (Foo pl) = show pl
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners