title: Constructing concrete types for typeclasses with GADTs
body: <p>The inspiration for this is creating a list of values that are instances of <code>Show</code>. I found the following snippet that uses GADTs to create a concrete <code>Showable</code> type.</p>
  
  <pre><code>data Showable where Showable :: Show a =&gt; a -&gt; Showable
  
  instance Show Showable where
      show (Showable x) = show x
  
  list :: [Showable]
  list = [Showable 4, Showable "hello", Showable 'a']
  </code></pre>
  
  <p>Then, I tried to make <code>Showable</code> more general by creating a type that could make any typeclass concrete.</p>
  
  <pre><code>data Concrete a where Concrete :: a b =&gt; b -&gt; Concrete a
  
  instance Show (Concrete Show) where
      show (Concrete x) = show x
  
  list :: [Concrete Show]
  list = [Concrete 4, Concrete "hello", Concrete 'a']
  </code></pre>
  
  <p>This works with the ConstraintKinds and FlexibleInstances language extensions, but in order to use <code>Concrete</code> to make concrete types for other typeclasses, each one would require a new instance.</p>
  
  <p>Is there a way to create something similar to <code>Concrete</code> such that, for example, <code>Concrete Show</code> is automatically an instance of <code>Show</code>?</p>