title: Haskell - Types, Enums, and Functions
body: <p>Good morning everyone,</p>
  
  <p>Here's what I'm working on today, and the issue I'm running in to:</p>
  
  <pre><code>--A
  data Row = A | B | C | D | E | F | G | H | I | J deriving (Enum, Ord, Show, Bounded, Eq, Read)
  data Column = One | Two | Three | Four | Five | Six | Seven | Eight | Nine | Ten  deriving (Enum, Ord, Show, Bounded, Eq, Read)
  --B
  data Address = Address Row Column deriving (Show, Read, Eq)
  </code></pre>
  
  <p>Then a few lines later I get to the problem child:</p>
  
  <pre><code>toAddress r c = Address(toEnum r, toEnum c)
  </code></pre>
  
  <p>I need to feed Address a Row and Column, but I need to turn r and c into Row and Column (not Ints)</p>
  
  <p>Obviously toAddress is not structured correctly to carry out this task. The requirement is as follows:</p>
  
  <blockquote>
    <p>Write a function toAddress that takes in a row and column, each in [0
    − 9]. Construct an Address and return it. Use toEnum to index into
    your Row and Column enums lists.</p>
  </blockquote>
  
  <p>Does anyone have any suggestions on how to accomplish what I'm going for here?</p>
  
  <p>Thank you!</p>