
12 Dec
2011
12 Dec
'11
10:22 p.m.
Hi Allen,
Here's what I'm doing so far,
----------------
data ScrUple = ScrUple { xineramascreen :: Integer , workspace :: String } deriving (Show)
data ScrConfig = ScrConfig [ ScrUple ] deriving (Show)
s1 = ScrUple 0 "mail" s2 = ScrUple 1 "web"
ScrConfig sc1 =ScrConfig( [s2 s1] ) ;
sc1 = ScrConfig [s2, s1]
main = putStrLn $ show sc1[1]
main = putStrLn $ show sc1 To print just parts of a ScrConfig you'll probably want a helper function. Maybe something like: scPrint (ScrConfig sus) nth = show (sus !! nth) (it will make problems on out-of-bounds-indexes!) HTH, Thomas