Commit 510d8829 authored by Camil Staps's avatar Camil Staps 🍃

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
, name :: Maybe String //* Entries that match this name
, className :: Maybe String //* Exactly this class
, typeName :: Maybe String //* Exactly this type
, using :: Maybe Bool //* Return everything that *uses* what is searched for
, modules :: Maybe [String] //* Modules to search in
, libraries :: Maybe [String] //* Libraries to search in
, include_builtins :: Maybe Bool //* Whether language builtins should be included
......
......@@ -51,26 +51,29 @@ where
instance zero Request
where
zero = { unify = Nothing
, name = Nothing
, className = Nothing
, typeName = Nothing
, modules = Nothing
, libraries = Nothing
, include_builtins = Nothing
, include_core = Nothing
, include_apps = Nothing
, page = Nothing
}
zero =
{ unify = Nothing
, name = Nothing
, className = Nothing
, typeName = Nothing
, using = Nothing
, modules = Nothing
, libraries = Nothing
, include_builtins = Nothing
, include_core = Nothing
, include_apps = Nothing
, page = Nothing
}
instance zero Response
where
zero = { return = 0
, msg = "Success"
, data = []
, more_available = Nothing
, suggestions = Nothing
}
zero =
{ return = 0
, msg = "Success"
, data = []
, more_available = Nothing
, suggestions = Nothing
}
instance toString Request where toString r = toString $ toJSON r
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