A functional programming language

learn more… | top users | synonyms

11
votes
0answers
278 views

Why do Haskell functors only have derived types in their target category?

In Haskell, the Functor typeclass functor is defined as follows (see e.g. Haskell wiki): class Functor (f :: * -> *) where fmap :: (a -> b) -> f a -> f b As far as I understand (...
5
votes
0answers
170 views

Using Haskell type classes to enforce commutativity

I want to define a type class for geometric objects that can be intersected together: class Intersect a b c | a b -> c where intersect :: a -> b -> c -- Language extensions: -...
3
votes
0answers
103 views

Event driven programming in Haskell

I'm new to Haskell, so this is more a high-level conceptual question. I've read this: https://wiki.haskell.org/Real_World_Applications/Event_Driven_Applications and it has this: run :: Domain -> [...
1
vote
0answers
38 views

Between Applicative Functor and Monad

Is it possible to design an Applicative Functor with a few extra stack manipulation functions push, pop, and a specialized branching function ifA :: forall a. f Boolean -> f a -> f a -> f a, ...
1
vote
0answers
63 views

Chronological/evolutionary positioning of Curry in relation to Haskell and Prolog

is Curry a transitional language from FP to Logic Programming (Haskell to Prolog), like Scala is a transitional language from imperative to FP (Java to Haskell)? I find it hard to come up with a ...
1
vote
0answers
144 views

Is there a way to force evaluation in GHCi?

I'm messing around with binary trees, and I'm trying to get a very rough benchmark of a few functions using GHCi. I only want to get the time required to evaluate the test functions; not how long it ...
0
votes
0answers
51 views

Free Applicative Functor Performance

It is well known that the Free Monad has poor performance when compared to using standard mtl. However I think a Free Applicative Functor opens the doors to full static analysis. For a computation ...
0
votes
0answers
36 views

Do I have to add every single libary's licence to my project's docs when I redistribute it in binary form?

The libraries I used are mostly licensed under BSD/1,2,3 and all included in the Haskell Platform.
0
votes
0answers
109 views

Haskell + OpenGL framework

I'm writing a framework in Haskell where I'd like to use OpenGL to draw lines, shapes... I'm encountering a problem defining the structure of my program. I have for example a Polyline type which holds ...