Archive for the ‘ Uncategorized ’ Category
My goals are simple: Represent an AST in Haskell and have the type system accurately describe what is permitted in the language. Almost immediately I was foiled. Consider this deceptively simple language: L ::= A | B | C | D A ::= 'a' B ::= 'b' C ::= 'c' '[' {B} ']' D ::= [ READ MORE ]
> import Control.Monad > cartesian xs ys = > liftM2 pair xs ys > where pair a b = (a, b) $ cartesian [1,2,3] [4,5,6] [(1,4),(1,5),(1,6),(2,4),(2,5),(2,6),(3,4),(3,5),(3,6)] Consider my imperative brain just eaten by a monad. I had come to understand monads to be something like a way to string computations together so that they would [ READ MORE ]
Site rebirth take-N. The short of it: Google Sites fails as a blog[ READ MORE ]
Get every new post delivered to your Inbox.