mgsloan (Michael Sloan)
User

Projects

User does not belong to any projects.

User Details

User Since
Mar 7 2016, 7:11 PM (122 w, 5 d)

Recent Activity

Sat, Jul 7

mgsloan updated the diff for D4904: Add "make ghci-start", which runs a ghci that can load compiler + ghci.
  • Remove the last remnants of Makefile changes
Sat, Jul 7, 10:52 PM
mgsloan added a comment to D4904: Add "make ghci-start", which runs a ghci that can load compiler + ghci.

@bgamari Please take a look. I've switched it over to using _GHC_TOP_DIR + top level shell scripts instead of Makefile targets. This seems better than how it was.

Sat, Jul 7, 10:51 PM
mgsloan updated the diff for D4904: Add "make ghci-start", which runs a ghci that can load compiler + ghci.
  • Add a comment in findTopDir about _GHC_TOP_DIR env var
Sat, Jul 7, 10:49 PM
mgsloan updated the diff for D4904: Add "make ghci-start", which runs a ghci that can load compiler + ghci.
  • _GHC_TOP_DIR to specify top dir + use scripts instead of makefile
Sat, Jul 7, 10:42 PM
mgsloan added a comment to D4912: Fix handling of ApplicativeDo in TH AST quotes.

Glad I gave this approach a whirl, I think this is much cleaner 👍

Sat, Jul 7, 9:24 PM
mgsloan updated the diff for D4912: Fix handling of ApplicativeDo in TH AST quotes.

Instead of undoing ApplicativeDo in DsMeta, don't apply the transform within TH brackets

Sat, Jul 7, 9:23 PM
mgsloan added a comment to D4904: Add "make ghci-start", which runs a ghci that can load compiler + ghci.

Thanks @goldfire ! Yeah, I'm pretty stoked about it. As mentioned elsewhere, this makes development far more enjoyable. I'm often getting something like a 10 or 15 second iteration time between saving a file, reloading the compiler, and getting a nested GHCi with which to try out the new behavior.

Sat, Jul 7, 9:15 PM
mgsloan added a comment to D4912: Fix handling of ApplicativeDo in TH AST quotes.

That's a compelling idea. To be honest, though, I'm not sure of the ramifications of that decision, not being familiar enough with ApplicativeDo. Are there programs that would type-check that shouldn't? Programs that are rejected that shouldn't?

Sat, Jul 7, 9:05 PM

Fri, Jul 6

mgsloan added a comment to D4923: Fix handling of unbound constructor names in TH #14627.

Thanks for the feedback and diff approval!

Fri, Jul 6, 7:16 PM

Thu, Jul 5

mgsloan added a comment to D4923: Fix handling of unbound constructor names in TH #14627.

I have been doing some unrelated work using TH recently, and this unbound var stuff is quite a deviation from how TH used to work.

Thu, Jul 5, 2:35 AM

Wed, Jul 4

mgsloan added a comment to D4925: Add module export reification + add lookup of Module imports #10391.

I've realized that we'll also want a way to query a list of names for top level definitions from before the current splice. This is quite different from reifying exports, but kinda similar. The current situation with reifyModule having different semantics for thisModule vs others seems quite analogous. I propose:

Wed, Jul 4, 2:53 PM
mgsloan added a comment to D4925: Add module export reification + add lookup of Module imports #10391.

I'm unclear on the design here. Why do we need lookupImportedModule? It looks like, currently, the TH client is expected to build a Module directly by using the Module constructor. Why does this change?

Wed, Jul 4, 2:10 AM
mgsloan updated the diff for D4925: Add module export reification + add lookup of Module imports #10391.
  • Add explicit import list and tycon hiding to test for T10391
Wed, Jul 4, 2:10 AM
mgsloan updated the diff for D4925: Add module export reification + add lookup of Module imports #10391.
  • Add explicit import list and tycon hiding to test for T10391
Wed, Jul 4, 1:52 AM
mgsloan updated the diff for D4925: Add module export reification + add lookup of Module imports #10391.
  • Removed implementation of lookupImportedModule
Wed, Jul 4, 1:52 AM

Tue, Jul 3

mgsloan added a comment to D4912: Fix handling of ApplicativeDo in TH AST quotes.

@goldfire Welcome, thanks for reviewing! I don't think that this suggests we should have a better AST for TH, because I don't think ApplicativeDo structures should be visible to TH. The logic here is modeled closely after the ppr logic.

Tue, Jul 3, 11:41 PM
mgsloan added a comment to D4923: Fix handling of unbound constructor names in TH #14627.

@goldfire Thanks for reviewing!

Tue, Jul 3, 11:35 PM
mgsloan added a comment to D4914: Fail instead of panic-ing when qAddTopDecls has conversion error.

Thanks for reviewing, Richard! I think I have made a change which addresses your inline comment.

Tue, Jul 3, 11:35 PM
mgsloan updated the diff for D4914: Fail instead of panic-ing when qAddTopDecls has conversion error.
  • Better error message for addTopDecls conversion errors
Tue, Jul 3, 11:34 PM
mgsloan updated the diff for D4923: Fix handling of unbound constructor names in TH #14627.
  • Add a comment clarifying use of vcName
Tue, Jul 3, 11:22 PM
mgsloan added a comment to D4926: Add a broken test for lingering state from TH unique names #9693.

@sighingnow Ah, good catch! Not sure how that snuck in there. Some notes while I was poking around the code trying to figure out how to easily add some functions like parseExp :: String -> Q Exp :)

Tue, Jul 3, 1:07 AM
mgsloan updated the diff for D4926: Add a broken test for lingering state from TH unique names #9693.

Remove unintentionally added file "th-parse-notes.md"

Tue, Jul 3, 1:06 AM

Mon, Jul 2

mgsloan added a comment to D4926: Add a broken test for lingering state from TH unique names #9693.

@sighingnow Thanks for reviewing. Please take a look at https://ghc.haskell.org/trac/ghc/ticket/9693 . Reproducing this problem requires modifying the code and reloading into ghci.

Mon, Jul 2, 9:47 PM
mgsloan retitled D4926: Add a broken test for lingering state from TH unique names #9693 from Add a broken test for #9693 to Add a broken test for lingering state from TH unique names #9693.
Mon, Jul 2, 9:16 PM
mgsloan updated the diff for D4926: Add a broken test for lingering state from TH unique names #9693.

Update commit message

Mon, Jul 2, 9:15 PM
mgsloan created D4926: Add a broken test for lingering state from TH unique names #9693.
Mon, Jul 2, 9:13 PM
mgsloan added a comment to D4923: Fix handling of unbound constructor names in TH #14627.

One thing to note is that to get this expected output, https://phabricator.haskell.org/D4914 needs to be merged first.

Mon, Jul 2, 8:12 PM
mgsloan created D4925: Add module export reification + add lookup of Module imports #10391.
Mon, Jul 2, 7:59 PM
mgsloan added a comment to D4914: Fail instead of panic-ing when qAddTopDecls has conversion error.

@bgamari "qAddTopDecls" isn't an implementation detail, since it's exposed by the TH API as a method of the Quasi typeclass. addTopDecls is just a wrapper that forces the monad to be Q.

Mon, Jul 2, 5:52 PM
mgsloan updated the diff for D4914: Fail instead of panic-ing when qAddTopDecls has conversion error.
  • Improve message text when qAddTopDecls encounters a conversion error
Mon, Jul 2, 5:52 PM
mgsloan created D4923: Fix handling of unbound constructor names in TH #14627.
Mon, Jul 2, 5:26 PM
mgsloan added a comment to D4904: Add "make ghci-start", which runs a ghci that can load compiler + ghci.

Having a GHC_TOP_DIR environment variable makes sense. Would it be useful otherwise? Was the leading underscore intentional?

Mon, Jul 2, 5:19 PM
mgsloan added a comment to D4904: Add "make ghci-start", which runs a ghci that can load compiler + ghci.

@bgamari Thanks for reviewing! I've updated it with some changes that I've found convenient. It now sets "args" such that running "main" will default to running a nested GHCi with a script that changes the prompt to indicate that it is the inner GHCi. Otherwise I found it easy to forget if you're in the inner or outer GHC.

Mon, Jul 2, 5:12 PM
mgsloan updated the diff for D4904: Add "make ghci-start", which runs a ghci that can load compiler + ghci.
  • Have "make ghci-load" default args so that "main" runs an inner ghci
  • Add documentation in the Makefile and switch to make ARGS parameter
Mon, Jul 2, 5:01 PM

Sun, Jul 1

mgsloan created D4914: Fail instead of panic-ing when qAddTopDecls has conversion error.
Sun, Jul 1, 3:07 AM

Sat, Jun 30

mgsloan updated the summary of D4912: Fix handling of ApplicativeDo in TH AST quotes.
Sat, Jun 30, 3:36 AM
mgsloan created D4912: Fix handling of ApplicativeDo in TH AST quotes.
Sat, Jun 30, 3:35 AM

Fri, Jun 29

mgsloan added a comment to D1979: Add support for ImplicitParams and RecursiveDo in TH.

It may be worthwhile to attempt to leave the PrelNames ids unchanged. When switching to and from this branch I'm getting errors like

Fri, Jun 29, 5:31 PM
mgsloan added a comment to D1979: Add support for ImplicitParams and RecursiveDo in TH.

@RyanGlScott Thanks for reviewing! I've added haddocks for the Stmt constructors.

Fri, Jun 29, 4:51 PM
mgsloan updated the diff for D1979: Add support for ImplicitParams and RecursiveDo in TH.

Haddock updates

Fri, Jun 29, 4:51 PM
mgsloan updated the diff for D4907: Fix bug involving finding hole fits in TH splices (Trac #15321).

Rebase onto master rather than basing off my not-yet-merged changes

Fri, Jun 29, 5:53 AM
mgsloan updated the diff for D1979: Add support for ImplicitParams and RecursiveDo in TH.

Fix ID overlap issue by adding 100 to some PrelNames

Fri, Jun 29, 5:50 AM
mgsloan abandoned D4908: Catch and report errors during hole fitting.

I'm abandoning this revision for now, because I think that putting some fine-grained catching within findValidHoleFits would be better. Here's some discussion on trac for context: https://ghc.haskell.org/trac/ghc/ticket/15321#comment:4

Fri, Jun 29, 5:22 AM
mgsloan created D4908: Catch and report errors during hole fitting.
Fri, Jun 29, 4:44 AM
mgsloan added a comment to D4907: Fix bug involving finding hole fits in TH splices (Trac #15321).

Note that for convenience, I had my other patches merged on that branch - https://phabricator.haskell.org/D1979 and https://phabricator.haskell.org/D4904 . Not sure how this interacts with phabricator.

Fri, Jun 29, 2:37 AM
mgsloan updated the diff for D4907: Fix bug involving finding hole fits in TH splices (Trac #15321).

Decided to include module locals when in RunSplice stage. No use of this currently I think, but I think this choice makes more sense

Fri, Jun 29, 2:35 AM
mgsloan created D4907: Fix bug involving finding hole fits in TH splices (Trac #15321).
Fri, Jun 29, 2:27 AM

Thu, Jun 28

mgsloan updated the diff for D1979: Add support for ImplicitParams and RecursiveDo in TH.

Remove "reifyPred = reifyType" and just use "reifyType" in "reifyCxt"

Thu, Jun 28, 10:39 PM
mgsloan added a comment to D1979: Add support for ImplicitParams and RecursiveDo in TH.

Hey guys, it's been a while. Really sorry for abandoning this and not iterating on it until now. I finally made the time and prioritization to get back to this. A big part of it was the appeal of being able to use GHCi for development of GHC - https://phabricator.haskell.org/D4904 .

Thu, Jun 28, 10:32 PM
mgsloan updated the diff for D1979: Add support for ImplicitParams and RecursiveDo in TH.
  • Rebased atop ~2 years worth of changes
Thu, Jun 28, 10:28 PM
mgsloan retitled D4904: Add "make ghci-start", which runs a ghci that can load compiler + ghci from Add "make run-ghci", which runs a ghci that can load compiler + ghci to Add "make ghci-start", which runs a ghci that can load compiler + ghci.
Thu, Jun 28, 6:57 PM
mgsloan added a comment to D4904: Add "make ghci-start", which runs a ghci that can load compiler + ghci.

Note that there is some prior conversation about this change on github - https://github.com/ghc/ghc/pull/154 - but this differential supersedes that PR.

Thu, Jun 28, 6:51 PM
mgsloan updated the diff for D4904: Add "make ghci-start", which runs a ghci that can load compiler + ghci.
  • Better name for the top_dir workaround + comment
  • Use "ghci-load" and "ghci-start" targets instead of "load-ghci" and "run-ghci"
Thu, Jun 28, 6:43 PM
mgsloan updated the summary of D4904: Add "make ghci-start", which runs a ghci that can load compiler + ghci.
Thu, Jun 28, 6:20 PM
mgsloan created D4904: Add "make ghci-start", which runs a ghci that can load compiler + ghci.
Thu, Jun 28, 6:18 PM

Apr 27 2016

mgsloan added a comment to D1979: Add support for ImplicitParams and RecursiveDo in TH.

Pinging @goldfire , I realize you're busy. It's fine to get this in post 8.0. How's it look? I believe I've addressed your feedback adequately. Perhaps other than that one spot where I do sort_by_loc, blindly emulating neighboring code that does something very similar.

Apr 27 2016, 6:04 PM

Mar 10 2016

mgsloan added a comment to D1979: Add support for ImplicitParams and RecursiveDo in TH.

Thanks for the quick and insightful feedback, @goldfire ! Not sure how I omitted the IParamT stuff, good catch.

Mar 10 2016, 2:33 AM
mgsloan updated the diff for D1979: Add support for ImplicitParams and RecursiveDo in TH.
  • Improve error handling for TH ImplicitParams
  • Make TH RecursiveDo test less fragile
  • Use a type syn for IPName instead of newtype
  • Add a test for invalid IP names in TH
  • Fix a couple warnings in hsSyn/Convert.hs
  • Fix syntax of a haddock comment
  • Add TH support for ImplicitParams constraints
  • Clarify message when IP binds used in wrong place
  • Update haddock style on IPBindD constructor
Mar 10 2016, 2:25 AM
mgsloan updated the diff for D1979: Add support for ImplicitParams and RecursiveDo in TH.
  • Improve error handling for TH ImplicitParams
  • Make TH RecursiveDo test less fragile
  • Use a type syn for IPName instead of newtype
  • Add a test for invalid IP names in TH
  • Fix a couple warnings in hsSyn/Convert.hs
  • Fix syntax of a haddock comment
  • Add TH support for ImplicitParams constraints
  • Clarify message when IP binds used in wrong place
Mar 10 2016, 2:07 AM
mgsloan updated the diff for D1979: Add support for ImplicitParams and RecursiveDo in TH.
  • Improve error handling for TH ImplicitParams
  • Make TH RecursiveDo test less fragile
  • Use a type syn for IPName instead of newtype
  • Add a test for invalid IP names in TH
  • Fix a couple warnings in hsSyn/Convert.hs
  • Fix syntax of a haddock comment
  • Add TH support for ImplicitParams constraints
  • Clarify message when IP binds used in wrong place
Mar 10 2016, 2:05 AM
mgsloan updated the diff for D1979: Add support for ImplicitParams and RecursiveDo in TH.

Addresses goldfire's feedback

Mar 10 2016, 1:45 AM

Mar 7 2016

mgsloan retitled D1979: Add support for ImplicitParams and RecursiveDo in TH from to Add support for ImplicitParams and RecursiveDo in TH.
Mar 7 2016, 7:36 PM