Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 01 11:01
    greydot commented #99
  • Apr 25 01:32
    suhailshergill commented #99
  • Apr 24 00:01
    greydot commented #99
  • Apr 24 00:00
    greydot commented #99
  • Apr 22 23:33
    suhailshergill commented #99
  • Apr 03 13:45
    wafflebot[bot] unlabeled #133
  • Apr 03 13:45

    greydot on develop

    feature/extend: define handlers… Merge pull request #133 from su… (compare)

  • Apr 03 13:45
    greydot closed #133
  • Apr 03 07:02
    greydot commented #133
  • Apr 03 01:10
    suhailshergill commented #133
  • Apr 01 23:28
    suhailshergill synchronize #133
  • Apr 01 23:28

    suhailshergill on nat

    feature/extend: define handlers… (compare)

  • Apr 01 23:27
    suhailshergill commented #133
  • Apr 01 23:26
    suhailshergill synchronize #133
  • Apr 01 23:26

    suhailshergill on nat

    feature/extend: define handlers… (compare)

  • Apr 01 23:20
    suhailshergill commented #133
  • Apr 01 23:12
    greydot commented #133
  • Apr 01 23:10
    greydot commented #133
  • Apr 01 23:04
    wafflebot[bot] labeled #133
  • Apr 01 23:04
    wafflebot[bot] assigned #133
Colin Woodbury
@fosskers
What are ': and '[]?
Suhail Shergill
@suhailshergill
type equivalents of data constuctors : and []
Colin Woodbury
@fosskers
So no more Void?
Suhail Shergill
@suhailshergill
nope
Colin Woodbury
@fosskers
Eff (State Int ': Reader Int ': '[]) ()?
Suhail Shergill
@suhailshergill
yep
or close enough
Colin Woodbury
@fosskers
Can those be aliased? the ' is annoying haha
Suhail Shergill
@suhailshergill
Eff (State Int ': Reader Int ': '[]) ()
Colin Woodbury
@fosskers
yeah, fixed it
Eff (State Int : Reader Int : []) () ;)
are type-level Sets possible?
or is it feasible that someone would want multiple State Int per effect stack?
Suhail Shergill
@suhailshergill
it's part of ghc's support for datakind promotion https://downloads.haskell.org/~ghc/7.8.4/docs/html/users_guide/promotion.html not sure if it's an error or warning when it is omitted
it = quote
an implementation of type-level set https://hackage.haskell.org/package/type-level-sets
Colin Woodbury
@fosskers
hm, that's relatively recent too
I would if that would be useful for EE
Suhail Shergill
@suhailshergill
i've been aware of it, but didn't want to take the plunge into type-level quicksort just yet https://github.com/dorchard/type-level-sets/blob/3941dae6a26705a45faa064aab296417f7bfa621/src/Data/Type/Set.hs#L156
Colin Woodbury
@fosskers
hahah
that's hilarious
Suhail Shergill
@suhailshergill
lol it's something alright
Suhail Shergill
@suhailshergill
such kind of type "towers" (value -> type -> kind -> ...) leads to another notion of polymorphism. it would be great to be able to write a generic quicksort algorithm which is applied at the various levels. i.e. universe polymorphism http://adam.chlipala.net/cpdt/html/Universes.html and https://coq.inria.fr/refman/Reference-Manual032.html
Simon Hafner
@reactormonk
@suhailshergill I'd have some time over the WE to put into the library - I've used eff a bit in scala, but I haven't fully understood the paper. Where should I start for some reasonable results in terms of contributions
Suhail Shergill
@suhailshergill
@reactormonk I'm currently on vacation with limited Internet connectivity. Unfortunately I won't be able to be of much help this weekend. Let me see what I've pushed in the repo
Suhail Shergill
@suhailshergill
@reactormonk https://github.com/suhailshergill/extensible-effects is the personal branch where I've been parking the changes (to address issue suhailshergill/extensible-effects#56 ) it's mostly done. The one last piece of code (it's an example) left to port is the cut example (around line 1016 in https://github.com/suhailshergill/extensible-effects/blob/sss/freer/src/Control/Eff1.hs ). The commented portion below (right at the end, is from the older design of eff. As you can see in the code I started the process to port it but didn't get very far. If you have time to donate it would help to see what that example would port like (and if you do that you would probably have a deep understanding of both eff and non-determinism)
If you want an easier challenge, starting to replace all the Eff examples and tests with the Eff1 ones would help (and refactoring appropriately). Currently all the new stuff should be in Eff1 (and possibly other files with the 1 suffix) and the commented out code examples from Oleg as tests in the test suite (alongside older Eff tests). The sanest order would be to align and mirror the tests and code for Eff with Eff1 and then remove the older ones (piecewise or monolithically)
Suhail Shergill
@suhailshergill
Since the library doesn't have a very well fleshed out test suite I was interested in porting the cut example. But another possible contribution angle might be for you to flesh out the tests for Eff1 (and add new ones)
I will be afk for the rest of Friday and all Saturday (flying back in on Saturday eve). Depending on how I recover from the jetlag I might be able to form some semi-coherent thoughts sometime Sunday (but don't hold your breath)
Hopefully the above gives you a place to start and independently tinker
Simon Hafner
@reactormonk
Thanks for the pointers, I'll take a look.
Simon Hafner
@reactormonk
... I took a go at the paper instead.
Suhail Shergill
@suhailshergill
power-fungus
@power-fungus
@suhailshergill could you explain the benefit of Trace?
what makes it special over Writer?
relates to #106
Suhail Shergill
@suhailshergill
@power-fungus in extensible-effects it isn't one effect over another. the main difference is that Trace is for IO. it has a narrow purpose (to add "trace" commands in IO)
could this be done by generalizing Writer. probably, by combining it with Lift
power-fungus
@power-fungus
@suhailshergill Technically, you would be right that the effects are independent from each other. However, a library should be coherent in its intent and lead the programmer using the library to good designs by exposing some functions and not implementing others. I think that having the trace effect with no statement of when it should and when it should not be used leads to confusion for new users.
See my commit power-fungus/extensible-effects@c4131e7 for a re-implementation of runTrace using Writer
power-fungus
@power-fungus
I see the narrow purpose of Trace, however, I think it is a bit too narrow for this library. If desired, I can try to design a logging-effect, which would cover the Trace, but also implements more general logging primitives.
Suhail Shergill
@suhailshergill
@power-fungus i like the idea of a "logging" or "debug" effect which extends Trace (it may do this via Writer or by other means)
power-fungus
@power-fungus
I would gladly tackle that with my friend @fendor. We would do this via some other logging algebra. If you have a resource describing a logging-algebra design you can let me know :)
Suhail Shergill
@suhailshergill
This message was deleted
Suhail Shergill
@suhailshergill
@power-fungus i've edited #99 to allow us to track progress on it more easily. out of curiosity, any thoughts on logging algebra? any particular direction you and @fendor are leaning?
power-fungus
@power-fungus
@suhailshergill Logging is currently postponed. I still work on some documentation, on which there still very much to do. I like idea of the tracking the progress inside the issue
power-fungus
@power-fungus
@suhailshergill I implemented a new effect almost identical to the Exception one except that it is called Success. It is inspired by http://hackage.haskell.org/package/errors-2.2.5/docs/Data-EitherR.html.