andrewthad (Andrew Thaddeus Martin)
User

Projects

User does not belong to any projects.

User Details

User Since
Mar 28 2016, 7:32 AM (190 w, 4 h)

Recent Activity

Sat, Oct 26

Marge Bot <ben+marge-bot@smart-cactus.org> committed rGHC8916e64e5437: Implement shrinkSmallMutableArray# and resizeSmallMutableArray#. (authored by andrewthad).
Implement shrinkSmallMutableArray# and resizeSmallMutableArray#.
Sat, Oct 26, 4:20 AM

Oct 8 2019

Marge Bot <ben+marge-bot@smart-cactus.org> committed rGHC6a5c249d54d5: [skip ci] clarify what unsound means (authored by andrewthad).
[skip ci] clarify what unsound means
Oct 8 2019, 12:26 PM
Marge Bot <ben+marge-bot@smart-cactus.org> committed rGHC0d41325917f7: [skip ci] make the table better (authored by andrewthad).
[skip ci] make the table better
Oct 8 2019, 12:26 PM
Marge Bot <ben+marge-bot@smart-cactus.org> committed rGHC0c7a5bcd9c01: [skip ci] can not -> may not (authored by andrewthad).
[skip ci] can not -> may not
Oct 8 2019, 12:26 PM
Marge Bot <ben+marge-bot@smart-cactus.org> committed rGHCa70db7bf0e1b: [skip ci] link to foreign cmm call (authored by andrewthad).
[skip ci] link to foreign cmm call
Oct 8 2019, 12:25 PM
Marge Bot <ben+marge-bot@smart-cactus.org> committed rGHC77f3ba23b9fd: Rephrase a bunch of things in the unlifted ffi types documentation. Add a… (authored by andrewthad).
Rephrase a bunch of things in the unlifted ffi types documentation. Add a…
Oct 8 2019, 12:25 PM
Marge Bot <ben+marge-bot@smart-cactus.org> committed rGHC9ac3bcbb3605: Document the UnliftedFFITypes extension. (authored by andrewthad).
Document the UnliftedFFITypes extension.
Oct 8 2019, 12:25 PM

Sep 14 2019

andrewthad committed rGHC046ca1335681: Add predicates for testing if IOError is ResourceVanished. (authored by andrewthad).
Add predicates for testing if IOError is ResourceVanished.
Sep 14 2019, 5:26 AM

Jun 14 2019

Marge Bot <ben+marge-bot@smart-cactus.org> committed rGHCeffdd9480569: Implement the -XUnliftedNewtypes extension. (authored by andrewthad).
Implement the -XUnliftedNewtypes extension.
Jun 14 2019, 9:48 AM

Jun 7 2019

Marge Bot <ben+marge-bot@smart-cactus.org> committed rGHCd3915b304f29: [skip ci] Improve the documentation of the CNF primops. In this context, the… (authored by andrewthad).
[skip ci] Improve the documentation of the CNF primops. In this context, the…
Jun 7 2019, 9:29 AM

Jun 4 2019

Marge Bot <ben+marge-bot@smart-cactus.org> committed rGHCdb78ac6f5d69: Use a better strategy for determining the offset applied to foreign function… (authored by andrewthad).
Use a better strategy for determining the offset applied to foreign function…
Jun 4 2019, 12:15 AM

Apr 21 2019

Marge Bot <ben+marge-bot@smart-cactus.org> committed rGHC0e96d1205905: [skip ci] correct the docs for casArray a little more. clarify that the… (authored by andrewthad).
[skip ci] correct the docs for casArray a little more. clarify that the…
Apr 21 2019, 8:19 AM
Marge Bot <ben+marge-bot@smart-cactus.org> committed rGHC3aefc14a0771: [skip ci] correct formatting of casArray# in docs for casSmallArray# (authored by andrewthad).
[skip ci] correct formatting of casArray# in docs for casSmallArray#
Apr 21 2019, 8:19 AM
Marge Bot <ben+marge-bot@smart-cactus.org> committed rGHC98bffb079d0c: [skip ci] say "machine words" instead of "Int units" in the primops docs (authored by andrewthad).
[skip ci] say "machine words" instead of "Int units" in the primops docs
Apr 21 2019, 8:19 AM
Marge Bot <ben+marge-bot@smart-cactus.org> committed rGHC3e963de3775c: improve docs for casArray and casSmallArray (authored by andrewthad).
improve docs for casArray and casSmallArray
Apr 21 2019, 8:19 AM

Apr 2 2019

Marge Bot <ben+marge-bot@smart-cactus.org> committed rGHCea192a0932c6: base: Add documentation that liftA2 used to not be a typeclass method (authored by andrewthad).
base: Add documentation that liftA2 used to not be a typeclass method
Apr 2 2019, 11:52 PM

Mar 26 2019

andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

This has already been moved to gitlab.

Mar 26 2019, 10:52 AM

Feb 13 2019

andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

Some long overdue responses to Ryan's comments:

Feb 13 2019, 8:26 PM

Feb 6 2019

andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

Sorry, that was supposed to be *have*. Does anyone *have* any more feedback on this?

Feb 6 2019, 8:39 AM
andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

Does anyone have any more feedback on this? I'm not aware of any outstanding issues that need to be addressed.

Feb 6 2019, 8:38 AM

Feb 2 2019

andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

I fixed a panic that could be triggered by a multi-field type with a CUSK (added a test for this as well). I've added a note about what's going on in tcConDecl. I rewrote the bottom part of the note for kcConDecl since I realized that kcConDecl would never actually be called on the example I gave. I believe I've now cross-referenced all the notes in appropriate places, but let me know if I've missed any of them.

Feb 2 2019, 6:48 AM
andrewthad updated the diff for D4777: Implement the Unlifted Newtypes proposal.
  • Improve outdated notes, cross reference more, quit using panic before validity check happens.
Feb 2 2019, 6:42 AM

Feb 1 2019

andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

Marking a few old comments as done.

Feb 1 2019, 7:53 AM

Jan 29 2019

andrewthad added inline comments to D4777: Implement the Unlifted Newtypes proposal.
Jan 29 2019, 8:53 AM
andrewthad updated the diff for D4777: Implement the Unlifted Newtypes proposal.
  • use MCoercion in tcConDecl with unlifted newtypes
Jan 29 2019, 8:18 AM
andrewthad updated the diff for D4777: Implement the Unlifted Newtypes proposal.
  • Handle all three types of data constructors when dealing with kind-checking the field of an unlifted newtype
Jan 29 2019, 7:34 AM

Jan 28 2019

andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

@simonpj The note with a high-level overview is Implementation of UnliftedNewtypes, found in compiler/typecheck/TcTyClsDecls.hs. I've updated the note to be more accurate.

Jan 28 2019, 9:23 AM
andrewthad updated the diff for D4777: Implement the Unlifted Newtypes proposal.
  • improve notes, update notes, rename decideNewtypeKind to unifyNewtypeKind
Jan 28 2019, 9:12 AM

Jan 27 2019

andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

@goldfire I've implemented your suggestion. I picked the variant of it that didn't involve nesting solveEqualities. The error message we get for UnliftedNewtypesMismatchedKind is now excellent, especially because we can feed Just ... as the first argument to unifyKind. If @simonpj has a cleaner idea for how to accomplish this check in tcConDecl, I can switch to that. All tests are currently passing. I need to update some of the notes.

Jan 27 2019, 1:43 PM
andrewthad updated the diff for D4777: Implement the Unlifted Newtypes proposal.
  • Remove commented out garbage. Allow solving before checking coercion type in tcConDecl. Include original type in error message.
Jan 27 2019, 1:38 PM
andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

So, the problem was that I didn't actually do checks in tcConDecl to make sure that the kind of the type of the field in a newtype matched what was expected. I've added this check for GADT-style declarations. All it requires is checking that the kind of the field matches the kind of res_ty. I've written a note in the code requesting a little feedback.

Jan 27 2019, 10:26 AM
andrewthad updated the diff for D4777: Implement the Unlifted Newtypes proposal.
  • correctly check that the field in an unlifted newtype matches the expected kind
Jan 27 2019, 10:18 AM

Jan 26 2019

andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

I've nearly got this fixed. I've broken the following:

Jan 26 2019, 2:52 PM
andrewthad updated the diff for D4777: Implement the Unlifted Newtypes proposal.
  • kind check the field in a newtype to ensure that it matches what the data type expects
Jan 26 2019, 2:48 PM
andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

The naive solution I attempted actually makes a bunch of tests fail. I'm looking into other options.

Jan 26 2019, 12:10 PM
andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

I've done the simplest thing to make this work: running kcLTyClDecl on all the cusk_decls. This makes Ryan's data type fail to typecheck, but the error message is the impenetrable:

Jan 26 2019, 11:28 AM
andrewthad updated the diff for D4777: Implement the Unlifted Newtypes proposal.
  • start performing kcConDecl checks on the data constructors of types with cusks
Jan 26 2019, 11:19 AM
andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

Oh, I see the problem. We only call kcLTyClDecl on no_cusk_decls. For cusk_decls, the path we follow never ends up calling unifyNewtypeKind. I think I know where to fix this.

Jan 26 2019, 10:39 AM
andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

I agree that T should be rejected. I am surprised that this wasn't caught by an existing test. I've added a test locally, and this patch does indeed currently accept T. I'm looking into this.

Jan 26 2019, 10:01 AM

Jan 25 2019

andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

I've beefed up the UnliftedNewtypesDifficultUnification test with the examples that @goldfire provided. The errors appear to be as expected.

Jan 25 2019, 1:21 PM
andrewthad updated the diff for D4777: Implement the Unlifted Newtypes proposal.
  • beef up difficult unification test
Jan 25 2019, 1:19 PM
andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

That appears to do it. I've added the proposed additional check. It works, and all tests now pass. The error message on UnliftedNewtypesInfinite is better now as well.

Jan 25 2019, 9:19 AM
andrewthad updated the diff for D4777: Implement the Unlifted Newtypes proposal.
  • add another check for reflexive coercions
Jan 25 2019, 9:18 AM

Jan 21 2019

andrewthad added a comment to D4472: Implement a memchr wrapper: searchByteArray.

I'm going to migrate this over to gitlab. Feel free to close this.

Jan 21 2019, 2:37 PM
andrewthad added a comment to D5466: Reduce indirections and allocations in event manager..

Certainly. This was just at attempt to write out some stuff I'd been musing about. I stuck it up here so that I couldn't accidentally delete it. If there's some kind of way to close a differential on phabricator so that you're able to see what's still being actively worked on, feel free to close this one.

Jan 21 2019, 8:42 AM

Jan 19 2019

andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

@goldfire I've done what you suggested in decideNewtypeKind, and I've reverted the changes I made that let unravelFamInstPats accept casts. However, there's a problem. In tcDataFamHeader, we have two options for what to do when the user doesn't use GADT-style syntax to provide a type signature for a newtype instance. We've discussed these briefly in the comments already. We can invent a fresh metavar, or we can reuse the LHS result kind. Currently, I've reverted to using the LHS result kind, since the problems it has are less bad.

Jan 19 2019, 5:54 PM
andrewthad updated the diff for D4777: Implement the Unlifted Newtypes proposal.
  • beef up the UnliftedNewtypesUnassociatedFamily test
  • cross-referencing in more notes about UnliftedNewtypes
  • improve kind unification for newtype instances a little bit, breaks different tests
Jan 19 2019, 5:32 PM

Jan 11 2019

andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

And I just missed that one as well. Sorry, my previous comment was in response to the one before your last one, not your last one.

Jan 11 2019, 3:49 PM
andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

Sorry, I just now saw your comment Richard. I had already made the appropriate change to kcConDecl, but that turned out to not be enough. To see why, consider the trace output I was looking at earlier:

Jan 11 2019, 3:48 PM
andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

I've made coerce and coerce# the same function. All comments about documentation of coerce# and about the rewrite rules stuff are now moot, so I have marked them complete. All tests now pass. I still need to do a few documentation things. Could @goldfire or @simonpj confirm that what I have done in unravelFamInstPats is sound?

Jan 11 2019, 3:24 PM
andrewthad updated the diff for D4777: Implement the Unlifted Newtypes proposal.
  • add test for VTA on coerce
Jan 11 2019, 2:22 PM
andrewthad updated the diff for D4777: Implement the Unlifted Newtypes proposal.
  • remove coerceLiftedKey
Jan 11 2019, 2:13 PM
andrewthad updated the diff for D4777: Implement the Unlifted Newtypes proposal.
  • Collapsed coerce# and coerce back into one function. Make sure all typechecker tests pass.
Jan 11 2019, 2:11 PM
andrewthad updated the diff for D4777: Implement the Unlifted Newtypes proposal.
  • make unravelFamInstPats accept a type with a cast. remove a trace statement that caused the compiler to hang.
Jan 11 2019, 11:24 AM
andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

Wait a second. What's this?!:

Jan 11 2019, 10:15 AM
andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

Hmmm... in tcDataFamHeader's doppelganger, tcTyFamInstEqnGuts, we find this telling comment:

Jan 11 2019, 9:13 AM
andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

I've confirmed that the fix I suggested does work. But I feel like the other solution (inventing a metavar) should work too. I analyzed it wrong above. In particular, UnliftedNewtypesDifficultUnification.D:R:Interpret[0] is a coercion. Here's where I think the real problem may be:

Jan 11 2019, 9:07 AM
andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

Ah, that's good to know. I've now gotten to the bottom (or very close to the bottom) of it. Over in tcDataFamHeader, unravelFamInstPats was misbehaving. But, it only misbehaves because it's receiving a bad type:

Jan 11 2019, 8:25 AM

Jan 10 2019

andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

Ah, I had assumed the loop while tracing was something I had done, but you're right that it was already present. I found the bad trace statement and removed it. I figured out where this panic is happening, but I don't understand how to stop it. At some point during typechecking, we call checkUserTypeError on the data constructor. Here it is with some extra trace statements I've added:

Jan 10 2019, 10:01 AM

Jan 9 2019

andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

I've fixed the panic coming from the typeable machinery. But there's another panic that is more difficult to track down. If I use GADT syntax to provide a kind signature in UnliftedNewtypesDifficultUnification, I get the error I expect:

Jan 9 2019, 4:15 PM
andrewthad updated the diff for D4777: Implement the Unlifted Newtypes proposal.
  • improve some of the typechecking code. remove some unneeded imports. all a data for data families that have a type family in the result kind.
Jan 9 2019, 4:06 PM
andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

Nevermind, it looks like there's some additional filtering that happens in todoForTyCons. I'll keep looking.

Jan 9 2019, 2:06 PM
andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

The only check I see in TcTypeable.hs to figure out what to generate Typeable bindings for is needs_typeable_binds. But that cannot be the full picture. Totday, GHC already correctly rejects:

Jan 9 2019, 2:05 PM
andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

It gets worse! We can get the same exact problem without any data families. Behold:

Jan 9 2019, 11:16 AM
andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

I've clarified the effect of UnliftedNewtypes on CUSK determination in the user guide. I've cleaned up the typechecking code some, implementing some of Richard's suggestions. I've added a test UnliftedNewtypesDifficultUnification, which currently fails with a panic. We get a different (and likely more meaningful) panic when we remove the last line of this test. With the last line removed, we have:

Jan 9 2019, 10:46 AM
andrewthad updated the diff for D4777: Implement the Unlifted Newtypes proposal.
  • specify the impact of UnliftedNewtypes on CUSKs in the users manual
  • improve some of the typechecking code. remove some unneeded imports. all a data for data families that have a type family in the result kind.
Jan 9 2019, 10:17 AM

Jan 7 2019

andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

Good catch. I've added T15883 and UnliftedNewtypesForall to confirm that trac ticket Trac #15883 is resolved.

Jan 7 2019, 3:32 PM
andrewthad updated the diff for D4777: Implement the Unlifted Newtypes proposal.
  • add two tests to confirm that 15883 is resolved
Jan 7 2019, 3:31 PM
andrewthad updated the Trac tickets for D4777: Implement the Unlifted Newtypes proposal.
Jan 7 2019, 10:11 AM
andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

I've made several changes involving feeding in result kinds to kcConDecl and adding kind checks back to newtypes when UnliftedNewtypes is enabled. However, UnliftedNewtypesUnifySig is still failing.

Jan 7 2019, 10:11 AM
andrewthad updated the diff for D4777: Implement the Unlifted Newtypes proposal.
  • add UnliftedNewtypesUnifySig test
  • use fresh metavar in tcDataFamHeader
  • add back more kind checks when UnliftedNewtypes in enabled
  • feed more result kinds into kcConDecl
Jan 7 2019, 9:38 AM

Jan 5 2019

andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

I've added some more tests and made some very minor improvements to docs. Currently failing test are:

Jan 5 2019, 1:48 PM
andrewthad updated the diff for D4777: Implement the Unlifted Newtypes proposal.
  • several documentation-related fixes, additional tests, remove MagicHash extension from modules that do not need it
Jan 5 2019, 1:15 PM

Jan 4 2019

andrewthad added inline comments to D4777: Implement the Unlifted Newtypes proposal.
Jan 4 2019, 9:16 AM
andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

No worries! Since I plan on using this feature, I'd like for it to be correct 😄. Thanks for all the feedback.

Jan 4 2019, 9:09 AM

Jan 3 2019

andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

I've added a new test UnliftedNewtypesLevityBinder. I wasn't actually expecting it to pass, but it does. Good job Richard and Simon for being so thorough with the levity-polymorphism checks! I think this is ready to merge if there are no further concerns.

Jan 3 2019, 9:27 AM
andrewthad updated the diff for D4777: Implement the Unlifted Newtypes proposal.
  • add a test to ensure that a levity-polymorphic newtype does not let us subvert the levity-polymorphic binder check
Jan 3 2019, 9:23 AM

Dec 28 2018

andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

I have added more notes, one explaining coerce vs coerce# and one giving a high-level overview of the implementation of UnliftedNewtypes. Anyone please let me know if there are any comments I overlooked or if there is anything else that needs clarification or correction.

Dec 28 2018, 12:41 PM
andrewthad updated the diff for D4777: Implement the Unlifted Newtypes proposal.
  • Give a broad overview of the implementation of UnliftedNewtypes
Dec 28 2018, 12:35 PM
andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

I've been poking around in TcHsType trying to fix this, but I haven't made any headway. I'll just leave this in its moderately broken state for now. I think we're still supposed to open issues on trac up until the migration, but I'm not sure.

Dec 28 2018, 11:02 AM

Dec 27 2018

andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

I've added a test UnliftedNewtypesGnd the checks that generalized newtype deriving works. Surprisingly, it does. But, it only works when the runtime representation is fixed. For example, if instead of

Dec 27 2018, 9:00 PM
andrewthad updated the diff for D4777: Implement the Unlifted Newtypes proposal.
  • add some more tests
  • provide example
Dec 27 2018, 8:49 PM
andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

I've addressed most of the issues that Simon brought up. There's still one place where I need to add a concrete example. I've implemented David's suggestion to add a little magic that effectively inlines the lifted coerce into coerce# @'LiftedRep whenever it sees it in the LHS of a rule. T2110 still passes, and we no longer get warnings when coerce is used in the LHS of a rule, so this appears to work correctly. I've moved coerce into GHC.Base, so I was able to revert all the places where I changed coerce to coerce#.

Dec 27 2018, 7:50 PM
andrewthad updated the diff for D4777: Implement the Unlifted Newtypes proposal.
  • allow coerce in the LHS of rewrite rules
Dec 27 2018, 4:18 PM

Dec 24 2018

andrewthad added inline comments to D4777: Implement the Unlifted Newtypes proposal.
Dec 24 2018, 10:50 AM
andrewthad updated the diff for D4777: Implement the Unlifted Newtypes proposal.
  • add more documentation
Dec 24 2018, 10:47 AM
andrewthad updated the diff for D5466: Reduce indirections and allocations in event manager..
  • more changes
Dec 24 2018, 6:26 AM

Dec 21 2018

andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

Since coerce inlines to coerce# in every phase, we only need rules whose LHS mentions coerce#. That should be sufficient to cover both cases. It's an slight inconvenience to library maintainers though because it means that you need CPP to have the LHS say mapFoo coerce on older GHCs and mapFoo coerce# on newer ones.

Dec 21 2018, 1:50 PM
andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

Oh, and GHC.Base now no longer exports coerce. I'm not sure if this is a problem or if this module is even expected to provide a stable API.

Dec 21 2018, 1:24 PM
andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

Also, this most recent change infecting a lot more modules than I thought it would. I changed most occurrences of coerce in base to coerce# because I'm not sure if these other modules are allowed to depend on Data.Coerce, and I was looking for a safe option.

Dec 21 2018, 1:23 PM
andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

It turns out that Data.Coerce was really the only place it could go. One small wrinkle I noticed is that I now get a warning from containers;

Dec 21 2018, 1:21 PM
andrewthad updated the diff for D4777: Implement the Unlifted Newtypes proposal.
  • split up coerce# and coerce
Dec 21 2018, 1:20 PM
andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

I'm convinced by the symmetry argument. I'll rename the identifier in GHC.Prim to coerce# and then define the lifted coerce in GHC.Exts.

Dec 21 2018, 12:27 PM
andrewthad updated the diff for D4777: Implement the Unlifted Newtypes proposal.
  • update documentation and factor out mkTemplateKindVar
Dec 21 2018, 12:24 PM
andrewthad updated subscribers of D4777: Implement the Unlifted Newtypes proposal.

Responding to @dfeuer, I could go either way on the coerce vs coerce/coerce# thing. I'm not particularly worried about it being a breaking change, and I lean slightly in the direction of just having one function instead of two. That's the way it was discussed in https://ghc.haskell.org/trac/ghc/ticket/13595 and on the unlifted newtypes proposal. Since this is a question about a change to base's API, @ekmett or @RyanGlScott will need to make the call.

Dec 21 2018, 10:12 AM
andrewthad updated the diff for D4777: Implement the Unlifted Newtypes proposal.
  • clean up extraneous trace statements
Dec 21 2018, 10:04 AM
andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

Nevermind, I've figured out how to change the title and linked tickets. Let me know if anything else is missing or could be adjusted.

Dec 21 2018, 9:56 AM
andrewthad retitled D4777: Implement the Unlifted Newtypes proposal from Implement the Unlifted Newtypes proposal. This is proposal 13 on the ghc-proposals repo and is fully described there. to Implement the Unlifted Newtypes proposal.
Dec 21 2018, 9:54 AM
andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal.

Thanks for the feedback. I've tried to address all of the concerns, and I've added a test to confirm that compilation fails with a good error message when the user does not enable the extension. I'm struggling to figure out how to change the title of the diff and the linked trac tickets though.

Dec 21 2018, 9:52 AM
andrewthad updated the diff for D4777: Implement the Unlifted Newtypes proposal.
  • add an entry to the users guide for UnliftedNewtypes
  • add an entry to the changelog for base documenting the new type signature of coerce
  • document UnliftedNewtypes in the release notes
  • add test to ensure that unlifted newtypes are rejected when the extension is disabled
  • add mkTemplateKiTyVar to avoid incomplete uni patterns
Dec 21 2018, 9:44 AM