category-abstractions Questions
1
Solved
When learning about Control.Arrow and Haskell's built-in proc notation, I had the idea that this language might prove very useful as an eDSL for general monoidal categories (using *** for tensor an...
Vang asked 16/6, 2019 at 16:20
2
I understand that an Arrow is a Profunctor, where one can transform its input and its output, but can one map an arrow over a Functor?
I understand that as-asked the answer is "no", since the fmap...
Submergible asked 15/4, 2017 at 21:42
1
Lets say I have the following
import Control.Category (Category, (.), id)
data Invertible a b = Invertible (a -> b) (b -> a)
instance Category Invertible where
id = Invertible Prelude.id ...
Hong asked 21/9, 2015 at 5:0
2
Solved
Some instances of Category are also instances of Functor. For example:
{-# LANGUAGE ExistentialQuantification, TupleSections #-}
import Prelude hiding (id, (.))
import Control.Category
import Con...
Chukar asked 24/7, 2015 at 19:29
1
Solved
I am following this blog, to write a simple http server in haskell,
Usage of >>> is not clear to me. What does this code snippet do?
handleHttpConnection r c = runKleisli
(receiveReques...
Agnola asked 5/7, 2015 at 8:31
2
Solved
I had a thought to generalise ($) like Control.Category generalises (.), and I've done so with the code at the end of this post (also ideone).
In this code I've created a class called FunctionObje...
Tabethatabib asked 29/6, 2015 at 14:57
1
Solved
I am having fun learning Category Theory by directly translating the definitions and laws to Haskell. Haskell is not Coq of course but it helps me getting an intuition for Category Theory. My quest...
Henig asked 21/11, 2014 at 11:54
3
This question deals with constructing a proper Monad instance from something that is a monad, but only under certain constraints - for example Set. The trick is to wrap it into ContT, which defers ...
Pice asked 13/1, 2014 at 19:15
1
Solved
I was going through some Arrow tutorial, toying with functions returning a new version of themselves in an attempt to maintain some state.
The new type is defined like that:
newtype Circuit a b =...
Yettie asked 9/1, 2012 at 10:57
2
Solved
If I find out that something is a Monoid or Monad, I get all to use all kinds of fun functions, like foldMap, sequence or even mapM. They make me happy.
What do I get if I find out that something ...
Valeriavalerian asked 19/10, 2011 at 7:44
2
Solved
Often you have something like an Applicative without pure, or something like a Monad, but without return. The semigroupoid package covers these cases with Apply and Bind. Now I'm in a similar situa...
Novocaine asked 9/8, 2011 at 14:11
1
© 2022 - 2024 — McMap. All rights reserved.