title: How do I make a container for a double a Semigroup?
body: <p>I am learning Haskell. Imagine I have the following:</p>
  <pre><code>data Coordinate = Coordinate double
  </code></pre>
  <p>I wish to implement a semigroup instance for <code>Coordinate</code>.</p>
  <pre><code>instance Semigroup (Coordinate a) where
    Coordinate a &lt;&gt; Coordinate b   =  Coordinate (a+b)
  </code></pre>
  <p>The typechecker is displeased at me:</p>
  <pre><code>    • Expected kind ‘* -&gt; *’, but ‘Coordinate’ has kind ‘*’
      • In the first argument of ‘Semigroup’, namely ‘(Coordinate a)’
        In the instance declaration for ‘Semigroup (Coordinate a)’
      |
  175 | instance (Num a) =&gt; Semigroup (Coordinate a) where
  </code></pre>
  <p>(I know that this is just an empty container for a double and I could already be using just the double itself, but I am learning Haskell and I would like to understand how this works.)</p>