Merge pull request #180 from haskell-servant/freezeboy/js-small-fix
Fix GenerateList to let the API be nested
This commit is contained in:
commit
38eb199243
1 changed files with 2 additions and 2 deletions
|
@ -156,8 +156,8 @@ class GenerateList reqs where
|
|||
instance GenerateList AjaxReq where
|
||||
generateList r = [r]
|
||||
|
||||
instance GenerateList rest => GenerateList (AjaxReq :<|> rest) where
|
||||
generateList (r :<|> rest) = r : generateList rest
|
||||
instance (GenerateList start, GenerateList rest) => GenerateList (start :<|> rest) where
|
||||
generateList (start :<|> rest) = (generateList start) ++ (generateList rest)
|
||||
|
||||
-- | Generate the necessary data for JS codegen as a list, each 'AjaxReq'
|
||||
-- describing one endpoint from your API type.
|
||||
|
|
Loading…
Reference in a new issue