1{-# LANGUAGE TemplateHaskell #-}
3module Libraries (libraries) where
5import qualified Data.Map as Map
9libraries :: Map.Map String (Map.Map String String)
10libraries = case getLibs of
12 Error err -> error err
14getLibs :: Result (Map.Map String (Map.Map String String))
16 obj <- decodeStrict $(docs) :: Result (JSObject JSValue)
17 modules <- valFromObj "modules" obj :: Result [JSObject JSValue]
18 Map.fromList `fmap` mapM getValues modules
21getName :: JSObject JSValue -> Result String
22getName obj = valFromObj "name" obj
24getType :: JSObject JSValue -> Result String
25getType obj = valFromObj "type" obj
27getValue :: JSObject JSValue -> Result (String,String)
28getValue obj = do n <- getName obj
32getValues :: JSObject JSValue -> Result (String, Map.Map String String)
35 vs <- valFromObj "values" obj
36 vals <- mapM getValue vs
37 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