Skip to content

[psc-ide] Return qualifier from explicit/hiding imports - #2317

Merged
paf31 merged 1 commit into
purescript:masterfrom
nwolverson:psc-ide-listimports-qualified
Sep 23, 2016
Merged

[psc-ide] Return qualifier from explicit/hiding imports#2317
paf31 merged 1 commit into
purescript:masterfrom
nwolverson:psc-ide-listimports-qualified

Conversation

@nwolverson

Copy link
Copy Markdown
Contributor

No description provided.

@kritzcreek kritzcreek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just minor syntax things, otherwise looks good!

Comment thread src/Language/PureScript/Ide/Types.hs Outdated
object [ "module" .= mn
toJSON (ModuleImport mn (P.Explicit refs) qualifier) =
object $ [ "module" .= mn
, "importType" .= ("explicit" :: Text)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep the alignment of [ and , please

Comment thread src/Language/PureScript/Ide/Types.hs Outdated
]
toJSON (ModuleImport mn (P.Hiding refs) _) =
object [ "module" .= mn
] ++ fmap (\x -> "qualifier" .= x) (maybeToList qualifier)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Protolude is imported here so just map is actually the Functor version.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, this was ambiguous due to the non-qualified import of Data.Map.Lazy. Had no idea Haskell had both import qualified ... as ... and import ... as ... forms...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haskell's namespacing is way too complex...

Comment thread src/Language/PureScript/Ide/Types.hs Outdated
, "importType" .= ("hiding" :: Text)
, "identifiers" .= (identifierFromDeclarationRef <$> refs)
]
] ++ fmap (\x -> "qualifier" .= x) (maybeToList qualifier)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same two comments as above

@kritzcreek

Copy link
Copy Markdown
Member

Oh yeah and it would be nice if you could add the two fields to psc-ide-server/PROTOCOL.md, I'm trying to keep it up-to-date.

@nwolverson
nwolverson force-pushed the psc-ide-listimports-qualified branch from 4cf9233 to e5cae6b Compare September 21, 2016 09:57

@kritzcreek kritzcreek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, Thank you!

@paf31
paf31 merged commit a84f7f3 into purescript:master Sep 23, 2016
@nwolverson
nwolverson deleted the psc-ide-listimports-qualified branch September 23, 2016 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants