Pat Hickey 10 anni fa
parent
commit
ca3347bba2
2 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 2 2
      src/Gidl/Backend/Haskell/Interface.hs
  2. 1 1
      src/Gidl/Interface.hs

+ 2 - 2
src/Gidl/Backend/Haskell/Interface.hs

@@ -14,7 +14,7 @@ import Ivory.Artifact
 import Text.PrettyPrint.Mainland
 
 interfaceModule :: [String] -> InterfaceRepr -> Artifact
-interfaceModule modulepath ir@(InterfaceRepr _ i) =
+interfaceModule modulepath ir =
   artifactPath (intercalate "/" modulepath) $
   artifactText ((ifModuleName ir) ++ ".hs") $
   prettyLazyText 80 $
@@ -63,7 +63,7 @@ schemaDoc interfaceName schemaName (Schema schema) = stack
             <+> text "put" <> text (cerealSize Bits32) <+> ppr h <+> text ">>"
             <+> text "put" <+> text "m"
         | (h, Message n _) <- schema ]
-
+    , empty
     , text ("get" ++ typeName) <+> colon <> colon <+> text "Get" <+> text typeName
     , text ("get" ++ typeName) <+> equals <+> text "do"
     , indent 2 $ stack

+ 1 - 1
src/Gidl/Interface.hs

@@ -30,7 +30,7 @@ interfaceParents :: Interface i t -> [i]
 interfaceParents (Interface parents _) = parents
 
 interfaceTypes :: InterfaceRepr -> [TypeRepr]
-interfaceTypes ir@(InterfaceRepr iname i) = nub (map (methodT . snd) ms)
+interfaceTypes ir = nub (map (methodT . snd) ms)
   where
   ms = interfaceMethods ir
   methodT :: Method TypeRepr -> TypeRepr