on develop help sign in
Renaming url* -> service*
878dcd3Brendan Hay
gen/src/Gen/AST/Render.hs+2−2
@@ -117,8 +117,8 @@ renderAPI s = do
117 url = name (serviceName s)
117 url = name (serviceName s)
118
118
119 svc = Fun' url (Just (rawHelpText h))
119 svc = Fun' url (Just (rawHelpText h))
120− <$> pp None (urlSig url)
120+ <$> pp None (serviceSig url)
121− <*> pp Print (urlDecl s url)
121+ <*> pp Print (serviceDecl s url)
122 where
122 where
123 h = sformat ("Default request referring to version @" % stext %
123 h = sformat ("Default request referring to version @" % stext %
124 "@ of the " % stext % ". This contains the host and root path used as a starting point for constructing service requests.")
124 "@ of the " % stext % ". This contains the host and root path used as a starting point for constructing service requests.")
gen/src/Gen/Syntax.hs+4−4
@@ -33,11 +33,11 @@ import Language.Haskell.Exts.Build
33import Language.Haskell.Exts.SrcLoc
33import Language.Haskell.Exts.SrcLoc
34import Language.Haskell.Exts.Syntax hiding (Alt, Int, Lit)
34import Language.Haskell.Exts.Syntax hiding (Alt, Int, Lit)
35
35
36−urlSig :: Name -> Decl
36+serviceSig :: Name -> Decl
37−urlSig n = TypeSig noLoc [n] (TyCon "ServiceConfig")
37+serviceSig n = TypeSig noLoc [n] (TyCon "Service")
38
38
39−urlDecl :: Service a -> Name -> Decl
39+serviceDecl :: Service a -> Name -> Decl
40−urlDecl s n = sfun noLoc n [] (UnGuardedRhs rhs) noBinds
40+serviceDecl s n = sfun noLoc n [] (UnGuardedRhs rhs) noBinds
41 where
41 where
42 rhs = appFun (var "defaultService")
42 rhs = appFun (var "defaultService")
43 [ app (var "ServiceId") (str (s ^. dId))
43 [ app (var "ServiceId") (str (s ^. dId))