Skip to content

Merge Lexer and Syntax into Decoder; renames; Syntax class to type. - #129

Merged
galenhuntington merged 13 commits into
masterfrom
decoder-merge
Jun 15, 2026
Merged

Merge Lexer and Syntax into Decoder; renames; Syntax class to type.#129
galenhuntington merged 13 commits into
masterfrom
decoder-merge

Conversation

@galenhuntington

Copy link
Copy Markdown
Owner
  • The Lexer and Syntax modules are merged into one, Decoder, since there doesn't seem need to separate them. As of now, all still have only pure functions.
  • Other than that, nothing is yet moved except the egregiously misplaced Mode datatype, which is moved to State.hs.
  • Renames:
    • The name Pretty for the machine-to-machine protocol to talk to mpg123 does not fit. I renamed to Cmd and have a function cmdToBS (not the best name maybe but okay).
    • I don't know why the single-letter Msg constructors don't match the single-letter codes from mpg123, and in fact confusingly remap them. I changed this so they match.
  • I dropped the parsing of the Tag because nothing is done with it. Maybe in the future we'll want version sniffing or something but I have no plans for that.
  • Cmd (formerly Pretty in Syntax) is demoted from a class to a datatype. I didn't see any advantage in the former, nor why the send protocol uses a class and the receive protocol a datatype. The code is simpler this way.
  • The Info type is removed since it's an unhelpful wrapper around a ByteString.
  • Minor UI adjustments while I was in there:
    • kbit/s is now kb/s.
    • If no track info is yet available, the entry in the upper-right is blank instead of saying (empty).
  • Minor code tweaks.

@galenhuntington
galenhuntington merged commit caa00b9 into master Jun 15, 2026
5 checks passed
@galenhuntington
galenhuntington deleted the decoder-merge branch June 15, 2026 21:22
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.

1 participant