-- | Phantom types for use in model definitions

module Hydra.Phantoms where

import qualified Hydra.Compute as Compute
import qualified Hydra.Core as Core
import Data.List
import Data.Map
import Data.Set

newtype Case a = 
  Case {
    forall a. Case a -> FieldName
unCase :: Core.FieldName}
  deriving (Case a -> Case a -> Bool
forall a. Case a -> Case a -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Case a -> Case a -> Bool
$c/= :: forall a. Case a -> Case a -> Bool
== :: Case a -> Case a -> Bool
$c== :: forall a. Case a -> Case a -> Bool
Eq, Case a -> Case a -> Bool
Case a -> Case a -> Ordering
Case a -> Case a -> Case a
forall a. Eq (Case a)
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
forall a. Case a -> Case a -> Bool
forall a. Case a -> Case a -> Ordering
forall a. Case a -> Case a -> Case a
min :: Case a -> Case a -> Case a
$cmin :: forall a. Case a -> Case a -> Case a
max :: Case a -> Case a -> Case a
$cmax :: forall a. Case a -> Case a -> Case a
>= :: Case a -> Case a -> Bool
$c>= :: forall a. Case a -> Case a -> Bool
> :: Case a -> Case a -> Bool
$c> :: forall a. Case a -> Case a -> Bool
<= :: Case a -> Case a -> Bool
$c<= :: forall a. Case a -> Case a -> Bool
< :: Case a -> Case a -> Bool
$c< :: forall a. Case a -> Case a -> Bool
compare :: Case a -> Case a -> Ordering
$ccompare :: forall a. Case a -> Case a -> Ordering
Ord, ReadPrec [Case a]
ReadPrec (Case a)
ReadS [Case a]
forall a. ReadPrec [Case a]
forall a. ReadPrec (Case a)
forall a. Int -> ReadS (Case a)
forall a. ReadS [Case a]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Case a]
$creadListPrec :: forall a. ReadPrec [Case a]
readPrec :: ReadPrec (Case a)
$creadPrec :: forall a. ReadPrec (Case a)
readList :: ReadS [Case a]
$creadList :: forall a. ReadS [Case a]
readsPrec :: Int -> ReadS (Case a)
$creadsPrec :: forall a. Int -> ReadS (Case a)
Read, Int -> Case a -> ShowS
forall a. Int -> Case a -> ShowS
forall a. [Case a] -> ShowS
forall a. Case a -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Case a] -> ShowS
$cshowList :: forall a. [Case a] -> ShowS
show :: Case a -> String
$cshow :: forall a. Case a -> String
showsPrec :: Int -> Case a -> ShowS
$cshowsPrec :: forall a. Int -> Case a -> ShowS
Show)

_Case :: Name
_Case = (String -> Name
Core.Name String
"hydra/phantoms.Case")

newtype Datum a = 
  Datum {
    forall a. Datum a -> Term Meta
unDatum :: (Core.Term Compute.Meta)}
  deriving (Datum a -> Datum a -> Bool
forall a. Datum a -> Datum a -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Datum a -> Datum a -> Bool
$c/= :: forall a. Datum a -> Datum a -> Bool
== :: Datum a -> Datum a -> Bool
$c== :: forall a. Datum a -> Datum a -> Bool
Eq, Datum a -> Datum a -> Bool
Datum a -> Datum a -> Ordering
Datum a -> Datum a -> Datum a
forall a. Eq (Datum a)
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
forall a. Datum a -> Datum a -> Bool
forall a. Datum a -> Datum a -> Ordering
forall a. Datum a -> Datum a -> Datum a
min :: Datum a -> Datum a -> Datum a
$cmin :: forall a. Datum a -> Datum a -> Datum a
max :: Datum a -> Datum a -> Datum a
$cmax :: forall a. Datum a -> Datum a -> Datum a
>= :: Datum a -> Datum a -> Bool
$c>= :: forall a. Datum a -> Datum a -> Bool
> :: Datum a -> Datum a -> Bool
$c> :: forall a. Datum a -> Datum a -> Bool
<= :: Datum a -> Datum a -> Bool
$c<= :: forall a. Datum a -> Datum a -> Bool
< :: Datum a -> Datum a -> Bool
$c< :: forall a. Datum a -> Datum a -> Bool
compare :: Datum a -> Datum a -> Ordering
$ccompare :: forall a. Datum a -> Datum a -> Ordering
Ord, ReadPrec [Datum a]
ReadPrec (Datum a)
ReadS [Datum a]
forall a. ReadPrec [Datum a]
forall a. ReadPrec (Datum a)
forall a. Int -> ReadS (Datum a)
forall a. ReadS [Datum a]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Datum a]
$creadListPrec :: forall a. ReadPrec [Datum a]
readPrec :: ReadPrec (Datum a)
$creadPrec :: forall a. ReadPrec (Datum a)
readList :: ReadS [Datum a]
$creadList :: forall a. ReadS [Datum a]
readsPrec :: Int -> ReadS (Datum a)
$creadsPrec :: forall a. Int -> ReadS (Datum a)
Read, Int -> Datum a -> ShowS
forall a. Int -> Datum a -> ShowS
forall a. [Datum a] -> ShowS
forall a. Datum a -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Datum a] -> ShowS
$cshowList :: forall a. [Datum a] -> ShowS
show :: Datum a -> String
$cshow :: forall a. Datum a -> String
showsPrec :: Int -> Datum a -> ShowS
$cshowsPrec :: forall a. Int -> Datum a -> ShowS
Show)

_Datum :: Name
_Datum = (String -> Name
Core.Name String
"hydra/phantoms.Datum")

data Definition a = 
  Definition {
    forall a. Definition a -> Name
definitionName :: Core.Name,
    forall a. Definition a -> Datum a
definitionDatum :: (Datum a)}
  deriving (Definition a -> Definition a -> Bool
forall a. Definition a -> Definition a -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Definition a -> Definition a -> Bool
$c/= :: forall a. Definition a -> Definition a -> Bool
== :: Definition a -> Definition a -> Bool
$c== :: forall a. Definition a -> Definition a -> Bool
Eq, Definition a -> Definition a -> Bool
Definition a -> Definition a -> Ordering
forall a. Eq (Definition a)
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
forall a. Definition a -> Definition a -> Bool
forall a. Definition a -> Definition a -> Ordering
forall a. Definition a -> Definition a -> Definition a
min :: Definition a -> Definition a -> Definition a
$cmin :: forall a. Definition a -> Definition a -> Definition a
max :: Definition a -> Definition a -> Definition a
$cmax :: forall a. Definition a -> Definition a -> Definition a
>= :: Definition a -> Definition a -> Bool
$c>= :: forall a. Definition a -> Definition a -> Bool
> :: Definition a -> Definition a -> Bool
$c> :: forall a. Definition a -> Definition a -> Bool
<= :: Definition a -> Definition a -> Bool
$c<= :: forall a. Definition a -> Definition a -> Bool
< :: Definition a -> Definition a -> Bool
$c< :: forall a. Definition a -> Definition a -> Bool
compare :: Definition a -> Definition a -> Ordering
$ccompare :: forall a. Definition a -> Definition a -> Ordering
Ord, ReadPrec [Definition a]
ReadPrec (Definition a)
ReadS [Definition a]
forall a. ReadPrec [Definition a]
forall a. ReadPrec (Definition a)
forall a. Int -> ReadS (Definition a)
forall a. ReadS [Definition a]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Definition a]
$creadListPrec :: forall a. ReadPrec [Definition a]
readPrec :: ReadPrec (Definition a)
$creadPrec :: forall a. ReadPrec (Definition a)
readList :: ReadS [Definition a]
$creadList :: forall a. ReadS [Definition a]
readsPrec :: Int -> ReadS (Definition a)
$creadsPrec :: forall a. Int -> ReadS (Definition a)
Read, Int -> Definition a -> ShowS
forall a. Int -> Definition a -> ShowS
forall a. [Definition a] -> ShowS
forall a. Definition a -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Definition a] -> ShowS
$cshowList :: forall a. [Definition a] -> ShowS
show :: Definition a -> String
$cshow :: forall a. Definition a -> String
showsPrec :: Int -> Definition a -> ShowS
$cshowsPrec :: forall a. Int -> Definition a -> ShowS
Show)

_Definition :: Name
_Definition = (String -> Name
Core.Name String
"hydra/phantoms.Definition")

_Definition_name :: FieldName
_Definition_name = (String -> FieldName
Core.FieldName String
"name")

_Definition_datum :: FieldName
_Definition_datum = (String -> FieldName
Core.FieldName String
"datum")

newtype Fld a = 
  Fld {
    forall a. Fld a -> Field Meta
unFld :: (Core.Field Compute.Meta)}
  deriving (Fld a -> Fld a -> Bool
forall a. Fld a -> Fld a -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Fld a -> Fld a -> Bool
$c/= :: forall a. Fld a -> Fld a -> Bool
== :: Fld a -> Fld a -> Bool
$c== :: forall a. Fld a -> Fld a -> Bool
Eq, Fld a -> Fld a -> Bool
Fld a -> Fld a -> Ordering
Fld a -> Fld a -> Fld a
forall a. Eq (Fld a)
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
forall a. Fld a -> Fld a -> Bool
forall a. Fld a -> Fld a -> Ordering
forall a. Fld a -> Fld a -> Fld a
min :: Fld a -> Fld a -> Fld a
$cmin :: forall a. Fld a -> Fld a -> Fld a
max :: Fld a -> Fld a -> Fld a
$cmax :: forall a. Fld a -> Fld a -> Fld a
>= :: Fld a -> Fld a -> Bool
$c>= :: forall a. Fld a -> Fld a -> Bool
> :: Fld a -> Fld a -> Bool
$c> :: forall a. Fld a -> Fld a -> Bool
<= :: Fld a -> Fld a -> Bool
$c<= :: forall a. Fld a -> Fld a -> Bool
< :: Fld a -> Fld a -> Bool
$c< :: forall a. Fld a -> Fld a -> Bool
compare :: Fld a -> Fld a -> Ordering
$ccompare :: forall a. Fld a -> Fld a -> Ordering
Ord, ReadPrec [Fld a]
ReadPrec (Fld a)
ReadS [Fld a]
forall a. ReadPrec [Fld a]
forall a. ReadPrec (Fld a)
forall a. Int -> ReadS (Fld a)
forall a. ReadS [Fld a]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Fld a]
$creadListPrec :: forall a. ReadPrec [Fld a]
readPrec :: ReadPrec (Fld a)
$creadPrec :: forall a. ReadPrec (Fld a)
readList :: ReadS [Fld a]
$creadList :: forall a. ReadS [Fld a]
readsPrec :: Int -> ReadS (Fld a)
$creadsPrec :: forall a. Int -> ReadS (Fld a)
Read, Int -> Fld a -> ShowS
forall a. Int -> Fld a -> ShowS
forall a. [Fld a] -> ShowS
forall a. Fld a -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Fld a] -> ShowS
$cshowList :: forall a. [Fld a] -> ShowS
show :: Fld a -> String
$cshow :: forall a. Fld a -> String
showsPrec :: Int -> Fld a -> ShowS
$cshowsPrec :: forall a. Int -> Fld a -> ShowS
Show)

_Fld :: Name
_Fld = (String -> Name
Core.Name String
"hydra/phantoms.Fld")

data Reference a = 
  Reference {}
  deriving (Reference a -> Reference a -> Bool
forall a. Reference a -> Reference a -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Reference a -> Reference a -> Bool
$c/= :: forall a. Reference a -> Reference a -> Bool
== :: Reference a -> Reference a -> Bool
$c== :: forall a. Reference a -> Reference a -> Bool
Eq, Reference a -> Reference a -> Bool
Reference a -> Reference a -> Ordering
forall a. Eq (Reference a)
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
forall a. Reference a -> Reference a -> Bool
forall a. Reference a -> Reference a -> Ordering
forall a. Reference a -> Reference a -> Reference a
min :: Reference a -> Reference a -> Reference a
$cmin :: forall a. Reference a -> Reference a -> Reference a
max :: Reference a -> Reference a -> Reference a
$cmax :: forall a. Reference a -> Reference a -> Reference a
>= :: Reference a -> Reference a -> Bool
$c>= :: forall a. Reference a -> Reference a -> Bool
> :: Reference a -> Reference a -> Bool
$c> :: forall a. Reference a -> Reference a -> Bool
<= :: Reference a -> Reference a -> Bool
$c<= :: forall a. Reference a -> Reference a -> Bool
< :: Reference a -> Reference a -> Bool
$c< :: forall a. Reference a -> Reference a -> Bool
compare :: Reference a -> Reference a -> Ordering
$ccompare :: forall a. Reference a -> Reference a -> Ordering
Ord, ReadPrec [Reference a]
ReadPrec (Reference a)
ReadS [Reference a]
forall a. ReadPrec [Reference a]
forall a. ReadPrec (Reference a)
forall a. Int -> ReadS (Reference a)
forall a. ReadS [Reference a]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Reference a]
$creadListPrec :: forall a. ReadPrec [Reference a]
readPrec :: ReadPrec (Reference a)
$creadPrec :: forall a. ReadPrec (Reference a)
readList :: ReadS [Reference a]
$creadList :: forall a. ReadS [Reference a]
readsPrec :: Int -> ReadS (Reference a)
$creadsPrec :: forall a. Int -> ReadS (Reference a)
Read, Int -> Reference a -> ShowS
forall a. Int -> Reference a -> ShowS
forall a. [Reference a] -> ShowS
forall a. Reference a -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Reference a] -> ShowS
$cshowList :: forall a. [Reference a] -> ShowS
show :: Reference a -> String
$cshow :: forall a. Reference a -> String
showsPrec :: Int -> Reference a -> ShowS
$cshowsPrec :: forall a. Int -> Reference a -> ShowS
Show)

_Reference :: Name
_Reference = (String -> Name
Core.Name String
"hydra/phantoms.Reference")