Data of the high genus

Data of the high genus 3r3-3589. 3r3-31. Yes, yes, you have not dreamed, and you have not misheard - it is a high kind. A gender (3r33535. Kind 3r33565.) Is a term in category theory, meaning essentially the type of type[данных]. 3r? 3572.  3r3-3589. But first, some lyrics. 3r? 3572.  3r3-3589. On Habré several articles appeared, which described in detail the method of validation of data in functional languages. 3r? 3572.  3r3-3589. This article - my five cents in this HYIP. We will look at data validation in Haskell. 3r? 3572.  3r3-3589. 3r? 3572.  3r3-3589. 3r33333. Validation Type
3r? 3572.  3r3-3589. An example of a validation ...
+ 0 -

Great power of newtypes

NewType ( Newtype ) Is a specialized data type declaration. Such that it contains only one constructor and a field. 3r3774.  3r3r7787.
newtype Foo a = Bar a
newtype Id = MkId Word
3r33737. 3r33737. 3r3774.  3r3r7787. Great power of newtypes 3r3774.  3r3r7787. What is the difference from data data type? 3r3774.  3r3r7787.
data Foo a = Bar a
data Id = MkId Word
3r33737. 3r33737. 3r3774.  3r3r7787. The main specificity of 3r3777. newtype [/b] consists in the fact that it consists of the same parts as its only field. More precisely, it differs from the original at the type level, but it has the same memory representation...
+ 0 -

TRIZ, Haskell and functional thinking

At the word TRIZ, one often recalls the thesis "an ideal system is one that does not exist (and its function is fulfilled in this case)." As a good administrator, who does not appear in the office, but everything is working at the same time.
The function and system are critical concepts in TRIZ, they even speak about the functional style of thinking. True, with these words, I personally have an association with functional programming languages.
Let's try to see how organically the ideas of functional thinking of TRIZ are displayed on Haskell, one pure functional languages ​​of general purpose.
TRIZ, Haskell and functional thinking
- mod...
+ 0 -

Cofree Will Tear Us Apart

Lately I've been working with distributed systems and I often have problems with working with data, parts of which can be in different places. Well, since I have been writing for a long time on Haskell, the description of the problem and the powerful type system have helped me to further develop this idea. We will talk about how only one carrier algebraic design has allowed to solve the problem of recycling data in general.
library , which is not yet on Hackage, but in the active development phase.
At the moment I managed to describe the directed acyclic graph, binary, prefix, pink...
+ 0 -

Software Transactional Memory on Free-Monads

Realizing that I have not written anything to Habr for a long time about FP and Haskell, and that there is a very good reason for a technical article, I decided to revive the old days. Speech in the article will be about Software Trasactional Memory (STM) , which I managed to implement on Free-monads with the participation of ADTs and MVars. And, in general, the Proof of Concept was extremely simple, in comparison with the "real" STM. Let's discuss this.

Software Transactional Memory

+ 0 -

We write heavenly bees on Cloud Haskell

We write heavenly bees on Cloud Haskell  
Hello, Habr!
Only 11577635 seconds have passed since the end of the autumn school GoTo in ITMO. The week of Distributed Systems began with the prototyping of a distributed system on Cloud Haskell. We started cheerfully and therefore quickly found out that the existing documentation without PhD is difficult to understand - and decided to write a methodology.
Under the cut, the introduction to p2p cloud haskell, a slightly functional stack of RS prototyping, motivation and "but why".
libp2p !! And he will be right. Partially.
libp2p solves the transport ...
+ 0 -