mirror of
https://github.com/unisonweb/unison.git
synced 2024-11-15 14:35:01 +03:00
explorerValues defined in terms of keyedCompletions stub
This commit is contained in:
parent
b4735700e5
commit
0a0e4b2b1f
@ -60,12 +60,18 @@ type alias Model =
|
||||
, explorer : Layout (Result Containment Int) }
|
||||
, errors : List String }
|
||||
|
||||
keyedCompletions : Model -> List (String,Term,Element)
|
||||
keyedCompletions model = Debug.crash "woot"
|
||||
-- let f e i = let search = e.input.string
|
||||
-- -- todo, use search string to filter wellTypedLocals
|
||||
-- in i.wellTypedLocals ++ Elmz.Result.merge (model.globalMatches search)
|
||||
-- in Maybe.withDefault [] (Elmz.Maybe.map2 f model.explorer model.localInfo)
|
||||
|
||||
explorerValues : Model -> List Term
|
||||
explorerValues model =
|
||||
let f e i = let search = e.input.string
|
||||
-- todo, use search string to filter wellTypedLocals
|
||||
in i.wellTypedLocals ++ Elmz.Result.merge (model.globalMatches search)
|
||||
in Maybe.withDefault [] (Elmz.Maybe.map2 f model.explorer model.localInfo)
|
||||
let search = Maybe.withDefault "" (Maybe.map (.input >> .string) (model.explorer))
|
||||
in List.filter (\(k,_,_) -> String.contains search k) (keyedCompletions model)
|
||||
|> List.map (\(_,e,_) -> e)
|
||||
|
||||
explorerInput : Model -> String
|
||||
explorerInput model =
|
||||
|
Loading…
Reference in New Issue
Block a user