From: <cod...@go...> - 2009-08-11 18:50:13
|
Revision: 389 Author: jam...@us... Date: Tue Aug 11 11:49:43 2009 Log: (objc2 branch) Include some instance declarations in generated .hs-boot files for bindings. http://code.google.com/p/hoc/source/detail?r=389 Modified: / /branches/objc2/hoc/InterfaceGenerator2/Output.hs ======================================= --- /branches/objc2/hoc/InterfaceGenerator2/Output.hs Wed Dec 10 08:29:58 2008 +++ /branches/objc2/hoc/InterfaceGenerator2/Output.hs Tue Aug 11 11:49:43 2009 @@ -66,7 +66,8 @@ <+> textBS (eHaskellName e) <> text "MetaClass") pprHsBoot entityPile modName entities - = text "module" <+> textBS modName <+> text "where" $+$ + = text "{-# OPTIONS -fglasgow-exts #-}" $+$ + text "module" <+> textBS modName <+> text "where" $+$ text "import HOC" $+$ vcat imports $+$ vcat classes @@ -84,7 +85,9 @@ <+> parens (textBS name <> char '_' <+> char 'a') $+$ text "type" <+> textBS name <> text "MetaClass" <+> char 'a' <+> equals <+> text (maybe "MetaClass" ( (++ "MetaClass") . BS.unpack . eHaskellName ) mbSuper) - <+> parens (textBS name <> char '_' <+> char 'a') + <+> parens (textBS name <> char '_' <+> char 'a') $+$ + text "instance" <+> text "ClassObject" <+> parens (textBS name <> text "Class" <+> text "()") $+$ + text "_" <> textBS name <+> text "::" <+> textBS name <> text "Class" <+> text "()" | (name, mbSuper) <- classes0 ] |