1module Types.Hints (hints) where
3import Control.Arrow (first)
4import qualified Data.Map as Map
6import qualified Libraries as Libs
7import Parse.Library (iParse)
9import qualified Types.Substitutions as Subs
12hints :: GuidCounter [(String, Scheme)]
13hints = mapM toScheme values
15 values :: [(String, String)]
16 values = addPrefixes (Map.toList (Map.map Map.toList Libs.libraries))
18 addPrefixes :: [(String,[(String, String)])] -> [(String, String)]
19 addPrefixes = concatMap (\(m,vs) -> map (first (\n -> m ++ "." ++ n)) vs)
21 toScheme :: (String, String) -> GuidCounter (String, Scheme)
22 toScheme (name, tipeString) =
23 case iParse (fmap toType typeExpr) "parsing types in docs.json" tipeString of
24 Left err -> error (show err)
25 Right tipe -> do scheme <- Subs.generalize [] =<< Subs.superize name tipe
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