Skip to content
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

Use applicative style in Course.Parser #32

Open
bagl opened this issue Aug 13, 2015 · 1 comment
Open

Use applicative style in Course.Parser #32

bagl opened this issue Aug 13, 2015 · 1 comment

Comments

@bagl
Copy link
Contributor

bagl commented Aug 13, 2015

Applicative style of parsing will make the whole module cleaner.

I would also move instances of different classes directly below blbindParser so that they can be used in the subsequent exercises.

I could rework the module if this change would be accepted.

@ahaxu
Copy link
Contributor

ahaxu commented Sep 4, 2021

I tried to implement Applicative for ParseResult

 instance Applicative ParseResult where
     pure ::
        a
        -> ParseResult a
     pure a = undefined

     (<*>) ::
        ParseResult (a->b)
        -> ParseResult a
        -> ParseResult b
     (<*>)= undefined

but, I don't know how to start with pure

Can you help @bagl ? Thank you.

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

No branches or pull requests

2 participants