Document TypeInType (#11614)
AbandonedPublic

Authored by goldfire on Mar 11 2016, 10:51 AM.

Details

Reviewers
simonpj
austin
bgamari
Trac Issues
#11614
Summary

This should describe the new TypeInType feature for users.

Test Plan

Read it!

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Branch
wip/rae
Lint
Lint Skipped
Unit
Unit Tests Skipped
Build Status
Buildable 8725
Build 10770: arc lint + arc unit
goldfire updated this revision to Diff 6907.Mar 11 2016, 10:51 AM
goldfire retitled this revision from to Document TypeInType (#11614).
goldfire updated this object.
goldfire edited the test plan for this revision. (Show Details)
goldfire added reviewers: simonpj, austin, bgamari.
goldfire updated the Trac tickets for this revision.
bgamari edited edge metadata.Mar 12 2016, 9:43 AM

Thanks, this looks great!

Here are some comments from a read-through. If you 'd like to wait to handle these and merge this as-is that would be fine with me.

docs/users_guide/glasgow_exts.rst
134

It might be good to be a bit more clear that you can't use the *standard* Data.Maybe.Just constructor on an unboxed type; as-written I'm a bit concerned that the reader might mistakenly think that they couldn't define their own Maybe with unboxed contents.

145

It would be nice to either introduce TYPE before this point or refer the reader elsewhere for further discussion. In particular, it might be helpful to say that * is in fact TYPE 'PtrRepLifted so they understand how unboxed and boxed types are related in their kinds.

151

Nit: perhaps instead of "it is easy to see" say "it follows".

6879

I know you didn't write this, but I do wish that the names in this example were a bit less terse; Zero and Succ seem like reasonable compromises.

6905

It might be a good idea that we denote the promoted constructors with a tick as this hasn't been explicitly mentioned yet.

6934

This could be a bit clearer (and the commas are currently redundant). Perhaps,

We promote only `data types and newtypes; type synonyms and type/data families are not promoted (:ref:type-families`).

6947

This is a nice crisp explanation.

7051

Perhaps add a parenthetical "(where implicit parameters are denoted by braces)" to clear up any confusion.

7074

Is it possible to be a bit more precise here? Obviously the reader will need to see the section below for the full story, but perhaps just a couple sentences hitting the major points would be helpful.

7228

Could you add an index entry for CUSK? This should be something like,

.. index::
    single: CUSK
    single: complete user-supplied kind signature
7329

I wish there were an index entry and proper definition for "principal type".

7515

Thanks for writing this down.

7553

Perhaps this also deserves a mention in the release notes.

7558

Perhaps index entries for TYPE and runtime representation polymorphism would be appropriate here.

7580

Hmm, what happened to the indentation here?

7659

This should be -fprint-explicit-runtime-reps.

7822

Perhaps,

.. index::
    pair: Type equality constraints; kind heterogeneous
7825

Perhaps it would be more clear to say "kind-heterogeneous" here.

goldfire marked 16 inline comments as done.Mar 15 2016, 12:20 PM

Many thanks for read-through.

docs/users_guide/glasgow_exts.rst
145

I mentioned the bit about *, but see the reference to TYPE at the end of the paragraph.

7329

This would belong in a glossary, which would be a lovely new chapter in the manual. Other great candidates for inclusion there: "polymorphism", "lifted", "boxed", "dictionary", "heterogeneous", ...

7553

This isn't new, though. I just added some missing documentation for an already-existing feature.

7580

Nasty, nasty tabs. Go away, tabs!

goldfire marked 2 inline comments as done.Mar 15 2016, 12:25 PM

Couldn't quite figure out how to update this diff, given the somewhat involved git history. The new changes are in rGHC857e9b0231db80b838d78e341954d3e75db7e94b on my branch.

@goldfire, could you mark this diff as abandoned if all of the comments have been addressed? Thanks!

bgamari requested changes to this revision.Mar 24 2016, 4:32 AM
bgamari edited edge metadata.

Bumping from review queue.

This revision now requires changes to proceed.Mar 24 2016, 4:32 AM
goldfire abandoned this revision.Mar 25 2016, 4:05 PM