<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Thanks, I didn't know about that list.</p>
    <p>I would be happy to document what I find out, though I'm sure
      other people would need to correct it.<br>
    </p>
    <p>-BenRI<br>
    </p>
    <div class="moz-cite-prefix">On 10/14/21 10:28 AM, Brandon Allbery
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAKFCL4WOtd0YE2ghWnd86Dw1dZSAEbKcQSSO-S7XWtBB7nghMw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">At this point you might want to ask on ghc-devs.
        They might ask you to document what you find out, though.</div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Thu, Oct 14, 2021 at 10:25
          AM Benjamin Redelings <<a
            href="mailto:benjamin.redelings@gmail.com"
            moz-do-not-send="true" class="moz-txt-link-freetext">benjamin.redelings@gmail.com</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div>
            <p>Thanks!  Yes, that introduces the idea that requires kind
              inference.</p>
            <p>Interestingly, it contains a (kind-aware) type-inference
              algorithm, but no kind inference algorithm!</p>
            <p>Perhaps kind-inference is considered too "obvious" to
              require an algorithm.  The closest it comes is the rule:</p>
            <p>C :: k' -> k   and   C' :: k'  => C C' :: k</p>
            <p>This is helpful, but it would probably be beneficial for
              better documentation to exist SOMEWHERE.<br>
            </p>
            <p>-BenRI<br>
            </p>
            <div>On 10/13/21 3:49 PM, Ingle, Apoorv N wrote:<br>
            </div>
            <blockquote type="cite"> Along with what Emil suggests, 
              <div>Sec 4. of A system of constructor classes:
                overloading and implicit higher-order polymorphism[1]
                may also be useful.</div>
              <div><br>
              </div>
              <div>— Apoorv</div>
              <div><br>
              </div>
              <div>[1]:  <a
                  href="http://web.cecs.pdx.edu/~mpj/pubs/fpca93.pdf"
                  target="_blank" moz-do-not-send="true"
                  class="moz-txt-link-freetext">http://web.cecs.pdx.edu/~mpj/pubs/fpca93.pdf</a> <br>
                <div><br>
                </div>
                <div><br>
                  <blockquote type="cite">
                    <div>On Oct 13, 2021, at 14:22, Emil Axelsson <<a
                        href="mailto:78emil@gmail.com" target="_blank"
                        moz-do-not-send="true"
                        class="moz-txt-link-freetext">78emil@gmail.com</a>>
                      wrote:</div>
                    <br>
                    <div>
                      <div>
                        <p>Maybe <a
href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.134.7274&rep=rep1&type=pdf"
                            target="_blank" moz-do-not-send="true">
                            Typing Haskell in Haskell</a> is what you're
                          looking for?<br>
                        </p>
                        <pre cols="72">/ Emil</pre>
                        <div>Den 2021-10-12 kl. 21:35, skrev Benjamin
                          Redelings:<br>
                        </div>
                        <blockquote type="cite"> Hi, <br>
                          <br>
                          1. I'm looking for resources that describe how
                          to implement kind Haskell 98 checking.  Does
                          anyone have any suggestions? <br>
                          <br>
                          * I've looked at the PolyKinds paper, but it
                          doesn't cover type classes. <br>
                          <br>
                          * I've looked at the source code to GHC, but
                          it is hard to follow for a variety of
                          reasons.  It isn't laid out like an algorithm
                          description, and the complexity to handle
                          options like PolyKinds and DataKinds makes the
                          code harder to follow. <br>
                          <br>
                          <br>
                          2. One question that came up is how to handle
                          type variables that are present in class
                          methods, but are not type class parameters. If
                          there are multiple types/classes in a single
                          recursive group, the kind of such type
                          variables might not be fully resolved until a
                          later type-or-class is processed.  Is there a
                          recommended approach? <br>
                          <br>
                          I can see two ways to proceed: <br>
                          <br>
                          i) First determine the kinds of all the data
                          types, classes, and type synonyms.  Then
                          perform a second pass over each type or class
                          to determine the kinds of type variables (in
                          class methods) that are not type class
                          parameters. <br>
                          <br>
                          ii) Alternatively, record the kind of each
                          type variable as it is encountered -- even
                          though such kinds may contain unification kind
                          variables.  After visiting all
                          types-or-classes in the recursive group,
                          replace any kind variables with their
                          definition, or with a * if there is no
                          definition. <br>
                          <br>
                          I've currently implement approach i), which
                          requires doing kind inference on class methods
                          twice.  Is this the recommended approach? <br>
                          <br>
                          <br>
                          3. Also, is Haskell 98 kind checking the same
                          as Haskell 2010 kind checking? <br>
                          <br>
                          -BenRI <br>
                          <br>
                          <br>
_______________________________________________ <br>
                          Haskell-Cafe mailing list <br>
                          To (un)subscribe, modify options or view
                          archives go to: <br>
                          <a
                            href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe"
                            target="_blank" moz-do-not-send="true"
                            class="moz-txt-link-freetext">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a>
                          <br>
                          Only members subscribed via the mailman list
                          are allowed to post.<br>
                        </blockquote>
                      </div>
                      _______________________________________________<br>
                      Haskell-Cafe mailing list<br>
                      To (un)subscribe, modify options or view archives
                      go to:<br>
                      <a
                        href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe"
                        target="_blank" moz-do-not-send="true"
                        class="moz-txt-link-freetext">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
                      Only members subscribed via the mailman list are
                      allowed to post.</div>
                  </blockquote>
                </div>
                <br>
              </div>
            </blockquote>
          </div>
          _______________________________________________<br>
          Haskell-Cafe mailing list<br>
          To (un)subscribe, modify options or view archives go to:<br>
          <a
            href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe"
            rel="noreferrer" target="_blank" moz-do-not-send="true"
            class="moz-txt-link-freetext">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
          Only members subscribed via the mailman list are allowed to
          post.</blockquote>
      </div>
      <br clear="all">
      <div><br>
      </div>
      -- <br>
      <div dir="ltr" class="gmail_signature">
        <div dir="ltr">
          <div>
            <div dir="ltr">
              <div>brandon s allbery kf8nh</div>
              <div><a href="mailto:allbery.b@gmail.com" target="_blank"
                  moz-do-not-send="true" class="moz-txt-link-freetext">allbery.b@gmail.com</a></div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
  </body>
</html>