andrewthad (Andrew Thaddeus Martin)
User

Projects

User does not belong to any projects.

User Details

User Since
Mar 28 2016, 7:32 AM (133 w, 1 d)

Recent Activity

Sep 15 2018

andrewthad accepted D5149: base: Add bangs to GHC.IO.Handle.Text hGet* functions.

Thanks for doing this! This looks good to me.

Sep 15 2018, 6:40 AM

Jul 12 2018

andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal. This is proposal 13 on the ghc-proposals repo and is fully described there..

The tests are now passing. I still need to deal with type families, data families, and levity-polymorphic newtypes.

Jul 12 2018, 7:20 AM
andrewthad added inline comments to D4777: Implement the Unlifted Newtypes proposal. This is proposal 13 on the ghc-proposals repo and is fully described there..
Jul 12 2018, 7:19 AM
andrewthad updated the diff for D4777: Implement the Unlifted Newtypes proposal. This is proposal 13 on the ghc-proposals repo and is fully described there..
  • UnliftedNewtypes works on vanilla newtypes and GADT-style newtypes
Jul 12 2018, 7:16 AM
andrewthad added inline comments to D4777: Implement the Unlifted Newtypes proposal. This is proposal 13 on the ghc-proposals repo and is fully described there..
Jul 12 2018, 6:59 AM
andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal. This is proposal 13 on the ghc-proposals repo and is fully described there..

Good to know. Locally, I've changed decideNewtypeKind to not use isNewTyCon, and this looks like its working now. I've still got a ways to go, but at least vanilla newtypes look like they are behaving correctly.

Jul 12 2018, 6:23 AM

Jul 11 2018

andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal. This is proposal 13 on the ghc-proposals repo and is fully described there..

I've realized that I must horribly misunderstand what exactly isNewTyCon does. Either that, or I've messed up something else pretty badly. In the test suite, recall that I have a newtype named Darth:

Jul 11 2018, 10:54 AM
andrewthad added inline comments to D4777: Implement the Unlifted Newtypes proposal. This is proposal 13 on the ghc-proposals repo and is fully described there..
Jul 11 2018, 7:54 AM

Jul 5 2018

andrewthad added inline comments to D4777: Implement the Unlifted Newtypes proposal. This is proposal 13 on the ghc-proposals repo and is fully described there..
Jul 5 2018, 8:17 AM
andrewthad added a comment to D4936: Rebase. Prevent cusk detection when unlifted newtypes is used without a kind signature..

Sorry. This was created by accident. Anyone who can close or delete this should feel free to do so.

Jul 5 2018, 8:16 AM
andrewthad updated the diff for D4777: Implement the Unlifted Newtypes proposal. This is proposal 13 on the ghc-proposals repo and is fully described there..

Rebase and stop inferring cusk when unlifted newtypes are used without a kind signature

Jul 5 2018, 8:16 AM
andrewthad added inline comments to D4777: Implement the Unlifted Newtypes proposal. This is proposal 13 on the ghc-proposals repo and is fully described there..
Jul 5 2018, 8:16 AM
andrewthad created D4936: Rebase. Prevent cusk detection when unlifted newtypes is used without a kind signature..
Jul 5 2018, 8:16 AM

Jul 4 2018

andrewthad added inline comments to D4777: Implement the Unlifted Newtypes proposal. This is proposal 13 on the ghc-proposals repo and is fully described there..
Jul 4 2018, 12:31 PM
andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal. This is proposal 13 on the ghc-proposals repo and is fully described there..

I've made some more changes. There was a check for undetermined type variables that I had to disable to get past the error I mentioned previously. However, now, when the test suite is run, GHC think that Foo, Darth, and Pat have kind TYPE 'LiftedRep. So, somewhere in the typechecker, those kind variables are getting unified with TYPE 'LiftedRep before I get a chance to unify them with the kind of the underlying type. Alternatively, it's possible that my attempt to unify them with the kind of the underlying type doesn't actually work and they get unified with TYPE 'LiftedRep at some point after this.

Jul 4 2018, 9:03 AM
andrewthad updated the diff for D4777: Implement the Unlifted Newtypes proposal. This is proposal 13 on the ghc-proposals repo and is fully described there..
  • suppress undetermined-type-variable when UnliftedNewtypes is on. still not working, but closer
Jul 4 2018, 9:03 AM

Jul 3 2018

andrewthad added a comment to D4924: Add a strict version of foldMap to Foldable.

I'm pretty sure you don't need a bang pattern on acc when you use foldl'. Also, <> is preferable to mappend here, since SMP has happened.

Jul 3 2018, 5:13 AM

Jun 25 2018

andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal. This is proposal 13 on the ghc-proposals repo and is fully described there..

I'm now getting the following error in stage2:

Jun 25 2018, 10:16 AM
andrewthad updated the diff for D4777: Implement the Unlifted Newtypes proposal. This is proposal 13 on the ghc-proposals repo and is fully described there..
  • try unifying newtype kinds differently
Jun 25 2018, 9:53 AM

Jun 4 2018

andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal. This is proposal 13 on the ghc-proposals repo and is fully described there..

I've added a function decideNewtypeKinds. I thought it would eliminate the kind variables introduced by newMetaKindVar (by unifying it with the kind of the type inside of the newtype), but it does not work as I expected.

Jun 4 2018, 9:52 AM
andrewthad updated the diff for D4777: Implement the Unlifted Newtypes proposal. This is proposal 13 on the ghc-proposals repo and is fully described there..
  • tried to get the fresh kind variable to unify with the kind of the type inside the newtype. it did not work correctly.
Jun 4 2018, 9:52 AM
andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal. This is proposal 13 on the ghc-proposals repo and is fully described there..

Maybe I just need to modify kcTyClDecl. One thing that isn't clear to me is how to tell GHC that I want to attempt to unify two kinds. I think that should be all I need to add to kcTyClDecl.

Jun 4 2018, 7:26 AM
andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal. This is proposal 13 on the ghc-proposals repo and is fully described there..

I'd like some confirmation that I'm on the right path. This code doesn't currently work for anything except GADTs with a kind signature, and even for those I think it accepts bad programs. I'm trying to support kind inference when the user writes something like:

Jun 4 2018, 7:13 AM
andrewthad updated the diff for D4777: Implement the Unlifted Newtypes proposal. This is proposal 13 on the ghc-proposals repo and is fully described there..
  • generate fresh kind variable for newtypes
Jun 4 2018, 7:13 AM

Jun 3 2018

andrewthad updated the diff for D4777: Implement the Unlifted Newtypes proposal. This is proposal 13 on the ghc-proposals repo and is fully described there..
  • improve test for UnliftedNewtypes
  • add test for gadt without kind sig
Jun 3 2018, 9:40 AM
andrewthad added a comment to D4777: Implement the Unlifted Newtypes proposal. This is proposal 13 on the ghc-proposals repo and is fully described there..

All I've done so far is allow newtypes (vanilla or GADT-style) over types that are not kinded TYPE 'LiftedRep. Things from the proposal that I still need to implement and test are:

Jun 3 2018, 8:28 AM
andrewthad updated the diff for D4777: Implement the Unlifted Newtypes proposal. This is proposal 13 on the ghc-proposals repo and is fully described there..

Diff against the correct commit.

Jun 3 2018, 8:28 AM
andrewthad created D4777: Implement the Unlifted Newtypes proposal. This is proposal 13 on the ghc-proposals repo and is fully described there..
Jun 3 2018, 8:28 AM

Mar 26 2018

andrewthad added inline comments to D4472: Implement a memchr wrapper: searchByteArray.
Mar 26 2018, 8:52 AM

Mar 25 2018

andrewthad added inline comments to D4472: Implement a memchr wrapper: searchByteArray.
Mar 25 2018, 1:18 PM

Mar 8 2018

andrewthad added a comment to D4485: Compacted arrays are pinned for isByteArrayPinned#.

Looks good to me. Thanks for doing this!

Mar 8 2018, 5:06 AM

Mar 6 2018

andrewthad added inline comments to D4472: Implement a memchr wrapper: searchByteArray.
Mar 6 2018, 6:43 AM
andrewthad updated the diff for D4472: Implement a memchr wrapper: searchByteArray.
  • nearly correct implementation
Mar 6 2018, 6:43 AM

Mar 5 2018

andrewthad created D4472: Implement a memchr wrapper: searchByteArray.
Mar 5 2018, 8:53 PM
andrewthad added a comment to D4465: Implement -dword-hex-literals.

I've clarified where the note is found.

Mar 5 2018, 6:59 PM
andrewthad updated the diff for D4465: Implement -dword-hex-literals.
  • clarify in what file Word Hex Literals note is found
Mar 5 2018, 6:59 PM
andrewthad added a comment to D4465: Implement -dword-hex-literals.

I've improved the documentation around the new code. Simon, let me know if this adequately addresses your comments.

Mar 5 2018, 7:31 AM
andrewthad updated the diff for D4465: Implement -dword-hex-literals.
  • improve documentation of -dword-hex-literals in source code
Mar 5 2018, 7:29 AM

Mar 4 2018

andrewthad added a comment to D4465: Implement -dword-hex-literals.

I should probably mention the effect on error messages in the user manual as well.

Mar 4 2018, 5:38 PM
andrewthad updated the diff for D4465: Implement -dword-hex-literals.

document -dhex-word-literals in ghc user manual

Mar 4 2018, 5:37 PM
andrewthad added a comment to D4465: Implement -dword-hex-literals.

I've added a note to the description about the effect on error messages.

Mar 4 2018, 5:19 PM
andrewthad updated the summary of D4465: Implement -dword-hex-literals.
Mar 4 2018, 5:18 PM
andrewthad added a comment to D4465: Implement -dword-hex-literals.

That’s a good point about having an effect on error meassages. Let me know if I should change this behavior or if I should leave it as is.

Mar 4 2018, 4:55 AM

Mar 3 2018

andrewthad added a comment to D4465: Implement -dword-hex-literals.

As an example of what this does, consider the following haskell file Literals.hs:

Mar 3 2018, 12:28 PM
andrewthad created D4465: Implement -dword-hex-literals.
Mar 3 2018, 12:22 PM

Feb 8 2018

andrewthad added a comment to D4399: Move Data.Functor.Contravariant from the contravariant package to base..

Checked off more boxes.

Feb 8 2018, 7:52 PM
andrewthad added a comment to D4399: Move Data.Functor.Contravariant from the contravariant package to base..

Everything's been done. Thanks for the thorough review Ryan!

Feb 8 2018, 7:49 PM
andrewthad updated the diff for D4399: Move Data.Functor.Contravariant from the contravariant package to base..
  • put a period at the end of the docs for defaultComparison
Feb 8 2018, 7:48 PM
andrewthad added a comment to D4399: Move Data.Functor.Contravariant from the contravariant package to base..

Checked off more changes.

Feb 8 2018, 7:47 PM
andrewthad added a comment to D4399: Move Data.Functor.Contravariant from the contravariant package to base..

I've implemented most of requested changes. As I was checking them off, I realized there were several that I missed, so I'm going to push another differential addressing those.

Feb 8 2018, 7:42 PM
andrewthad updated the diff for D4399: Move Data.Functor.Contravariant from the contravariant package to base..

update manual, update changelog, use more GND and more laziness, update to fit into the post-Semigroup-Monoid-Proposal world

Feb 8 2018, 7:33 PM
andrewthad added a comment to D4399: Move Data.Functor.Contravariant from the contravariant package to base..

I think I finally got the differential right. Third time's a charm.

Feb 8 2018, 6:21 PM
andrewthad updated the diff for D4399: Move Data.Functor.Contravariant from the contravariant package to base..

Update the differential to start at the first commit.

Feb 8 2018, 6:19 PM
andrewthad updated the diff for D4399: Move Data.Functor.Contravariant from the contravariant package to base..

Move Data.Functor.Contravariant from the contravariant package to base.

Feb 8 2018, 6:18 PM
andrewthad created D4399: Move Data.Functor.Contravariant from the contravariant package to base..
Feb 8 2018, 6:05 PM

Aug 25 2017

andrewthad added a comment to D3825: Levity polymorphic Backpack..

If it does blow anything up, I'll find out soon.

Aug 25 2017, 7:44 AM

Mar 28 2016

andrewthad added a comment to D2051: Add Data.Functor.Classes instances for Proxy (trac issue #11756).

Ah, I was running arc diff HEAD^ and arc diff --update D2051 HEAD^. That explains it. Thanks!

Mar 28 2016, 10:42 AM
andrewthad updated the diff for D2051: Add Data.Functor.Classes instances for Proxy (trac issue #11756).

Rebased again, added trac number to changelog

Mar 28 2016, 10:35 AM
andrewthad added a comment to D2051: Add Data.Functor.Classes instances for Proxy (trac issue #11756).

Thanks for the helpful explanation. I've messed up the diff again, so I'm going to fix that. It seems like I need to rebase and squash all my commits every time I make a change. Is that the typical workflow when using phabricator/arcanist, or does one of those tools have a feature that can automatically rebase for you?

Mar 28 2016, 10:33 AM
andrewthad updated the diff for D2051: Add Data.Functor.Classes instances for Proxy (trac issue #11756).

Added docs for Proxy's new instances

Mar 28 2016, 10:28 AM
andrewthad added a comment to D2051: Add Data.Functor.Classes instances for Proxy (trac issue #11756).

@RyanGlScott I've squashed the commits, so now it looks like the right diff is showing up in phabricator. Also, I've added to the changelog.

Mar 28 2016, 10:17 AM
andrewthad updated the diff for D2051: Add Data.Functor.Classes instances for Proxy (trac issue #11756).

Squashed commits to make the right diff show up in phabricator. Also,
add an entry to the changelog.

Mar 28 2016, 10:13 AM
andrewthad retitled D2051: Add Data.Functor.Classes instances for Proxy (trac issue #11756) from to Add Data.Functor.Classes instances for Proxy (trac issue #11756).
Mar 28 2016, 9:15 AM