on develop help sign in
Disambiguating Download type
commit1eabc15467bd41ce2bde7392ec8e4ee10189604f authorBrendan Hay <brendan.g.hay@gmail.com> dateMon 5 Oct 2015, 09:40 (11 years ago) parent5b59d0d
2 files changed+8−8
core/src/Network/Google/Prelude.hs+6−6 gen/src/Gen/Syntax.hs+2−2
core/src/Network/Google/Prelude.hs+6−6
@@ -105,14 +105,14 @@ class GoogleAuth a where
105105 authToken :: Traversal' a OAuthToken
106106 -- ^ only set if unset semantics?
107107
108−newtype Download a = Download a
108+newtype MediaDownload a = MediaDownload a
109109
110−_Download :: Iso' (Download a) a
111−_Download = iso (\(Download x) -> x) Download
110+_Download :: Iso' (MediaDownload a) a
111+_Download = iso (\(MediaDownload x) -> x) MediaDownload
112112
113−instance GoogleAuth a => GoogleAuth (Download a) where
114− authKey = _Download . authKey
115− authToken = _Download . authToken
113+instance GoogleAuth a => GoogleAuth (MediaDownload a) where
114+ authKey = _MediaDownload . authKey
115+ authToken = _MediaDownload . authToken
116116
117117data Body = Body -- MediaType
118118 deriving (Eq, Show, Generic, Data, Typeable)
gen/src/Gen/Syntax.hs+2−2
@@ -136,7 +136,7 @@ downloadDecl :: Global
136136downloadDecl n p api url fs m =
137137 googleRequestDecl n ty rs alt p api url fs m pat prec
138138 where
139− ty = TyApp (TyCon "Download") (tycon n)
139+ ty = TyApp (TyCon "MediaDownload") (tycon n)
140140 rs = InsType noLoc (TyApp (TyCon "Rs") ty) (TyCon "Body")
141141
142142 alt = Just (var "AltMedia")
@@ -144,7 +144,7 @@ downloadDecl n p api url fs m =
144144 pat | _mSupportsMediaDownload m = PInfixApp PWildCard (UnQual (sym ":<|>")) (pvar "go")
145145 | otherwise = pvar "go"
146146
147− prec = PApp (UnQual "Download") [PRec (UnQual (dname n)) [PFieldWildcard]]
147+ prec = PApp (UnQual "MediaDownload") [PRec (UnQual (dname n)) [PFieldWildcard]]
148148
149149requestDecl :: Global
150150 -> Prefix