-
Notifications
You must be signed in to change notification settings - Fork 24
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
expose internals #8
Comments
Hello and welcome! It sounds like that should be possible already using the Grammar interface (note that the Grammar module already exposes its internals if you import Text.Earley.Grammar). What is the problem with that approach? Exposing the internals is sometimes a good idea, but note that the internals exposed in Parser are only used while parsing and are very implementation-specific, why I'd like to get some more information about your use-case before I merge your changes. :) Thanks! |
My use case is to transform a free alternative into an Earley it would replace Earley's
where e.g. in the grammar:
phrase = _ with this (non-monadic) flavor of observed sharing, each I tried a simpler API with a I hope that made sense, I'm still figuring this all out. p.s. here's some exposing-internals-on-general-principles propaganda https://www.reddit.com/r/haskell/comments/2uoton/edward_kmett_encapsulation_vs_code_reuse/ :-) |
OK. I still think that should be possible just with I'd be interested to see what you come up with later. :) |
thanks! On Thursday, July 2, 2015, Olle Fredriksson notifications@github.com
(this message was composed with dictation: charitably interpret typos)Sam |
a user might want to observe sharing themselves (e.g. manual annotations, http://hackage.haskell.org/package/data-reify, their own monad, etc.), and pass it down to the parser.
We can put it in a
.Internal
module.The text was updated successfully, but these errors were encountered: