module System.Plugins.LoadTypes
( Key (..)
, Symbol
, Type
, Errors
, PackageConf
, Module (..)
, ObjType (..)
) where
import HscTypes
data Key = Object String | Package String
type Symbol = String
type Type = String
type Errors = [String]
type PackageConf = FilePath
data Module = Module { Module -> FilePath
path :: !FilePath
, Module -> FilePath
mname :: !String
, Module -> ObjType
kind :: !ObjType
, Module -> ModIface
iface :: ModIface
, Module -> Key
key :: Key
}
instance Ord Module where
compare :: Module -> Module -> Ordering
compare Module
m1 Module
m2 = Module -> FilePath
mname Module
m1 FilePath -> FilePath -> Ordering
forall a. Ord a => a -> a -> Ordering
`compare` Module -> FilePath
mname Module
m2
instance Eq Module where
Module
m1 == :: Module -> Module -> Bool
== Module
m2 = Module -> FilePath
mname Module
m1 FilePath -> FilePath -> Bool
forall a. Eq a => a -> a -> Bool
== Module -> FilePath
mname Module
m2
data ObjType = Vanilla | Shared deriving ObjType -> ObjType -> Bool
(ObjType -> ObjType -> Bool)
-> (ObjType -> ObjType -> Bool) -> Eq ObjType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ObjType -> ObjType -> Bool
$c/= :: ObjType -> ObjType -> Bool
== :: ObjType -> ObjType -> Bool
$c== :: ObjType -> ObjType -> Bool
Eq