Skip to content

Updates for 0.10 #36

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

Merged
merged 4 commits into from
Oct 27, 2016
Merged

Updates for 0.10 #36

merged 4 commits into from
Oct 27, 2016

Conversation

paf31
Copy link
Contributor

@paf31 paf31 commented Oct 24, 2016

  • Rewrite in terms of standard monad transformers
  • Derive some new instances (notably MonadRec, so now we can use tailrec and safely to safely write recursive parsers)
  • Generalize the String module over a StringLike class, to support more efficient string representations.

!/.travis.yml
/bower_components/
/node_modules/
/output/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accidental replacement? Looks like the new one is missing node_modules and doesn't cover anything the one didn't.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied it from another project. This package doesn't use anything from NPM, but maybe I should keep the dotfiles ..

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does have a package.json with dependencies for pulp and the like though.

{ message :: String
, position :: Position
}

instance showParseError :: Show ParseError where
show (ParseError msg) = "ParseError { message: " <> msg.message <> ", position: " <> show msg.position <> " }"

instance eqParseError :: Eq ParseError where
eq (ParseError {message : m1, position : p1}) (ParseError {message : m2, position : p2}) = m1 == m2 && p1 == p2
derive instance eqParseError :: Eq ParseError
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Derive Newtype too? It might be uncommonly used, but may as well since the ParseError ctor isn't private or anything.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't, because of the record restriction. I could write it by hand with type-equality, but do you think it's worth it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohh, yeah. I keep forgetting about that 😄.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we going to add that deriving with type-equality thing for 0.10.2? Or is it not too straightforward?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that if we do it for everything then it's not too difficult. Trying to pick out the record parts of a type would be much more difficult, or impossible in general, I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The downside of doing it for everything is that it makes writing the instance derivation slightly trickier.

@garyb
Copy link
Member

garyb commented Oct 24, 2016

👍 for the new stuff!

@paf31
Copy link
Contributor Author

paf31 commented Oct 24, 2016

@garyb Are you using this for anything at SlamData? I'm wondering because there is a bit of a risk of breakage here, even though the tests are passing.

@garyb
Copy link
Member

garyb commented Oct 24, 2016

Yeah I think we are. As long as it's not losing functionality I don't think the breakage matters, there are other things that will need fixing too!

@leighman
Copy link

Oh, didn't see this.
Is this ready to merge?

@paf31
Copy link
Contributor Author

paf31 commented Oct 26, 2016

It is now that purescript-unicode has been merged, but thanks for the PR anyway.

@paf31 paf31 merged commit da38585 into master Oct 27, 2016
@paf31 paf31 deleted the 0.10 branch October 27, 2016 03:49
@jamesdbrock jamesdbrock mentioned this pull request Sep 18, 2021
@jamesdbrock jamesdbrock mentioned this pull request Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants