Abbie's Haskell compiler
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.2 KiB

  1. {-# LANGUAGE TypeFamilies #-}
  2. {-# LANGUAGE GeneralizedNewtypeDeriving #-}
  3. {-# LANGUAGE DeriveGeneric #-}
  4. {-# LANGUAGE DeriveAnyClass #-}
  5. {-# LANGUAGE DerivingStrategies #-}
  6. module Main.Queries where
  7. import Data.ByteString (ByteString)
  8. import Development.Shake.Classes
  9. import Development.Shake
  10. import Frontend.Syntax.Var (ParsedVar)
  11. import Frontend.Syntax (FeModule)
  12. import GHC.Generics (Generic)
  13. import Rename.Types (FqVar, RenamedMod)
  14. newtype AhcParsedModule = AhcParsedModule { ahcpmFilePath :: String }
  15. deriving newtype (Eq, Show, Binary, Hashable, NFData)
  16. type instance RuleResult AhcParsedModule = FeModule ParsedVar
  17. newtype AhcRenamedModule = AhcRenamedModule { ahcrnFilePath :: String }
  18. deriving newtype (Eq, Show, Binary, Hashable, NFData)
  19. type instance RuleResult AhcRenamedModule = RenamedMod
  20. data AhcModuleFilepath =
  21. AhcModuleFilepath
  22. { ahcfpImportingModule :: String
  23. , ahcfpModName :: ParsedVar
  24. }
  25. deriving (Eq, Show, Generic, Binary, Hashable, NFData)
  26. type instance RuleResult AhcModuleFilepath = String
  27. newtype AhcModuleHash = AhcModuleHash { ahcmhFilePath :: String }
  28. deriving newtype (Eq, Show, Binary, Hashable, NFData)
  29. type instance RuleResult AhcModuleHash = ByteString