Verified Commit 510d8829 authored by Camil Staps's avatar Camil Staps
Browse files

Added using field to requests for clean-cloogle/cloogle.org#52

parent 04ca6f21
...@@ -22,6 +22,7 @@ from Text.JSON import generic JSONEncode, generic JSONDecode, :: JSONNode ...@@ -22,6 +22,7 @@ from Text.JSON import generic JSONEncode, generic JSONDecode, :: JSONNode
, name :: Maybe String //* Entries that match this name , name :: Maybe String //* Entries that match this name
, className :: Maybe String //* Exactly this class , className :: Maybe String //* Exactly this class
, typeName :: Maybe String //* Exactly this type , typeName :: Maybe String //* Exactly this type
, using :: Maybe Bool //* Return everything that *uses* what is searched for
, modules :: Maybe [String] //* Modules to search in , modules :: Maybe [String] //* Modules to search in
, libraries :: Maybe [String] //* Libraries to search in , libraries :: Maybe [String] //* Libraries to search in
, include_builtins :: Maybe Bool //* Whether language builtins should be included , include_builtins :: Maybe Bool //* Whether language builtins should be included
......
...@@ -51,26 +51,29 @@ where ...@@ -51,26 +51,29 @@ where
instance zero Request instance zero Request
where where
zero = { unify = Nothing zero =
, name = Nothing { unify = Nothing
, className = Nothing , name = Nothing
, typeName = Nothing , className = Nothing
, modules = Nothing , typeName = Nothing
, libraries = Nothing , using = Nothing
, include_builtins = Nothing , modules = Nothing
, include_core = Nothing , libraries = Nothing
, include_apps = Nothing , include_builtins = Nothing
, page = Nothing , include_core = Nothing
} , include_apps = Nothing
, page = Nothing
}
instance zero Response instance zero Response
where where
zero = { return = 0 zero =
, msg = "Success" { return = 0
, data = [] , msg = "Success"
, more_available = Nothing , data = []
, suggestions = Nothing , more_available = Nothing
} , suggestions = Nothing
}
instance toString Request where toString r = toString $ toJSON r instance toString Request where toString r = toString $ toJSON r
instance toString Response where toString r = toString (toJSON r) + "\n" instance toString Response where toString r = toString (toJSON r) + "\n"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment