Coder Social home page Coder Social logo

fraxl's People

Contributors

bradediger avatar elvishjerricco avatar michaelxavier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar

fraxl's Issues

Batching support?

It is theoretically possible to "parallelize" via a batch call as opposed to thread based concurrency. It's unclear from the docs if this is possible.

Catching errors thrown in the fetch functions

I'm trying to understand why using the catchError of Fraxl doesn't catch errors thrown by fetch functions. For example, the following code prints Left "Error" instead of Right 1:

data ErrorSource a where
  ThrowError :: ErrorSource a

fetchErrorSource :: Fetch ErrorSource (Either String)
fetchErrorSource = traverseASeq $ \ThrowError -> pure $ throwError "Error"

myThrowError :: Fraxl '[ErrorSource] (Either String) Int
myThrowError = dataFetch ThrowError `catchError` \_ -> pure 1

main :: IO ()
main =
  print $ runFraxl (fetchErrorSource |:| fetchNil) myThrowError

Fetch type alias

I just watched your Haskell meetup video and am peeking around the codebase a bit. Very interesting stuff!

Just curious, why is Fetch given as

type Fetch f m a = ASeq f a -> m (ASeq m a)

rather than

type Fetch f m a = ASeq f a -> m (ASeq Identity a)

Does only asking the interpretation function to put together a sequence of m a actions unlock some additional power, versus just executing the actions right then? It seems the actions are just joined away by runFraxl in the end anyways.

Thanks!

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.