Skip to content

Allow use of prime symbol in type names.#2167

Merged
garyb merged 1 commit into0.9from
primed-types
May 28, 2016
Merged

Allow use of prime symbol in type names.#2167
garyb merged 1 commit into0.9from
primed-types

Conversation

@garyb
Copy link
Copy Markdown
Member

@garyb garyb commented May 27, 2016

Resolves #1569

@garyb
Copy link
Copy Markdown
Member Author

garyb commented May 27, 2016

I opened the last PR from the GitHub client, either forgot to switch the branch or something odd happened 😄

(guard (validModuleName uName) >> Qualifier uName <$ P.char '.') <|> pure (UName uName)
, parseUName >>= \uName ->
(guard (validModuleName uName) >> Qualifier uName <$ P.char '.')
<|> (guard (validUName uName) >> pure (UName uName))
Copy link
Copy Markdown
Contributor

@paf31 paf31 May 27, 2016

Choose a reason for hiding this comment

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

Does it make sense to move these checks into mname, uname, etc.?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

That sounds good to me, I certainly found this a bit strange. Shall I do that then?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Actually, can we? The P.char '.' thing in there for Qualifier probably obstructs that. Should work for uname / tyname though.

@garyb
Copy link
Copy Markdown
Member Author

garyb commented May 27, 2016

I need to update the parsing of DeclarationRef to use typeName parsing too. I'll push that with any other revisions in a moment.

@garyb
Copy link
Copy Markdown
Member Author

garyb commented May 27, 2016

DeclarationRef handling and lexer tweak now in.

uname' s = token go P.<?> show s
where
go (UName s') | s == s' = Just ()
go _ = Nothing
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Deleted this as it was unused, and I wasn't sure what the right implementation would be anymore: should the validUName predicate apply? etc.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If it's unused, just get rid, I think.

@paf31
Copy link
Copy Markdown
Contributor

paf31 commented May 27, 2016

🚢 thanks!

@garyb
Copy link
Copy Markdown
Member Author

garyb commented May 28, 2016

Looks like the nightly build is broken now? Not by this I imagine, there's some message about the compiler.

@paf31
Copy link
Copy Markdown
Contributor

paf31 commented May 28, 2016

Yes, the Mac build has been broken for a few days. I've been ignoring it, but maybe we should turn that build off.

@garyb garyb merged commit bbd5a83 into 0.9 May 28, 2016
@garyb garyb deleted the primed-types branch May 28, 2016 11:16
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.

2 participants