The user should be able to query Hawk about the context of the user expressions.
For instance, if user's prelude.hs is:
{-# LANGUAGE OverloadedStrings #-}
import qualified Data.Bool as B
import Data.List (length)
l = length
then the user query should return:
> hawk -q
{-# LANGUAGE OverloadedStrings -#}
data B.Bool = B.False | B.True
B.&& :: Bool -> Bool -> Bool
B.not :: Bool -> Bool
B.otherwise :: Bool
B.|| :: Bool -> Bool -> Bool
l :: [a] -> Int
length :: [a] -> Int
the output of the query should be readable by the user and is useful to understand what is the context.
The output of -q can be very long and we should think about how to organize it. For example, we could put data structure before function declarations, or we can have different options to toggle language extensions, data structures, functions...:
The user should be able to query
Hawk
about the context of the user expressions.For instance, if user's
prelude.hs
is:then the user query should return:
the output of the query should be readable by the user and is useful to understand what is the context. The output of
-q
can be very long and we should think about how to organize it. For example, we could put data structure before function declarations, or we can have different options to toggle language extensions, data structures, functions...:This is an improvement and can be very helpful when the user configuration grows.
A bonus of such an option is to use this system not only to show to the user the context but also to do a sanity check on ambiguities: