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

Add tests #4

Closed
paf31 opened this issue Aug 7, 2015 · 13 comments
Closed

Add tests #4

paf31 opened this issue Aug 7, 2015 · 13 comments

Comments

@paf31
Copy link
Contributor

paf31 commented Aug 7, 2015

No description provided.

@nicodelpiano
Copy link
Owner

  • Would it be a bad idea to export missingSingle?
    Because I'm thinking on write some tests for it specifically, instead of using check. Although I guess it isn't neat to export that function...
  • Also, when I want to write examples of binders or alternatives, I have to cast the type to make sure that the literal type they wrap has an Eq instance. Is that OK?
Tagged "Cons" $ Var Nothing :: Binder String
  • Do you think it will be useful to make some tests for the examples in /examples?

Thanks!

@paf31
Copy link
Contributor Author

paf31 commented Aug 18, 2015

If you're worried about exporting too much stuff, you could add an Internal module, and not expose it in the cabal file.

What do you mean you need to cast things?

@nicodelpiano
Copy link
Owner

If I use, for example: Tagged "Cons" $ Var Nothing just to make a test for that single case, I need to make the type explicit : Tagged "Cons" $ Var Nothing :: Binder String to ensure that the lit (Binder lit) is an instance of Eq. But, never mind!

@paf31
Copy link
Contributor Author

paf31 commented Aug 18, 2015

Oh, gotcha. Yeah, that's fine I think. You could use () or anything really.

@nicodelpiano
Copy link
Owner

👍 !

@nicodelpiano
Copy link
Owner

By the way, when you find some time to do it, could you see the examples I have written in Examples?

@paf31
Copy link
Contributor Author

paf31 commented Aug 18, 2015

They look great, but I still think we should get rid of constructor arities and encode things using product binders instead.

@paf31
Copy link
Contributor Author

paf31 commented Aug 20, 2015

How's this going?

@paf31
Copy link
Contributor Author

paf31 commented Aug 20, 2015

Maybe try to consolidate your branches into master before tomorrow's deadline as well?

@nicodelpiano
Copy link
Owner

Sounds great, I'm just finishing some tests and I'll make a commit.

@nicodelpiano
Copy link
Owner

Could you check the tests so far? I'll add a lot more, but just to see if it's OK. Maybe in a future version we could use a better framework. Thanks!

@paf31
Copy link
Contributor Author

paf31 commented Aug 20, 2015

They look good. I would just consolidate everything into master and make a release (maybe once the Maybe Bool thing is changed?)

@nicodelpiano
Copy link
Owner

Yes, I just forgot to add the new files! 😄

@paf31 paf31 closed this as completed Aug 21, 2015
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