nextPiece :: IO Piece
nextPiece = choiceOneOf pieces
    where choiceOneOf :: [a] -> IO a
          choiceOneOf xs = randomRIO (0, (length xs - 1)) >>= return . (xs !!)
nextPiece :: IO Piece
nextPiece = choiceOneOf pieces
    where choiceOneOf :: [a] -> IO a
          choiceOneOf xs = randomRIO (0, (length xs - 1)) >>= return . (xs !!)
nextPiece = choiceOneOf pieces
    where choiceOneOf :: [a] -> IO a
          choiceOneOf xs = randomRIO (0, (length xs - 1)) >>= return . (xs !!)