mgsloan (Michael Sloan)
User

Projects

User does not belong to any projects.

User Details

User Since
Mar 7 2016, 7:11 PM (133 w, 1 d)

Recent Activity

Sun, Sep 2

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

Great, thanks for taking a look @RyanGlScott !

Sun, Sep 2, 11:26 PM

Sat, Sep 1

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

@RyanGlScott Hey! Sorry for the delay. Finally found some cycles to iterate on this. I've just added one line to the release notes, I figure may as well keep it concise, since users can consult the template-haskell changelog / API.

Sat, Sep 1, 4:44 PM
mgsloan updated the diff for D1979: Add support for ImplicitParams and RecursiveDo in TH.
  • Add release note for TH support for implicit params + mdo
Sat, Sep 1, 4:41 PM

Aug 21 2018

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

Yep, this is on my TODOs - sorry for the delay but got busy with other
things. Hopefully will have a spare cycle soon

Aug 21 2018, 1:56 PM

Jul 28 2018

mgsloan updated the diff for D5015: Use -fobject-code in the GHCi script for loading GHC.
  • Shorter name for ghc-in-ghci output dir
Jul 28 2018, 7:17 PM
mgsloan added a comment to D5015: Use -fobject-code in the GHCi script for loading GHC.

Nevermind, with many substantial changes to GHC's code, -fobject-code is needed to for it to load. So, this change should definitely be made to the scripts.

Jul 28 2018, 7:10 PM
mgsloan added a comment to D5015: Use -fobject-code in the GHCi script for loading GHC.

Ah, indeed, it looks like when you run ghci without -fobject-code, but there are objects present from a prior run with -fobject-code, then it works. This is actually rather nice, because GHCi is much faster when generating bytecode instead of object code.

Jul 28 2018, 4:28 PM

Jul 27 2018

mgsloan updated the summary of D5015: Use -fobject-code in the GHCi script for loading GHC.
Jul 27 2018, 11:42 PM
mgsloan updated subscribers of D5015: Use -fobject-code in the GHCi script for loading GHC.

Pinging @alpmestan / @bgamari . My bad for breaking the script with my last update (removal of -fobject-code). On the brightside, setting odir and hidir this way is much better.

Jul 27 2018, 7:15 PM
mgsloan created D5015: Use -fobject-code in the GHCi script for loading GHC.
Jul 27 2018, 7:15 PM
mgsloan added a comment to D4986: Modifications to support loading GHC into GHCi.

Woohoo!! Thanks for merging, @bgamari!

Jul 27 2018, 12:57 PM
mgsloan added a comment to D4904: Add a script for running a ghci that can load and run ghc.

Awesome, thanks for merging @bgamari ! Note that for this script to work properly, https://phabricator.haskell.org/D4986 needs to be merged as well. In the meantime one can remove -ighc and :load Main, and it should work at least for loading the compiler code, but you won't be able to run GHC inside of GHCi without the changes in 4986.

Jul 27 2018, 12:46 PM

Jul 26 2018

mgsloan updated the diff for D4904: Add a script for running a ghci that can load and run ghc.
  • Remove -fobject-code as it is not always wanted
Jul 26 2018, 5:35 PM

Jul 25 2018

mgsloan added a comment to D4904: Add a script for running a ghci that can load and run ghc.

Awesome, thanks a bunch for the guidance! I will work on this soon,
hopefully sometime tomorrow

Jul 25 2018, 4:46 AM
mgsloan added a comment to D4904: Add a script for running a ghci that can load and run ghc.

I can add such a test. Where should a test like that go?

Jul 25 2018, 4:30 AM
mgsloan added a comment to D4986: Modifications to support loading GHC into GHCi.

Lol.. That's what I get for trying to do too many things at once late at night.

Jul 25 2018, 4:23 AM
mgsloan updated the diff for D4986: Modifications to support loading GHC into GHCi.

Fix another 2 AM typo...

Jul 25 2018, 4:21 AM
mgsloan added a comment to D4986: Modifications to support loading GHC into GHCi.

I believe that should fix it, though I must admit I haven't run it through a full make yet. Perhaps I can leave that up to harbormaster? Not familiar with whether I can rely on CI or not.

Jul 25 2018, 4:16 AM
mgsloan updated the diff for D4986: Modifications to support loading GHC into GHCi.

Update spelling of NoImplicitPrelude

Jul 25 2018, 4:15 AM
mgsloan added a comment to D4986: Modifications to support loading GHC into GHCi.

Ah good catch! That's what I get for only testing this in ghci ;)

Jul 25 2018, 4:14 AM
mgsloan added a comment to D4986: Modifications to support loading GHC into GHCi.

Maybe I'm not seeing it because I'm tired, but how come you needed to add all those NoImplicitPreludes and import Preludes ?

Jul 25 2018, 3:31 AM
mgsloan updated the diff for D4986: Modifications to support loading GHC into GHCi.

Add default-extensions: NoImplicitPrelude to some cabal files, remove use of pragmas

Jul 25 2018, 3:29 AM

Jul 23 2018

mgsloan updated subscribers of D4986: Modifications to support loading GHC into GHCi.

@bgamari @alpmestan Please let me know if there is anything I can do to help get this merged!

Jul 23 2018, 7:16 PM
mgsloan added a comment to D4904: Add a script for running a ghci that can load and run ghc.

@bgamari @alpmestan Please let me know if there is anything I can do to help get this merged!

Jul 23 2018, 7:16 PM

Jul 19 2018

mgsloan updated the diff for D4904: Add a script for running a ghci that can load and run ghc.

Fix a --restart path typo

Jul 19 2018, 7:11 AM
mgsloan updated the diff for D4904: Add a script for running a ghci that can load and run ghc.
Jul 19 2018, 7:11 AM
mgsloan added a comment to D4914: Fail instead of panic-ing when qAddTopDecls has conversion error.

@goldfire Ah, right you are! Not sure quite why I didn't previously see something as obvious as that, I guess I must have forgotten that the solution there no longer encountered the error during conversion.

Jul 19 2018, 6:23 AM
mgsloan updated the diff for D4914: Fail instead of panic-ing when qAddTopDecls has conversion error.
  • Add a test for addTopDecls not panicing
Jul 19 2018, 6:23 AM
mgsloan added a comment to D1979: Add support for ImplicitParams and RecursiveDo in TH.

I have pushed an update to this which modifies a few less of the THNames, and entirely avoids modifying compiler/prelude/PrelNames.hs. I found that I needed to do a clean make when switching to this branch. It would work, but it's pretty ugly to break incrementality like that. That not working may indicate a deeper issue, but that is out of scope for this diff.

Jul 19 2018, 4:46 AM
mgsloan updated the diff for D1979: Add support for ImplicitParams and RecursiveDo in TH.

Avoid changing PrelNames ids

Jul 19 2018, 4:46 AM
mgsloan abandoned D4907: Fix bug involving finding hole fits in TH splices (Trac #15321).

https://phabricator.haskell.org/D4909 is a simpler fix for this. While this is more efficient, not sure if the complexity is worth its weight, so abandoning the revision.

Jul 19 2018, 1:58 AM
mgsloan retitled D4904: Add a script for running a ghci that can load and run ghc from Add "make ghci-start", which runs a ghci that can load compiler + ghci to Add a script for running a ghci that can load and run ghc.
Jul 19 2018, 1:18 AM
mgsloan updated the summary of D4904: Add a script for running a ghci that can load and run ghc.
Jul 19 2018, 1:17 AM
mgsloan updated the summary of D4904: Add a script for running a ghci that can load and run ghc.
Jul 19 2018, 1:17 AM
mgsloan updated the summary of D4904: Add a script for running a ghci that can load and run ghc.
Jul 19 2018, 1:17 AM
mgsloan updated the diff for D4904: Add a script for running a ghci that can load and run ghc.

Move top level scripts into utils subdir + documentation improvements + remove ghci-start

Jul 19 2018, 1:16 AM
mgsloan added a comment to D4904: Add a script for running a ghci that can load and run ghc.

I have split off D4986 and D4987 from this diff so now all this does is add files. Only the former is a dependency of this change. I also removed the ghci-start script, since it wasn't really necessary, and renamed ghci-load to utils/ghc-in-ghci/run.sh.

Jul 19 2018, 1:14 AM
mgsloan updated the diff for D4904: Add a script for running a ghci that can load and run ghc.

Split up this diff (see https://phabricator.haskell.org/D4986 and https://phabricator.haskell.org/D4987)

Jul 19 2018, 12:57 AM
mgsloan created D4987: Avoid redundant invocation of 'findTopDir'.
Jul 19 2018, 12:44 AM
mgsloan updated the diff for D4986: Modifications to support loading GHC into GHCi.

Remove unnecessary change to System.Directory import in SysTools.BaseDir

Jul 19 2018, 12:38 AM
mgsloan created D4986: Modifications to support loading GHC into GHCi.
Jul 19 2018, 12:20 AM
mgsloan added a comment to D4904: Add a script for running a ghci that can load and run ghc.

I think the point of the Makefile approach would be to generate the necessary settings.ghci file automatically from other dependency information. This will probably be easier once hadrian is merged.

Jul 19 2018, 12:03 AM

Jul 7 2018

mgsloan updated the diff for D4904: Add a script for running a ghci that can load and run ghc.
  • Remove the last remnants of Makefile changes
Jul 7 2018, 10:52 PM
mgsloan added a comment to D4904: Add a script for running a ghci that can load and run ghc.

@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.

Jul 7 2018, 10:51 PM
mgsloan updated the diff for D4904: Add a script for running a ghci that can load and run ghc.
  • Add a comment in findTopDir about _GHC_TOP_DIR env var
Jul 7 2018, 10:49 PM
mgsloan updated the diff for D4904: Add a script for running a ghci that can load and run ghc.
  • _GHC_TOP_DIR to specify top dir + use scripts instead of makefile
Jul 7 2018, 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 👍

Jul 7 2018, 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

Jul 7 2018, 9:23 PM
mgsloan added a comment to D4904: Add a script for running a ghci that can load and run ghc.

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.

Jul 7 2018, 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?

Jul 7 2018, 9:05 PM

Jul 6 2018

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

Thanks for the feedback and diff approval!

Jul 6 2018, 7:16 PM

Jul 5 2018

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.

Jul 5 2018, 2:35 AM

Jul 4 2018

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:

Jul 4 2018, 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?

Jul 4 2018, 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
Jul 4 2018, 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
Jul 4 2018, 1:52 AM
mgsloan updated the diff for D4925: Add module export reification + add lookup of Module imports #10391.
  • Removed implementation of lookupImportedModule
Jul 4 2018, 1:52 AM

Jul 3 2018

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.

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

@goldfire Thanks for reviewing!

Jul 3 2018, 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.

Jul 3 2018, 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
Jul 3 2018, 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
Jul 3 2018, 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 :)

Jul 3 2018, 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"

Jul 3 2018, 1:06 AM

Jul 2 2018

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. Note that the symptoms no longer involves panic-ing. However, the reload of modified code behaves differently than a fresh load.

Jul 2 2018, 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.
Jul 2 2018, 9:16 PM
mgsloan updated the diff for D4926: Add a broken test for lingering state from TH unique names #9693.

Update commit message

Jul 2 2018, 9:15 PM
mgsloan created D4926: Add a broken test for lingering state from TH unique names #9693.
Jul 2 2018, 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.

Jul 2 2018, 8:12 PM
mgsloan created D4925: Add module export reification + add lookup of Module imports #10391.
Jul 2 2018, 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.

Jul 2 2018, 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
Jul 2 2018, 5:52 PM
mgsloan created D4923: Fix handling of unbound constructor names in TH #14627.
Jul 2 2018, 5:26 PM
mgsloan added a comment to D4904: Add a script for running a ghci that can load and run ghc.

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

Jul 2 2018, 5:19 PM
mgsloan added a comment to D4904: Add a script for running a ghci that can load and run ghc.

@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.

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

Jul 1 2018

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

Jun 30 2018

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

Jun 29 2018

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

Jun 29 2018, 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.

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

Haddock updates

Jun 29 2018, 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

Jun 29 2018, 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

Jun 29 2018, 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

Jun 29 2018, 5:22 AM
mgsloan created D4908: Catch and report errors during hole fitting.
Jun 29 2018, 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.

Jun 29 2018, 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

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

Jun 28 2018

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

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

Jun 28 2018, 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 - I find it hard to work on big Haskell projects without that.

Jun 28 2018, 10:32 PM
mgsloan updated the diff for D1979: Add support for ImplicitParams and RecursiveDo in TH.
  • Rebased atop ~2 years worth of changes
Jun 28 2018, 10:28 PM
mgsloan retitled D4904: Add a script for running a ghci that can load and run ghc 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.
Jun 28 2018, 6:57 PM
mgsloan added a comment to D4904: Add a script for running a ghci that can load and run ghc.

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.

Jun 28 2018, 6:51 PM
mgsloan updated the diff for D4904: Add a script for running a ghci that can load and run ghc.
  • Better name for the top_dir workaround + comment
  • Use "ghci-load" and "ghci-start" targets instead of "load-ghci" and "run-ghci"
Jun 28 2018, 6:43 PM
mgsloan updated the summary of D4904: Add a script for running a ghci that can load and run ghc.
Jun 28 2018, 6:20 PM
mgsloan created D4904: Add a script for running a ghci that can load and run ghc.
Jun 28 2018, 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