Skip to content

Instantly share code, notes, and snippets.

@fragamus
Created July 7, 2019 19:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fragamus/0ce8acb05bdff088f1a9fb396aae8d73 to your computer and use it in GitHub Desktop.
Save fragamus/0ce8acb05bdff088f1a9fb396aae8d73 to your computer and use it in GitHub Desktop.
data Module l
= Module l (Maybe (ModuleHead l)) [ModulePragma l] [ImportDecl l] [Decl l]
-- ^ an ordinary Haskell module
| XmlPage l (ModuleName l) [ModulePragma l] (XName l) [XAttr l] (Maybe (Exp l)) [Exp l]
-- ^ a module consisting of a single XML document. The ModuleName never appears in the source
-- but is needed for semantic purposes, it will be the same as the file name.
| XmlHybrid l (Maybe (ModuleHead l)) [ModulePragma l] [ImportDecl l] [Decl l]
(XName l) [XAttr l] (Maybe (Exp l)) [Exp l]
-- ^ a hybrid module combining an XML document with an ordinary module
deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment