{-# LANGUAGE GeneralizedNewtypeDeriving #-}

-- TODO: remove this module
module FFICXX.Generate.Type.PackageInterface where 

import Data.Hashable              ( Hashable )
import qualified Data.HashMap.Strict as HM
--
import FFICXX.Runtime.CodeGen.Cxx ( HeaderName(..) )


newtype PackageName = PkgName String  deriving (Eq PackageName
Eq PackageName
-> (Int -> PackageName -> Int)
-> (PackageName -> Int)
-> Hashable PackageName
Int -> PackageName -> Int
PackageName -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: PackageName -> Int
$chash :: PackageName -> Int
hashWithSalt :: Int -> PackageName -> Int
$chashWithSalt :: Int -> PackageName -> Int
$cp1Hashable :: Eq PackageName
Hashable, Int -> PackageName -> ShowS
[PackageName] -> ShowS
PackageName -> String
(Int -> PackageName -> ShowS)
-> (PackageName -> String)
-> ([PackageName] -> ShowS)
-> Show PackageName
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PackageName] -> ShowS
$cshowList :: [PackageName] -> ShowS
show :: PackageName -> String
$cshow :: PackageName -> String
showsPrec :: Int -> PackageName -> ShowS
$cshowsPrec :: Int -> PackageName -> ShowS
Show, PackageName -> PackageName -> Bool
(PackageName -> PackageName -> Bool)
-> (PackageName -> PackageName -> Bool) -> Eq PackageName
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PackageName -> PackageName -> Bool
$c/= :: PackageName -> PackageName -> Bool
== :: PackageName -> PackageName -> Bool
$c== :: PackageName -> PackageName -> Bool
Eq, Eq PackageName
Eq PackageName
-> (PackageName -> PackageName -> Ordering)
-> (PackageName -> PackageName -> Bool)
-> (PackageName -> PackageName -> Bool)
-> (PackageName -> PackageName -> Bool)
-> (PackageName -> PackageName -> Bool)
-> (PackageName -> PackageName -> PackageName)
-> (PackageName -> PackageName -> PackageName)
-> Ord PackageName
PackageName -> PackageName -> Bool
PackageName -> PackageName -> Ordering
PackageName -> PackageName -> PackageName
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: PackageName -> PackageName -> PackageName
$cmin :: PackageName -> PackageName -> PackageName
max :: PackageName -> PackageName -> PackageName
$cmax :: PackageName -> PackageName -> PackageName
>= :: PackageName -> PackageName -> Bool
$c>= :: PackageName -> PackageName -> Bool
> :: PackageName -> PackageName -> Bool
$c> :: PackageName -> PackageName -> Bool
<= :: PackageName -> PackageName -> Bool
$c<= :: PackageName -> PackageName -> Bool
< :: PackageName -> PackageName -> Bool
$c< :: PackageName -> PackageName -> Bool
compare :: PackageName -> PackageName -> Ordering
$ccompare :: PackageName -> PackageName -> Ordering
$cp1Ord :: Eq PackageName
Ord)
newtype ClassName = ClsName String deriving (Eq ClassName
Eq ClassName
-> (Int -> ClassName -> Int)
-> (ClassName -> Int)
-> Hashable ClassName
Int -> ClassName -> Int
ClassName -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: ClassName -> Int
$chash :: ClassName -> Int
hashWithSalt :: Int -> ClassName -> Int
$chashWithSalt :: Int -> ClassName -> Int
$cp1Hashable :: Eq ClassName
Hashable, Int -> ClassName -> ShowS
[ClassName] -> ShowS
ClassName -> String
(Int -> ClassName -> ShowS)
-> (ClassName -> String)
-> ([ClassName] -> ShowS)
-> Show ClassName
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ClassName] -> ShowS
$cshowList :: [ClassName] -> ShowS
show :: ClassName -> String
$cshow :: ClassName -> String
showsPrec :: Int -> ClassName -> ShowS
$cshowsPrec :: Int -> ClassName -> ShowS
Show, ClassName -> ClassName -> Bool
(ClassName -> ClassName -> Bool)
-> (ClassName -> ClassName -> Bool) -> Eq ClassName
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ClassName -> ClassName -> Bool
$c/= :: ClassName -> ClassName -> Bool
== :: ClassName -> ClassName -> Bool
$c== :: ClassName -> ClassName -> Bool
Eq, Eq ClassName
Eq ClassName
-> (ClassName -> ClassName -> Ordering)
-> (ClassName -> ClassName -> Bool)
-> (ClassName -> ClassName -> Bool)
-> (ClassName -> ClassName -> Bool)
-> (ClassName -> ClassName -> Bool)
-> (ClassName -> ClassName -> ClassName)
-> (ClassName -> ClassName -> ClassName)
-> Ord ClassName
ClassName -> ClassName -> Bool
ClassName -> ClassName -> Ordering
ClassName -> ClassName -> ClassName
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: ClassName -> ClassName -> ClassName
$cmin :: ClassName -> ClassName -> ClassName
max :: ClassName -> ClassName -> ClassName
$cmax :: ClassName -> ClassName -> ClassName
>= :: ClassName -> ClassName -> Bool
$c>= :: ClassName -> ClassName -> Bool
> :: ClassName -> ClassName -> Bool
$c> :: ClassName -> ClassName -> Bool
<= :: ClassName -> ClassName -> Bool
$c<= :: ClassName -> ClassName -> Bool
< :: ClassName -> ClassName -> Bool
$c< :: ClassName -> ClassName -> Bool
compare :: ClassName -> ClassName -> Ordering
$ccompare :: ClassName -> ClassName -> Ordering
$cp1Ord :: Eq ClassName
Ord)

type PackageInterface = HM.HashMap (PackageName, ClassName) HeaderName