- = let hsModule = HsModule undefined modName (Just exports) imports decls
- modName = Module moduleName
- exports = [HsEVar (UnQual (HsIdent variableName))]
- imports = [ HsImportDecl undefined (Module "Network.HTTP.Lucu.MIMEType") False Nothing (Just (False, []))
- , HsImportDecl undefined (Module "Network.HTTP.Lucu.MIMEType.Guess") False Nothing Nothing
- , HsImportDecl undefined (Module "Data.Map") True (Just (Module "M")) Nothing
- ]
- decls = [ HsTypeSig undefined [HsIdent variableName]
- (HsQualType []
- (HsTyCon (UnQual (HsIdent "ExtMap"))))
- , HsFunBind [HsMatch undefined (HsIdent variableName)
- [] (HsUnGuardedRhs extMapExp) []]
- ]
- extMapExp = HsApp (HsVar (Qual (Module "M") (HsIdent "fromList"))) (HsList records)
- comment = "{- !!! WARNING !!!\n"
- ++ " This file is automatically generated.\n"
- ++ " DO NOT EDIT BY HAND OR YOU WILL REGRET -}\n\n"
+ = let hsModule = Module (⊥) (ModuleName moduleName) modPragma
+ Nothing (Just exports) imports decls
+ modPragma = [ LanguagePragma (⊥) [ name (show OverloadedStrings) ] ]
+ exports = [ EVar (UnQual (name variableName)) ]
+ imports = [ ImportDecl (⊥) (ModuleName "Network.HTTP.Lucu.MIMEType")
+ False False Nothing Nothing Nothing
+ , ImportDecl (⊥) (ModuleName "Network.HTTP.Lucu.MIMEType.Guess")
+ False False Nothing Nothing Nothing
+ , ImportDecl (⊥) (ModuleName "Data.Ascii")
+ False False Nothing Nothing (Just (False, []))
+ , ImportDecl (⊥) (ModuleName "Data.Map")
+ True False Nothing (Just (ModuleName "M")) Nothing
+ ]
+ decls = [ TypeSig (⊥) [name variableName]
+ (TyCon (UnQual (name "ExtMap")))
+ , nameBind (⊥) (name variableName) extMapExp
+ ]
+ comment = concat [ "{- !!! WARNING !!!\n"
+ , " This file is automatically generated.\n"
+ , " DO NOT EDIT BY HAND OR YOU WILL REGRET -}\n\n"
+ ]
+ extMapExp = qvar (ModuleName "M") (name "fromList") `app` listE records