Skip to content

Fix quickstart example to use Megaparsec parse function correctly#28

Merged
akollegger merged 2 commits into018-pattern-path-semanticsfrom
copilot/sub-pr-24
Nov 29, 2025
Merged

Fix quickstart example to use Megaparsec parse function correctly#28
akollegger merged 2 commits into018-pattern-path-semanticsfrom
copilot/sub-pr-24

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 29, 2025

The quickstart example was calling parseGram source directly, but parseGram is a Parser Gram type, not a function that takes a string. Running a Megaparsec parser requires the parse function.

Changes

  • Added parse to the import from Text.Megaparsec
  • Fixed usage to parse parseGram "" source instead of parseGram source

Before

import Text.Megaparsec (errorBundlePretty)
...
case parseGram source of

After

import Text.Megaparsec (parse, errorBundlePretty)
...
case parse parseGram "" source of

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: akollegger <53756+akollegger@users.noreply.github.com>
Copilot AI changed the title [WIP] Address feedback on 018 pattern path semantics PR Fix quickstart example to use Megaparsec parse function correctly Nov 29, 2025
Copilot AI requested a review from akollegger November 29, 2025 14:38
@akollegger akollegger marked this pull request as ready for review November 29, 2025 14:54
@akollegger akollegger merged commit d702a48 into 018-pattern-path-semantics Nov 29, 2025
@akollegger akollegger deleted the copilot/sub-pr-24 branch November 29, 2025 14:54
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