1module Libraries (libraries) where
3import qualified Data.Map as Map
5import LoadLibraries (docs)
7libraries :: Map.Map String (Map.Map String String)
8libraries = case getLibs of
10 Error err -> error err
12getLibs :: Result (Map.Map String (Map.Map String String))
14 obj <- decodeStrict docs :: Result (JSObject JSValue)
15 modules <- valFromObj "modules" obj :: Result [JSObject JSValue]
16 Map.fromList `fmap` mapM getValues modules
19getName :: JSObject JSValue -> Result String
20getName obj = valFromObj "name" obj
22getType :: JSObject JSValue -> Result String
23getType obj = valFromObj "type" obj
25getValue :: JSObject JSValue -> Result (String,String)
26getValue obj = do n <- getName obj
30getValues :: JSObject JSValue -> Result (String, Map.Map String String)
33 vs <- valFromObj "values" obj
34 vals <- mapM getValue vs
35 return (name, Map.fromList vals)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list