Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Conversation

@robrix
Copy link
Contributor

@robrix robrix commented Jul 29, 2019

This PR splits an Ann type out of Core, mostly as housekeeping but also to demonstrate sums of strongly-typed syntax.

Copy link
Contributor Author

@robrix robrix left a comment

Choose a reason for hiding this comment

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

Ready for review.

stripAnnotations (Term t)
| Just c <- prj t, Ann _ b <- c = stripAnnotations b
| otherwise = Term (hmap stripAnnotations t)
stripAnnotations :: (HFunctor sig, forall g . Functor g => Functor (sig g)) => Term (Ann :+: sig) a -> Term sig a
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now the type of stripAnnotations guarantees that there aren’t any present.

-- * Parsers (corresponding to EBNF)

core :: (TokenParsing m, Monad m) => m (Term Core User)
core :: (TokenParsing m, Carrier sig t, Member Core sig, Monad m) => m (t User)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Eventually we can (and should) generate annotations for parsed terms as well.

@robrix robrix marked this pull request as ready for review July 29, 2019 15:32
@robrix robrix requested a review from a team July 29, 2019 17:16
@robrix robrix mentioned this pull request Jul 30, 2019
7 tasks
@robrix robrix mentioned this pull request Aug 6, 2019
8 tasks
@robrix robrix changed the base branch from sequence-values-in-the-abstract-domain to master August 6, 2019 18:00
Copy link
Contributor

@patrickt patrickt left a comment

Choose a reason for hiding this comment

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

Love this—such a great exhibition for why the effects + syntax distinction is artificial.

@patrickt patrickt merged commit 5521d7d into master Aug 6, 2019
@robrix robrix deleted the factor-annotations-out-of-core branch August 6, 2019 18:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants