Skip to content

Commit

Permalink
Move files from src-ghc to src when they depend on Language.Haskell.L…
Browse files Browse the repository at this point in the history
…iquid.*
  • Loading branch information
facundominguez committed Sep 19, 2023
1 parent e442d73 commit 97dee59
Show file tree
Hide file tree
Showing 64 changed files with 113 additions and 114 deletions.
9 changes: 4 additions & 5 deletions .hlint.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
# To be compatible with GHC naming turn off the camelCase rule.
- ignore: {name: "Use camelCase", within: [Liquid.GHC.Misc]} # 4 hints
- ignore: {name: "Use camelCase", within: [Language.Haskell.Liquid.GHC.Misc]} # 4 hints
# Linting LANGUAGE pragmas with complex CPP ifdefs is too hard.
- ignore: {
name: "Unused LANGUAGE pragma",
within: [
Liquid.GHC.API,
Liquid.GHC.Interface,
Liquid.GHC.GhcMonadLike,
Liquid.GHC.Misc
Language.Haskell.Liquid.GHC.Interface,
Language.Haskell.Liquid.GHC.Misc
]
}
# The following are kept for usability and style sake
- ignore: {name: "Avoid lambda"} # 4 hints
- ignore: {name: "Eta reduce"} # 51 hints
- ignore: {name: "Use infix"} # 3 hints
- ignore: {name: "Use infix"} # 3 hints
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ using**.
[GHC.API]: liquidhaskell-boot/src-ghc/Liquid/GHC/API.hs
[Plugin]: liquidhaskell-boot/src/Language/Haskell/Liquid/GHC/Plugin.hs
[GHC.Plugin]: liquidhaskell-boot/src/Language/Haskell/Liquid/GHC/Plugin.hs
[GHC.Interface]: liquidhaskell-boot/src-ghc/Liquid/GHC/Interface.hs
[GHC.Interface]: liquidhaskell-boot/src/Language/Haskell/Liquid/GHC/Interface.hs
[SpecFinder]: liquidhaskell-boot/src/Language/Haskell/Liquid/GHC/Plugin/SpecFinder.hs
[BareSpec]: liquidhaskell-boot/src/Language/Haskell/Liquid/Types/Specs.hs#L362
[LiftedSpec]: liquidhaskell-boot/src/Language/Haskell/Liquid/Types/Specs.hs#L559
Expand All @@ -366,7 +366,7 @@ using**.
[ghcide]: https://github.com/haskell/ghcide
[findRelevantSpecs]: liquidhaskell-boot/src/Language/Haskell/Liquid/GHC/Plugin/SpecFinder.hs#L65
[core binds]: https://hackage.haskell.org/package/ghc-9.2.5/docs/CoreSyn.html#t:CoreBind
[configureGhcTargets]: liquidhaskell-boot/src-ghc/Liquid/GHC/Interface.hs#L254
[processTargetModule]: liquidhaskell-boot/src-ghc/Liquid/GHC/Interface.hs#L483
[configureGhcTargets]: liquidhaskell-boot/src/Language/Haskell/Liquid/GHC/Interface.hs#L254
[processTargetModule]: liquidhaskell-boot/src/Language/Haskell/Liquid/GHC/Interface.hs#L483
[processModule]: liquidhaskell-boot/src/Language/Haskell/Liquid/GHC/Plugin.hs#L509

16 changes: 8 additions & 8 deletions liquidhaskell-boot/liquidhaskell-boot.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@ library
Liquid.GHC.API
Liquid.GHC.API.Extra
Liquid.GHC.API.StableModule
Liquid.GHC.Interface
Liquid.GHC.Logging
Liquid.GHC.Misc
Liquid.GHC.Play
Liquid.GHC.Resugar
Liquid.GHC.SpanStack
Liquid.GHC.Types
Liquid.GHC.TypeRep
Language.Haskell.Liquid.GHC.Interface
Language.Haskell.Liquid.GHC.Logging
Language.Haskell.Liquid.GHC.Misc
Language.Haskell.Liquid.GHC.Play
Language.Haskell.Liquid.GHC.Resugar
Language.Haskell.Liquid.GHC.SpanStack
Language.Haskell.Liquid.GHC.Types
Language.Haskell.Liquid.GHC.TypeRep
Language.Haskell.Liquid.GHC.Plugin
Language.Haskell.Liquid.GHC.Plugin.Tutorial
Language.Haskell.Liquid.LawInstances
Expand Down
4 changes: 2 additions & 2 deletions liquidhaskell-boot/src/Language/Haskell/Liquid/Bare.hs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ import Language.Fixpoint.Misc as Misc
import Language.Fixpoint.Types hiding (dcFields, DataDecl, Error, panic)
import qualified Language.Fixpoint.Types as F
import qualified Language.Haskell.Liquid.Misc as Misc -- (nubHashOn)
import qualified Liquid.GHC.Misc as GM
import qualified Language.Haskell.Liquid.GHC.Misc as GM
import qualified Liquid.GHC.API as Ghc
import Liquid.GHC.Types (StableName)
import Language.Haskell.Liquid.GHC.Types (StableName)
import Language.Haskell.Liquid.Types
import Language.Haskell.Liquid.WiredIn
import qualified Language.Haskell.Liquid.Measure as Ms
Expand Down
4 changes: 2 additions & 2 deletions liquidhaskell-boot/src/Language/Haskell/Liquid/Bare/Axiom.hs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ import Language.Fixpoint.Misc
import qualified Language.Haskell.Liquid.Measure as Ms
import qualified Language.Fixpoint.Types as F
import qualified Liquid.GHC.API as Ghc
import qualified Liquid.GHC.Misc as GM
import qualified Language.Haskell.Liquid.GHC.Misc as GM
import Language.Haskell.Liquid.Types.RefType
import Language.Haskell.Liquid.Transforms.CoreToLogic
import Liquid.GHC.Misc
import Language.Haskell.Liquid.GHC.Misc
import Language.Haskell.Liquid.Types

import Language.Haskell.Liquid.Bare.Resolve as Bare
Expand Down
4 changes: 2 additions & 2 deletions liquidhaskell-boot/src/Language/Haskell/Liquid/Bare/Check.hs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ import Data.Hashable
import qualified Language.Fixpoint.Misc as Misc
import Language.Fixpoint.SortCheck (checkSorted, checkSortedReftFull, checkSortFull)
import qualified Language.Fixpoint.Types as F
import qualified Liquid.GHC.Misc as GM
import Liquid.GHC.Play (getNonPositivesTyCon)
import qualified Language.Haskell.Liquid.GHC.Misc as GM
import Language.Haskell.Liquid.GHC.Play (getNonPositivesTyCon)
import Language.Haskell.Liquid.Misc (condNull, thd5)
import Language.Haskell.Liquid.Types
import Language.Haskell.Liquid.WiredIn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import qualified Language.Fixpoint.Types as F
import qualified Language.Fixpoint.Types.Visitor as F

import Language.Haskell.Liquid.Types.Dictionaries
import qualified Liquid.GHC.Misc as GM
import qualified Language.Haskell.Liquid.GHC.Misc as GM
import qualified Liquid.GHC.API as Ghc
import Language.Haskell.Liquid.Misc
import Language.Haskell.Liquid.Types.RefType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import qualified Data.HashSet as S
import qualified Data.Maybe as Mb

import qualified Language.Fixpoint.Types as F
import qualified Liquid.GHC.Misc as GM
import qualified Language.Haskell.Liquid.GHC.Misc as GM
import qualified Liquid.GHC.API as Ghc
import Language.Haskell.Liquid.Types.PredType (dataConPSpecType)
import qualified Language.Haskell.Liquid.Types.RefType as RT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ where
import qualified Language.Fixpoint.Types as F
-- import Control.Arrow
import Liquid.GHC.API hiding (panic, varName)
import qualified Liquid.GHC.Misc
import qualified Language.Haskell.Liquid.GHC.Misc
as GM
import Language.Haskell.Liquid.Types.Types
import Language.Haskell.Liquid.Types.RefType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import qualified Language.Fixpoint.Types as F
-- import qualified Language.Fixpoint.Types.Visitor as F
import qualified Language.Fixpoint.Misc as Misc
import Language.Fixpoint.Types (Expr(..)) -- , Symbol, symbol)
import qualified Liquid.GHC.Misc as GM
import qualified Language.Haskell.Liquid.GHC.Misc as GM
import qualified Liquid.GHC.API as Ghc
import qualified Language.Haskell.Liquid.Types.RefType as RT
import Language.Haskell.Liquid.Types hiding (fresh)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Control.Monad ((<=<))

import qualified Language.Haskell.Liquid.Measure as Ms
import qualified Language.Fixpoint.Types as F
import qualified Liquid.GHC.Misc as GM
import qualified Language.Haskell.Liquid.GHC.Misc as GM
import Language.Haskell.Liquid.Bare.Types as Bare
import Language.Haskell.Liquid.Bare.Resolve as Bare
import Language.Haskell.Liquid.Bare.Expand as Bare
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import qualified Language.Fixpoint.Misc as Misc
import qualified Language.Haskell.Liquid.Misc as Misc
import Language.Haskell.Liquid.Misc ((.||.))
import qualified Liquid.GHC.API as Ghc
import qualified Liquid.GHC.Misc as GM
import qualified Language.Haskell.Liquid.GHC.Misc as GM
import qualified Language.Haskell.Liquid.Types.RefType as RT
import Language.Haskell.Liquid.Types
-- import Language.Haskell.Liquid.Types.Bounds
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import qualified Data.Maybe as Mb --(fromMaybe, isNot
import qualified Text.PrettyPrint.HughesPJ as PJ
import qualified Data.List as L
import qualified Language.Fixpoint.Types as F
import Liquid.GHC.Misc
import Language.Haskell.Liquid.GHC.Misc
import Language.Haskell.Liquid.Types.RefType
import Language.Haskell.Liquid.Types.Types

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import qualified Data.Maybe as Mb
import qualified Data.List as L
import qualified Language.Fixpoint.Types as F
import qualified Language.Fixpoint.Types.Visitor as F
import qualified Liquid.GHC.Misc as GM
import qualified Language.Haskell.Liquid.GHC.Misc as GM
import qualified Liquid.GHC.API as Ghc
import Liquid.GHC.Types (StableName, mkStableName)
import Language.Haskell.Liquid.GHC.Types (StableName, mkStableName)
import Language.Haskell.Liquid.Types.RefType ()
import Language.Haskell.Liquid.Types
import qualified Language.Haskell.Liquid.Misc as Misc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ import qualified Language.Fixpoint.Types as F
import qualified Language.Fixpoint.Types.Visitor as F
import qualified Language.Fixpoint.Misc as Misc
import qualified Liquid.GHC.API as Ghc
import qualified Liquid.GHC.Misc as GM
import qualified Language.Haskell.Liquid.GHC.Misc as GM
import qualified Language.Haskell.Liquid.Misc as Misc
import qualified Language.Haskell.Liquid.Types.RefType as RT
import Language.Haskell.Liquid.Types.Types
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import Data.Bifunctor

import Language.Fixpoint.Misc (mapSnd)
import qualified Language.Fixpoint.Types as F
import Liquid.GHC.Misc
import Language.Haskell.Liquid.GHC.Misc
import Liquid.GHC.API
import Language.Haskell.Liquid.Types
-- import Language.Haskell.Liquid.Measure
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import qualified Data.Maybe as Mb
import qualified Language.Fixpoint.Types as F
import qualified Language.Fixpoint.Misc as Misc
import Language.Haskell.Liquid.Bare.Elaborate
import qualified Liquid.GHC.Misc
import qualified Language.Haskell.Liquid.GHC.Misc
as GM
import qualified Liquid.GHC.API
as Ghc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import qualified Language.Haskell.Liquid.Types.RefType as RT
import Language.Haskell.Liquid.Types.Types
import Language.Haskell.Liquid.Types.Specs hiding (BareSpec)
import Liquid.GHC.API as Ghc hiding (Located, Env)
import Liquid.GHC.Types (StableName)
import Language.Haskell.Liquid.GHC.Types (StableName)


type ModSpecs = M.HashMap ModName Ms.BareSpec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ import Language.Fixpoint.SortCheck (pruneUnsortedReft)

import Liquid.GHC.API hiding (panic)
import Language.Haskell.Liquid.Types.RefType
import qualified Liquid.GHC.SpanStack as Sp
import qualified Language.Haskell.Liquid.GHC.SpanStack as Sp
import Language.Haskell.Liquid.Types hiding (binds, Loc, loc, freeTyVars, Def)
import Language.Haskell.Liquid.Constraint.Types
import Language.Haskell.Liquid.Constraint.Fresh ()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import Language.Haskell.Liquid.Types
-- import Language.Haskell.Liquid.Types.RefType
-- import Language.Haskell.Liquid.Types.Fresh
import Language.Haskell.Liquid.Constraint.Types
import qualified Liquid.GHC.Misc as GM
import qualified Language.Haskell.Liquid.GHC.Misc as GM
import Liquid.GHC.API as Ghc

--------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import Liquid.GHC.API as Ghc hiding ( panic
, text
, vcat
)
import qualified Liquid.GHC.Resugar as Rs
import qualified Liquid.GHC.SpanStack as Sp
import qualified Liquid.GHC.Misc as GM -- ( isInternal, collectArguments, tickSrcSpan, showPpr )
import qualified Language.Haskell.Liquid.GHC.Resugar as Rs
import qualified Language.Haskell.Liquid.GHC.SpanStack as Sp
import qualified Language.Haskell.Liquid.GHC.Misc as GM -- ( isInternal, collectArguments, tickSrcSpan, showPpr )
import Text.PrettyPrint.HughesPJ ( text )
import Control.Monad.State
import Data.Maybe (fromMaybe, isJust, mapMaybe)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import qualified Language.Haskell.Liquid.UX.CTags as Tg
import Language.Haskell.Liquid.Constraint.Fresh
import Language.Haskell.Liquid.Constraint.Env
import Language.Haskell.Liquid.WiredIn (dictionaryVar)
import qualified Liquid.GHC.SpanStack as Sp
import Liquid.GHC.Misc ( idDataConM, hasBaseTypeVar, isDataConId) -- dropModuleNames, simplesymbol)
import qualified Language.Haskell.Liquid.GHC.SpanStack as Sp
import Language.Haskell.Liquid.GHC.Misc ( idDataConM, hasBaseTypeVar, isDataConId) -- dropModuleNames, simplesymbol)
import Liquid.GHC.API as Ghc
import Language.Haskell.Liquid.Misc
import Language.Fixpoint.Misc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import Language.Haskell.Liquid.Types hiding (loc)
import Language.Haskell.Liquid.Constraint.Types
import Language.Haskell.Liquid.Constraint.Env
import Language.Fixpoint.Misc hiding (errorstar)
import Liquid.GHC.Misc -- (concatMapM)
import Language.Haskell.Liquid.GHC.Misc -- (concatMapM)
import Liquid.GHC.API as Ghc hiding (panic, showPpr)

--------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import Language.Fixpoint.Types hiding (panic, mkQual)
import qualified Language.Fixpoint.Types.Config as FC
import Language.Fixpoint.SortCheck
import Language.Haskell.Liquid.Types.RefType
import Liquid.GHC.Misc (getSourcePos)
import Language.Haskell.Liquid.GHC.Misc (getSourcePos)
import Language.Haskell.Liquid.Misc (condNull)
import Language.Haskell.Liquid.Types.PredType
import Liquid.GHC.API hiding (Expr, mkQual, panic)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ import Liquid.GHC.API ( Alt
, TyVar
, Var(..))
import qualified Liquid.GHC.API as Ghc
import qualified Liquid.GHC.Misc as GM
import Liquid.GHC.Play (Subable(sub, subTy))
import qualified Liquid.GHC.SpanStack as Sp
import Liquid.GHC.TypeRep ()
import qualified Language.Haskell.Liquid.GHC.Misc as GM
import Language.Haskell.Liquid.GHC.Play (Subable(sub, subTy))
import qualified Language.Haskell.Liquid.GHC.SpanStack as Sp
import Language.Haskell.Liquid.GHC.TypeRep ()
import Language.Haskell.Liquid.Misc
import Language.Haskell.Liquid.Types hiding (Def,
Loc, binds,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import GHC.Types.Var (Var)
import GHC.Types.Name (NamedThing, getSrcSpan)
import GHC.Core.TyCon (TyCon)
import GHC.Core (Bind, CoreExpr, bindersOf)
import qualified Liquid.GHC.Misc as GM
import qualified Language.Haskell.Liquid.GHC.Misc as GM
import qualified Language.Fixpoint.Types as F
import Language.Fixpoint.Types.PrettyPrint (PPrint)
import Language.Haskell.Liquid.Constraint.Types (CG, CGInfo (..), CGEnv, makeRecInvariants)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import qualified Data.Maybe as Mb
-- imports for AxiomEnv
import qualified Language.Haskell.Liquid.UX.Config as Config
import Language.Haskell.Liquid.UX.DiffCheck (coreDefs, coreDeps, dependsOn, Def(..))
import qualified Liquid.GHC.Misc as GM -- (simplesymbol)
import qualified Language.Haskell.Liquid.GHC.Misc as GM -- (simplesymbol)
import qualified Data.List as L
import qualified Data.HashMap.Strict as M
import qualified Data.HashSet as S
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ import Control.DeepSeq
import Data.Maybe (isJust, mapMaybe)
import Control.Monad.State

import Liquid.GHC.SpanStack
import Language.Haskell.Liquid.GHC.SpanStack
import Liquid.GHC.API as Ghc hiding ( (<+>)
, vcat
, parens
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{-# OPTIONS_GHC -Wwarn=deprecations #-}
{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}

module Liquid.GHC.Interface (
module Language.Haskell.Liquid.GHC.Interface (

-- * Printer
pprintCBs
Expand Down Expand Up @@ -76,9 +76,9 @@ import Text.Megaparsec.Error
import Text.PrettyPrint.HughesPJ hiding (first, (<>))
import Language.Fixpoint.Types hiding (err, panic, Error, Result, Expr)
import qualified Language.Fixpoint.Misc as Misc
import Liquid.GHC.Misc
import Liquid.GHC.Types (MGIModGuts(..))
import Liquid.GHC.Play
import Language.Haskell.Liquid.GHC.Misc
import Language.Haskell.Liquid.GHC.Types (MGIModGuts(..))
import Language.Haskell.Liquid.GHC.Play
import Language.Haskell.Liquid.WiredIn (isDerivedInstance)
import qualified Language.Haskell.Liquid.Measure as Ms
import qualified Language.Haskell.Liquid.Misc as Misc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
to pay the price of a pretty-printing \"roundtrip\".
-}

module Liquid.GHC.Logging (
module Language.Haskell.Liquid.GHC.Logging (
fromPJDoc
, putWarnMsg
, mkLongErrAt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
-- accessing GHC module information. It should NEVER depend on
-- ANY module inside the Language.Haskell.Liquid.* tree.

module Liquid.GHC.Misc where
module Language.Haskell.Liquid.GHC.Misc where

import Data.String
import qualified Data.List as L
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{-# OPTIONS_GHC -Wno-incomplete-patterns #-} -- TODO(#1918): Only needed for GHC <9.0.1.

module Liquid.GHC.Play where
module Language.Haskell.Liquid.GHC.Play where

import Prelude hiding (error)

Expand All @@ -13,7 +13,7 @@ import qualified Data.List as L
import qualified Data.Maybe as Mb

import Liquid.GHC.API as Ghc hiding (substTysWith, panic,showPpr)
import Liquid.GHC.Misc ()
import Language.Haskell.Liquid.GHC.Misc ()
import Language.Haskell.Liquid.Types.Errors
import Language.Haskell.Liquid.Types.Variance

Expand Down
Loading

0 comments on commit 97dee59

Please sign in to comment.