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

fix(check): Subsume implicit functions with forall correctly #688

Merged
merged 4 commits into from
Feb 13, 2019

Conversation

Marwes
Copy link
Member

@Marwes Marwes commented Feb 12, 2019

The previous, naive subsume_implicit function did not traverse the
functions simultaneously so the implicit arguments would be lost if the
left side had a forall at the top.

Fixes an issue found in #686

cc @Etherian

@Marwes
Copy link
Member Author

Marwes commented Feb 12, 2019

There is another error in #686 as well which might be a compiler error but I am not sure yet (a type signature might be able to work around it).

The previous, naive subsume_implicit function did not traverse the
functions simultaneously so the implicit arguments would be lost if the
left side had a `forall` at the top.

Fixes an issue found in gluon-lang#686

cc @Etherian
Were getting a 173 Mb gluon_repl binary instead of 17Mb
<a name="v0.11.1"></a>
### v0.11.1 (2019-02-13)

#### Bug Fixes

*   Don't build release artifacts with full debug info ([fe93583](gluon-lang@fe93583))
* **check:**  Subsume implicit functions with forall correctly ([6de5c25](gluon-lang@6de5c25))
@Marwes
Copy link
Member Author

Marwes commented Feb 13, 2019

bors r+

bors bot added a commit that referenced this pull request Feb 13, 2019
688: fix(check): Subsume implicit functions with forall correctly r=Marwes a=Marwes

The previous, naive subsume_implicit function did not traverse the
functions simultaneously so the implicit arguments would be lost if the
left side had a `forall` at the top.

Fixes an issue found in #686

cc @Etherian

Co-authored-by: Markus Westerlind <marwes91@gmail.com>
@bors
Copy link
Contributor

bors bot commented Feb 13, 2019

Build succeeded

@bors bors bot merged commit 375a6ac into gluon-lang:master Feb 13, 2019
@Marwes Marwes deleted the implicit-field branch February 13, 2019 09:30
bors bot added a commit that referenced this pull request May 4, 2019
686: [WIP] feat(std): add monad transformer interface, StateT, and LazyT r=Marwes a=Etherian

## Description
Adds a monad-transformer interface `Transformer`, a State monad transformer `StateT`, and a Lazy monad transformer `LazyT` to the standard library.

## Related PRs
Lays groundwork for Streamlike and the new parser #687.

## Status
**In Development**

### Outstanding design questions
- [x] ~~Can and should `StateT` be replaced by the effects system?~~ ([not for the time being, at least](#686 (comment)))
- [ ] Should `Transformer` require `monad` field?
- [ ] Should StateT and LazyT (and other monad transformers) be merged with their non-transformer counterparts?

### To Do
- [x] ~~Fix StateT's implicit parameter bugs~~ (#688 & #689)
- [ ] add tests
- [ ] add inline docs

## Prior Art
- StateT
  - [Haskell](https://hackage.haskell.org/package/transformers-0.5.6.2/docs/src/Control.Monad.Trans.State.Lazy.html#StateT)
  - [Idris](https://github.com/idris-lang/Idris-dev/blob/master/libs/base/Control/Monad/State.idr)
  - [Implementing Applicative (<*>) for StateT](https://stackoverflow.com/questions/27903650/implementing-applicative-for-statet)
- MonadTrans
  -  [Haskell](https://hackage.haskell.org/package/transformers/docs/src/Control.Monad.Trans.Class.html#MonadTrans)
  - [Idris](https://github.com/idris-lang/Idris-dev/blob/master/libs/base/Control/Monad/Trans.idr)

Co-authored-by: Etherian <etherain@gmail.com>
Co-authored-by: Markus Westerlind <marwes91@gmail.com>
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.

1 participant