Conversation
src/Language/PureScript/Docs/Prim.hs
Outdated
| primRowDocsModule :: Module | ||
| primRowDocsModule = Module | ||
| { modName = P.moduleNameFromString "Prim.Row" | ||
| , modComments = Just "The Prim.Row module is embedded in the PureScript compiler. Unlike `Prim`, it is not imported implicitly. It contains automatically solved classes for workign with row types." |
|
This is going to break CI until relevant libraries are updated. What's the protocol on that? |
|
While you're at it, would you also take a look at |
|
I think having them explicitly imported is perhaps best; I don't think these classes are quite ubiquitous enough to justify being imported by default. Having to import them explicitly was what Phil suggested originally too. What do others think? |
|
Actually following from my other comment (#2903 (comment)), having thought about it a little more, I think the best approach would be to move all of I think the idea is that we decide that pretty much everything apart from the most ubiquitous stuff belongs in submodules of |
|
I think what we've done in the past with CI is to change We might have also used release candidates for libraries, i.e. publishing versions of the form I can't remember which of these two approaches tends to work better though; @garyb? |
|
@kritzcreek I'll give that a peek, thanks for the suggestion 😄 @hdgarrood Cool, I'll make the requisite changes in the downstream libraries and remove the non- That leads to another question: How do I make a module available without it being explicitly defined? |
|
I think putting it in the |
|
Right now the tests all pass locally for me, because |
|
I know one instance of
|
|
Ah right, okay; in that case, I'm probably wrong, and I'm not quite sure how to do it. |
|
I figured out how to make "virtual modules" but I'm not sure how to get the imports actually working yet. |
| (ModuleName [ProperName "Prim"]) | ||
| (internalModuleSourceSpan "<Prim>", nullImports, primExports) | ||
| primEnv = M.fromList | ||
| [ ( ModuleName [ProperName "Prim"] |
There was a problem hiding this comment.
Would it make sense to use the patterns in Constants here?
There was a problem hiding this comment.
Definitely! Thanks for the tip :)
|
I've updated the tests, and they're green (on my machine) 😄 |
|
This fails locally for me in the same way. |
|
It doesn't fail for me locally, either on my Mac or Windows machine. I tried Travis cache maybe? Not sure why it would fail for Liam too though. |
|
I'm doing: Do you see this too? I'm wondering if there is a difference in behaviour across |
|
I get those messages, yeah. And: |
|
Running the command you posted gives me the test failure also. Huh. 🤷♂️ Versions: Ubuntu 17.10 if that makes any difference. |
|
I forgot about |
|
hmm, this is weird, as I have not touched any of the |
|
We're getting "no instance found" errors. This appears to be specific to the recursion in the instance chain. I changed the order of instances in the instance context for the second case. This puts 'Balanced sym2' before the others. instance balanced1 :: Balanced ""
else
instance balanced2
:: ( Balanced sym2
, AppendSymbol "(" sym1 sym
, AppendSymbol sym2 ")" sym1
) => Balanced symThe error then becomes this: It looks like it is having a hard time doing instance lookup recursively in the presence of an instance chain. |
FWIW I have run into similar-seeming problems in different contexts, where switching instance order, or even adding redundant entailments, makes the problem go away. I imagine someone must have filed a bug at some point. |
|
Ah! The previous version of the test suite used this branch: https://github.com/purescript/purescript-typelevel-prelude/compare/phil/append-symbol Looks like this should be merged into |
|
now that the PR in |
|
I opened a PR on your PR that removes the State stuff again, and the tests still pass - the change that enables this is to always populate |
Avoid state usage to populate `Environment`
|
Hopefully my next contribution will be more straightforward 😄 |
|
Yeah, sorry, I should have gotten involved with reviewing this , etc. a long time ago too. |


This PR renames Prim classes and creates submodules for them to live in.
Todo:
TypeConcatandTypeStrintoPrim.TypeErrorPrimsubmodules from the default environmentPrimsubmodules available for import.Primsubmodule only imports the terms that are actually imported.Language.PureScript.Ide.PrimFixes #2903