1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 15:35:14 +03:00

Move Semantic.Core to Data.Core.

This commit is contained in:
Rob Rix 2019-06-03 11:47:03 -04:00
parent 34d7727ae7
commit 937505e04f
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7
7 changed files with 7 additions and 7 deletions

View File

@ -25,11 +25,11 @@ library
, Analysis.ScopeGraph
, Analysis.Typecheck
, Control.Effect.Readline
, Data.Core
, Data.File
, Data.Loc
, Data.Name
, Data.Stack
, Semantic.Core
-- other-modules:
-- other-extensions:
build-depends: algebraic-graphs ^>= 0.3

View File

@ -20,6 +20,7 @@ import Control.Effect.NonDet
import Control.Effect.Reader hiding (Local)
import Control.Effect.State
import Control.Monad ((<=<), guard)
import qualified Data.Core as Core
import Data.File
import Data.Function (fix)
import qualified Data.IntMap as IntMap
@ -29,7 +30,6 @@ import qualified Data.Map as Map
import Data.Monoid (Alt(..))
import Data.Name
import Prelude hiding (fail)
import qualified Semantic.Core as Core
type Precise = Int
type Env = Map.Map Name Precise

View File

@ -15,6 +15,7 @@ import Control.Effect
import Control.Effect.Fail
import Control.Effect.Reader
import Control.Monad ((>=>))
import Data.Core as Core
import Data.File
import Data.Functor
import Data.Loc
@ -22,7 +23,6 @@ import Data.Maybe (fromJust)
import Data.Name
import GHC.Stack
import Prelude hiding (fail)
import Semantic.Core as Core
eval :: (Carrier sig m, Member (Reader Loc) sig, MonadFail m) => Analysis address value m -> (Core -> m value) -> Core -> m value
eval Analysis{..} eval = \case

View File

@ -13,12 +13,12 @@ import Control.Effect.Fresh
import Control.Effect.NonDet
import Control.Effect.Reader
import Control.Effect.State
import qualified Data.Core as Core
import qualified Data.Map as Map
import Data.Maybe (fromMaybe)
import Data.Monoid (Alt(..))
import Data.Name
import qualified Data.Set as Set
import qualified Semantic.Core as Core
type Cache a = Map.Map Core.Core (Set.Set a)
type Heap a = Map.Map Name (Set.Set a)

View File

@ -13,6 +13,7 @@ import Control.Effect.Fail
import Control.Effect.Fresh
import Control.Effect.Reader
import Control.Effect.State
import qualified Data.Core as Core
import Data.File
import Data.Foldable (fold)
import Data.Function (fix)
@ -22,7 +23,6 @@ import qualified Data.Map as Map
import Data.Name
import qualified Data.Set as Set
import Prelude hiding (fail)
import qualified Semantic.Core as Core
type ImportGraph = Map.Map FilePath (Set.Set FilePath)

View File

@ -19,6 +19,7 @@ import Control.Effect.Fresh
import Control.Effect.Reader hiding (Local)
import Control.Effect.State
import Control.Monad (unless)
import qualified Data.Core as Core
import Data.File
import Data.Foldable (foldl', for_)
import Data.Function (fix)
@ -31,7 +32,6 @@ import qualified Data.Map as Map
import Data.Name
import qualified Data.Set as Set
import Prelude hiding (fail)
import qualified Semantic.Core as Core
data Monotype a
= MBool

View File

@ -1,5 +1,5 @@
{-# LANGUAGE DeriveTraversable, FlexibleContexts, LambdaCase, OverloadedStrings, RecordWildCards #-}
module Semantic.Core
module Data.Core
( Core(..)
, Edge(..)
, showCore