Here is another "minimum viable" blockchain implementation in Haskell: <a href="https://github.com/adjoint-io/nanochain" rel="nofollow">https://github.com/adjoint-io/nanochain</a>.<p>It's a bit simpler in implementation; the relevant data structures are defined a bit differently, so it could give a nice alternate perspective about what a blockchain written in Haskell may look like.
I like the idea behind this article, but this isn't the way to do it. It hides the simplicity of the blockchain concept behind arcane syntax and overly complicated higher-order typing constructs.<p><pre><code> newtype BlockF a = Block (V.Vector a) deriving (Eq, Show, Foldable, Traversable, Functor, Monoid)
type Block = BlockF Transaction
type Blockchain = Cofree MerkleF Block
</code></pre>
Does anyone really think this is how one should write software? I think that constructions like Cofree are interesting, but I don't think they're programming.
It's quite a cute idea, implementing a blockchain (a fundamentally impure concept) in Haskell. If you're interested in other cool Haskell projects, check out JoeyH[1].<p>[1]: <a href="http://joeyh.name/code/" rel="nofollow">http://joeyh.name/code/</a>