1{-# LANGUAGE TemplateHaskell #-}
2{-# LANGUAGE OverloadedStrings #-}
4module Stack.Config.Yaml where
6import Control.Applicative
11data Location a = Location
13 , _lExtraDep :: Maybe Bool
18instance FromJSON a => FromJSON (Location a) where
19 parseJSON = withObject "Location" $ \v ->
31instance FromJSON Git where
32 parseJSON = withObject "Git" $ \v ->
39 | LocationSimple (Location Text)
40 | LocationGit (Location Git)
44instance FromJSON Package where
46 (Simple <$> parseJSON v) <|>
47 (LocationSimple <$> parseJSON v) <|>
48 (LocationGit <$> parseJSON v)
52 , _cPackages :: [Package]
53 , _cExtraDeps :: [Text]
58instance FromJSON Config where
59 parseJSON = withObject "Config" $ \v ->
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