Git Product home page Git Product logo

free-category's Introduction

Free Category

Maintainer: coot Haskell/CI

This package contains efficient implementations of free categories. There are various representations available:

  • real-time queues (C. Okasaki 'Pure Functional Data Structures')
  • type aligned lists
  • continuation passing style (Church encoding)

Free arrows and free Kleisli categories are also included.

Free categories are useful to model state machines in a simple yet type safe manner. For that purpose Kleisli categories are a very useful target which allows to include monadic computations. This package contains a useful generalisation of Kleisli categories captured by EffectCategory class (categories with effects), and a (free) transformer which lifts a category to a category with effects.

Benchmarks

Check performance characteristics of various representations:

Resources

free-category's People

Contributors

coot avatar ggreif avatar turion avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

turion ryno1991

free-category's Issues

Free arrows are not inspectable?

I'm new to free arrows so it's likely for me not to understand something, but why internal representation of Arr is not exposed? I'm talking about Cons constructor which remains non-exported.

My use case involves rebuilding the arrow before execution by simplifying and dropping some steps.

Consider free ArrowChoice

One could add a free ArrowChoice construction, similar to the free Arrow one. If you're interested, I could try that in a PR.

Document how to use shell.nix

Thanks a lot for this project! It's very useful for an experiment I want to make.

I was pleasantly surprised to see a shell.nix, but it's unclear to me how to use it:

$ nix-shell
error: getting status of '/home/turion/haskell/free-category/nix/nixpkgs.nix': No such file or directory

Free Arrow in the term of Monadic Stream Function

Hi,

I am sending you a message on twitter, but I will post it anyway. So, I just watched your video on Haskell exchange. Too bad it has to end before you can show the example. I have a similar idea about free or freer arrow (though I am still at the beginner level). For the first time, I have a look into funflow's Arrow Free module.

Moreover, I like the idea of Monadic Stream Function here in

data MSF m a b = MSF { unMSF :: a -> m (b, MSF m a b) }

(further reference).

So, looking at the CPS style of A f a b,

newtype A f a b
  = A { runA :: forall r. Arrow r
             => (forall x y. f x y -> r x y)
             -> r a b
      }

is it the same result with different approach?

May I know about how you build your program with only Free Arrow? I saw that you put instance FreeAlgebra2 on the Arrow. Is it possible without the FreeAlgebra2?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.