Skip to content
This repository was archived by the owner on Sep 28, 2023. It is now read-only.
This repository was archived by the owner on Sep 28, 2023. It is now read-only.

Interest in adding source location to the AST? #148

@VictorCMiraldo

Description

@VictorCMiraldo

I came to discover HaTeX when needing a LaTeX parser in Haskell. I would need source location on the AST elements and it seems like HaTeX doesn't support this.

I'm happy to implement it myself in a fork if there is interest! I would just modify the AST with a type variable which can be used to store SrcLoc records from Parsec. How much would this break?

edit: A more interesting approach would be to have two modules: Text.HaTeX.Base.Syntax.WithParm and Text.HaTeX.Base.Syntax. The former defines types like data LaTeX a = ... whereas the later re-exports type LaTex = WithParm.LaTeX (). Someone interested in just generating LaTeX code can use the simpler variant. Let me know if that makes any sense! :)

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions