<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Maybe <a moz-do-not-send="true"
href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.134.7274&rep=rep1&type=pdf">Typing
Haskell in Haskell</a> is what you're looking for?<br>
</p>
<pre class="moz-signature" cols="72">/ Emil</pre>
<div class="moz-cite-prefix">Den 2021-10-12 kl. 21:35, skrev
Benjamin Redelings:<br>
</div>
<blockquote type="cite"
cite="mid:34939fd9-e592-315a-114b-f1f6d1fef686@gmail.com">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 class="moz-txt-link-freetext" href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe">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>
</body>
</html>