[Haskell-cafe] Object oriented haskell.
silvio
silvio.frischi at gmail.com
Thu May 15 21:12:10 UTC 2014
I read over the first few example and it does not collide with my
library. In fact, It could benefit from my library. From both (.) as
well as the label construction. Actually I didn't get how they make the
labels (getX).
type instance Output (a .*. b) label = OOOutput (a .*. b) label
type family OOOutput where
OOOutput (label .=. out .*. rest) label = out
OOOutput (noMatch .*. rest) label = OOOutput rest label
instance Action (label .=. out .*. rest) label where
(_ .=. action .*. _) . _ = action
instance Action (noMatch .*. rest) label where
(_ .*. rest) . b = rest . b
I didn't compile this since i didn't have their code so there are
probably some errors. Also I assumed their .*. are typeOperators even
though they don't start with a :. But the idea should be clear.
silvio
More information about the Haskell-Cafe
mailing list