Separate the Op and Ident namespaces, add phantom type for Op for values/types#2090
Separate the Op and Ident namespaces, add phantom type for Op for values/types#2090garyb merged 3 commits intopurescript:0.9from
Op and Ident namespaces, add phantom type for Op for values/types#2090Conversation
|
I had a go at this, but it was a bit beyond my understanding. Thanks! |
| -- | ||
| parseIdent :: TokenParser Ident | ||
| parseIdent = (Ident <$> identifier) <|> (Op <$> parens symbol) | ||
| parseIdent = Ident <$> identifier |
|
Yeah, hopefully when this PR is done the result should be much more understandable! Since I delved into the operators lately I mostly have it loaded into my brain still. |
|
Also note there are some comments about 0.9 in the parser module. See |
| -- A fixity declaration for a type operator | ||
| -- (fixity data, operator name, type the operator is an alias for) | ||
| -- | ||
| | TypeFixityDeclaration Fixity (OpName 'TypeOpName) (Qualified (ProperName 'TypeName)) |
There was a problem hiding this comment.
I'm not sure about this approach yet (separating the type fixities entirely). It might result in a ton of duplicated code, but on the other hand it will eliminate a bunch of cases where we have a multiplication of possibilities due to type/value split (and with 1/3rd or 2/3rds of the possibilities being impossible, depending on the situation).
I tried some stuff out with GADTs, but it quickly spiralled into madness.
0539e3c to
dfd390c
Compare
|
This will finish the last items in #2012, correct? |
|
What about #1511, was that implemented already? |
|
#1511 will need doing too, that shouldn't be too difficult to sort out though. There's also whether we're going to do anything about the syntax for imports to go along with that. Also removing multiple modules per file, which is a one-line change. |
|
Good point! I think it is supposed to be a comprehensive list. |
|
This is now ready for review. It cleans up the remainder of the 0.9 stuff relating to operators, and I reduced the number of different types of errors we need by making wider use of the There's a problem in the Any ideas @kritzcreek? |
|
This will interfere with #2079 actually, but I think it might help: the printing of names should be much more consistent now, as I think they go through the same function. Aside from type variables and row labels. |
|
From the travis log: |
|
Oh, oops, I didn't see that up there, just the failure output. That's weird. |
|
Omw home right now, I'll check soon but it might be related to the psc-ide network PR. Most likely a server instance didn't die fast enough. |
|
I guess it's because it was from the output of a subprocess ( |
* Fixes purescript#2064 The unnecessary forward (client) and reverse (server) name resolution was impaired on OS X when IPv6 entries for localhost were missing in /etc/hosts The proposed patch remove this name resolution and makes psc-ide operation independent from name resolution proper configuration. * Added @kika to CONTRIBUTORS.md
|
No joy. Will have to try the |
|
There we go. Seems quitting the server before the tests started was causing the problem for some reason. |
|
🚢 it! |
And remove a few remnants of pre-0.9 operator code.
Still very much a WIP, this got a bit more involved than I expected.