> OK, I think what you're saying is to work with (random) integers and use > fromEnum and toEnum to get corresponding DayOfWeek. But I get this when I > try to use toEnum: > > *Main> toEnum 2
ghci does not know what type of enum you want to create from the number 2. Try: toEnum 2 :: DayOfWeek That said, I would expect "toEnum 2" to give an error like: 'Ambiguous type variable `a'....'. So I am not sure why your error message says: '** Exception: Prelude.Enum.().toEnum: bad argument' _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe