
2 Jan
2009
2 Jan
'09
3:37 p.m.
On Fri, Jan 2, 2009 at 9:21 PM, Miguel Mitrofanov
module Element where import QName import ... data Element = Element {name :: QName, attribs :: [Attr], content :: [Content], line :: Maybe Line}
module Attr where import QName import ... data Attr = Attr {key :: QName, val :: String}
module QName where import ... data QName = QName {name :: String, uri :: Maybe String, prefix :: Maybe String}
module Main where import qualified QName as Q import qualified Element as E ... Q.name ... E.name ...
I'm using this pattern of writing code and, so far, I find it very convenient. Yet, the code is likely to be spread across lots of files, which is not always a Good Thing. Cristiano