Skip to content

Merge trunk into wip/codebase2 #1891

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 155 commits into from
Apr 26, 2021
Merged

Merge trunk into wip/codebase2 #1891

merged 155 commits into from
Apr 26, 2021

Conversation

mitchellwrosen
Copy link
Member

@mitchellwrosen mitchellwrosen commented Apr 26, 2021

In preparing to merge #1871 I discovered some additional conflicts with trunk that should be resolved first.

…usion syntax all seem to work.

Hyperlink syntax is busted. No syntax for bulleted or numbered lists yet.
Found a decent way of expressing so there's not much duplication between lexer and parser.
Still todo: example syntax, and make names consistent between lexer and parser
Still todo: syntax for docs on top level bindings
had to change link syntax for types and @source elements, it has some bugs
unique[b7a4fb87e34569319591130bf3ec6e24c9955b6ae06b5f6895e908d58c3f6113] type Doc2
  = Word Text
  | Code Doc2
  | CodeBlock Text Doc2
  | Bold Doc2
  | Italic Doc2
  | Strikethrough Doc2
  -- style {{ myclass }} mydoc
  | Style Doc2 Doc2
  | Blockquote Doc2
  | Embed Any
  | Blankline
  | SectionBreak
  | Aside (Optional Doc2) Doc2
  -- callout icon title content
  | Callout (Optional Doc2) (Optional Doc2) Doc2
  | Folded Boolean Doc2 Doc2
  | Join [Doc2]
  | Paragraph [Doc2]
  | BulletedList [Doc2]
  | NumberedList Nat [Doc2]
  | ListItem Doc2 [Doc2]
  | Section Doc2 [Doc2]
  | Source [Either Link.Type Any]
  | NamedLink Doc2 Doc2
  | Link [Either Link.Type Any]
  | Signature [Any]
  | Example Nat Any
  | InlineSignature Any
  | InlineEval Any
  | Eval Any
  | Trace Any

syntax.doc = Join
syntax.doc.group = Join
syntax.doc.word = Word
syntax.doc.bold = Bold
syntax.doc.italic = Italic
syntax.doc.strikethrough = Strikethrough
syntax.doc.paragraph = Paragraph
syntax.doc.embedTermLink any =
  guid = "b7a4fb87e34569319591130bf3ec6e24"
  Right any
syntax.doc.embedTypeLink tl =
  guid = "b7a4fb87e34569319591130bf3ec6e24"
  Left tl
syntax.doc.source = Source
syntax.doc.signature = Signature
syntax.doc.inlineSignature = InlineSignature
syntax.doc.inlineEval = InlineEval
syntax.doc.inlineCode = Code
syntax.doc.codeBlock = CodeBlock
syntax.doc.example n a = Example n (Any a)
syntax.doc.link = Link
syntax.doc.transclude d =
  guid = "b7a4fb87e34569319591130bf3ec6e24"
  d
syntax.doc.namedLink = NamedLink
syntax.doc.bulletedList = BulletedList
syntax.doc.numberedList = NumberedList
syntax.doc.listItem = ListItem
syntax.doc.section = Section

doc1 = {{ Hello, world! }}

---

  /Users/pchiusano/unison/scratch.u:64:8:
  unexpected syntax.doc
     64 | doc1 = {{ Hello, world! }}
doc1 = {{
__Hello__, world!

__Also see:__

1. Hi
2. Bye

- A
- B
- C
  + D
  + E
    - F
  + [Unison](https://unisonweb.org)

}}

Haven't tested most of the other syntax, and spotted at least one issue with term and type link parsing
---

unique[b7a4fb87e34569319591130bf3ec6e24c9955b6ae06b5f6895e908d58c3f6113] type Doc2
  = Word Text
  | Code Doc2
  | CodeBlock Text Doc2
  | Bold Doc2
  | Italic Doc2
  | Strikethrough Doc2
  -- style {{ myclass }} mydoc
  | Style Doc2 Doc2
  | Blockquote Doc2
  | Embed Any
  | Blankline
  | SectionBreak
  | Aside (Optional Doc2) Doc2
  -- callout icon title content
  | Callout (Optional Doc2) (Optional Doc2) Doc2
  | Folded Boolean Doc2 Doc2
  | Paragraph [Doc2]
  | BulletedList [Doc2]
  | NumberedList Nat [Doc2]
  | Section Doc2 [Doc2]
  | Source [Either Link.Type Any]
  | NamedLink Doc2 Doc2
  | Link [Either Link.Type Any]
  | Signature [Any]
  | Example Nat Any
  | InlineSignature Any
  | InlineEval Any
  | Eval Any
  | Trace Any
  | Docs [Doc2]

syntax.doc.docs = cases [d] -> d
                        ds -> Docs ds
syntax.doc.word = Word
syntax.doc.bold = Bold
syntax.doc.italic = Italic
syntax.doc.strikethrough = Strikethrough
syntax.doc.paragraph = Paragraph
syntax.doc.embedTermLink any =
  guid = "b7a4fb87e34569319591130bf3ec6e24"
  Right any
syntax.doc.embedTypeLink tl =
  guid = "b7a4fb87e34569319591130bf3ec6e24"
  Left tl
syntax.doc.source = Source
syntax.doc.signature = Signature
syntax.doc.inlineSignature = InlineSignature
syntax.doc.inlineEval = InlineEval
syntax.doc.inlineCode = Code
syntax.doc.codeBlock = CodeBlock
syntax.doc.example n a = Example n (Any a)
syntax.doc.link = Link
syntax.doc.transclude d =
  guid = "b7a4fb87e34569319591130bf3ec6e24"
  d
syntax.doc.namedLink = NamedLink
syntax.doc.bulletedList = BulletedList
syntax.doc.numberedList = NumberedList
syntax.doc.section = Section
@mitchellwrosen
Copy link
Member Author

mitchellwrosen commented Apr 26, 2021

Hmm, I thought there was a way of showing how conflicts were resolved on GitHub, but I can't find it now. A screenshot will have to do (or, to see locally, git show f4e353f925be1b0e32193877b09901ef65186583)

Screen Shot 2021-04-25 at 8 52 57 PM

When resolving the conflict in Main.hs I did think it was odd that the call to launch was dedented in wip/codebase2, to which I added the conflicting logging line above. However, reflecting on that, I now think it was originally just a misleading 3-way diff, because the encapsulating Server.start above (causing everything below to be indented more) was simply not part of the conflict.

Here's a screenshot of the original conflict for clarification:

Screen Shot 2021-04-25 at 9 10 51 PM

@mitchellwrosen
Copy link
Member Author

Fixed that here 722ae5a

@aryairani aryairani merged commit 774a6a2 into wip/codebase2 Apr 26, 2021
@aryairani aryairani deleted the codebase2-merge-trunk branch April 26, 2021 16:20
@pchiusano pchiusano mentioned this pull request May 11, 2021
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.

5 participants