Skip to content

Conversation

carymrobbins
Copy link

No description provided.

@paf31
Copy link
Contributor

paf31 commented Aug 17, 2015

👍

@garyb
Copy link
Member

garyb commented Aug 17, 2015

@paf31 Would you say this is a breaking change?

I mean, it isn't, but the new version won't work in older version of psc.

@paf31
Copy link
Contributor

paf31 commented Aug 17, 2015

I think it should be a conscious decision to upgrade, and a major bump is the only way we have to ensure that, so yeah.

@garyb
Copy link
Member

garyb commented Aug 17, 2015

In that case:

  • purescript-quickcheck
  • purescript-maps
  • purescript-catenable-lists
  • purescript-free
  • purescript-sets
  • purescript-graphs
  • purescript-machines
  • purescript-strongcheck
  • purescript-argonaut-core
  • purescript-argonaut-codecs
  • purescript-argonaut-traversals
  • purescript-argonaut

I'm not sure how comprehensive this tool is that I use to generate these, there must be some kind of bug in it as when I was doing the strings update it didn't list everything. I really should rewrite it in PS and get it doing all that other stuff we talked about...

@garyb
Copy link
Member

garyb commented Aug 17, 2015

I'd suggest we add more derived generic instances and release them all as a batch if we're going down this route though, to prevent having to bump a bunch more times.

@paf31
Copy link
Contributor

paf31 commented Aug 17, 2015

Agreed, but what else needs a generic instance? I don't know if one for Map is appropriate for example. Anything with a Generic instance necessarily leaks its internal representation.

@garyb
Copy link
Member

garyb commented Aug 17, 2015

Good point, perhaps there isn't anything else that would need it :) Let's just be sure before we commit!

@paf31
Copy link
Contributor

paf31 commented Aug 17, 2015

We have various newtypes which might benefit from it. In purescipt-maybe for example.

@paf31
Copy link
Contributor

paf31 commented Aug 17, 2015

Although of course that module can't depend on generics 😄

@garyb
Copy link
Member

garyb commented Aug 17, 2015

Good point, monoid has a bunch more too.

@carymrobbins
Copy link
Author

So, in regards to Map, we could just implement a Generic instance that doesn't expose its internal representation. It could defer to fromList, see this commit - carymrobbins/purescript-maps@5f8c41e

@paf31
Copy link
Contributor

paf31 commented Aug 20, 2015

But then, e.g. gShow would be show on lists, which might be a bit odd.

@carymrobbins
Copy link
Author

That's how it basically is now, except for the qualified names and the extra, yet proper, parens -

> singleton "foo" 1
fromList Cons (Tuple ("foo") (1)) (Nil)

-- With Generic (Map k v)
> data W = W (Map String Int)
> derive instance genericW :: Generic W
> instance showW :: Show W where show = gShow
> W (singleton "foo" 1)
W (Data.Map.Map.fromList (Cons (Data.Tuple.Tuple "foo" 1) Nil))

@zudov zudov mentioned this pull request Sep 11, 2015
@paf31
Copy link
Contributor

paf31 commented May 22, 2016

@garyb Do we want to include this in 1.0? It seems harmless enough to me.

@garyb
Copy link
Member

garyb commented May 22, 2016

Yeah, I think so!

@garyb garyb mentioned this pull request May 22, 2016
@garyb garyb closed this in #69 May 22, 2016
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.

3 participants