{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DerivingStrategies #-} module Main.Queries where import Data.ByteString (ByteString) import Development.Shake.Classes import Development.Shake import Frontend.Syntax.Var (ParsedVar) import Frontend.Syntax (FeModule) import GHC.Generics (Generic) import Rename.Types (FqVar, RenamedMod) newtype AhcParsedModule = AhcParsedModule { ahcpmFilePath :: String } deriving newtype (Eq, Show, Binary, Hashable, NFData) type instance RuleResult AhcParsedModule = FeModule ParsedVar newtype AhcRenamedModule = AhcRenamedModule { ahcrnFilePath :: String } deriving newtype (Eq, Show, Binary, Hashable, NFData) type instance RuleResult AhcRenamedModule = RenamedMod data AhcModuleFilepath = AhcModuleFilepath { ahcfpImportingModule :: String , ahcfpModName :: ParsedVar } deriving (Eq, Show, Generic, Binary, Hashable, NFData) type instance RuleResult AhcModuleFilepath = String newtype AhcModuleHash = AhcModuleHash { ahcmhFilePath :: String } deriving newtype (Eq, Show, Binary, Hashable, NFData) type instance RuleResult AhcModuleHash = ByteString