This repository was archived by the owner on Apr 1, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
semantic-core/src/Analysis Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ import Control.Effect.Fresh
1515import Control.Effect.Reader
1616import Control.Effect.State
1717import Control.Monad ((>=>) )
18- import qualified Data.Core as Core
1918import Data.File
2019import Data.Foldable (fold )
2120import Data.Function (fix )
@@ -26,7 +25,6 @@ import Data.Name
2625import Data.Proxy
2726import qualified Data.Set as Set
2827import Data.Text (Text )
29- import Data.Term
3028import Prelude hiding (fail )
3129
3230data Entry = Entry
@@ -41,8 +39,17 @@ newtype ScopeGraph = ScopeGraph { unScopeGraph :: Map.Map Entry (Set.Set Entry)
4139instance Semigroup ScopeGraph where
4240 ScopeGraph a <> ScopeGraph b = ScopeGraph (Map. unionWith (<>) a b)
4341
44- scopeGraph :: [File (Term (Core. Ann :+: Core. Core ) User )] -> (Heap User ScopeGraph , [File (Either (Loc , String ) ScopeGraph )])
4542scopeGraph
43+ :: Ord term
44+ => (forall sig m
45+ . (Carrier sig m , Member (Reader Loc ) sig , MonadFail m )
46+ => Analysis term User ScopeGraph m
47+ -> (term -> m ScopeGraph )
48+ -> (term -> m ScopeGraph )
49+ )
50+ -> [File term ]
51+ -> (Heap User ScopeGraph , [File (Either (Loc , String ) ScopeGraph )])
52+ scopeGraph eval
4653 = run
4754 . runFresh
4855 . runHeap
You can’t perform that action at this time.
0 commit comments