{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE StandaloneDeriving #-}
module PlaceHolder where
import Type ( Type )
import Outputable
import Name
import NameSet
import RdrName
import Var
import Coercion
import ConLike (ConLike)
import FieldLabel
import SrcLoc (Located)
import TcEvidence ( HsWrapper )
import Data.Data hiding ( Fixity )
import BasicTypes (Fixity)
data PlaceHolder = PlaceHolder
deriving (Data)
type family PostTc id ty
type instance PostTc Id ty = ty
type instance PostTc Name ty = PlaceHolder
type instance PostTc RdrName ty = PlaceHolder
type family PostRn id ty
type instance PostRn Id ty = ty
type instance PostRn Name ty = ty
type instance PostRn RdrName ty = PlaceHolder
placeHolderKind :: PlaceHolder
placeHolderKind = PlaceHolder
placeHolderFixity :: PlaceHolder
placeHolderFixity = PlaceHolder
placeHolderType :: PlaceHolder
placeHolderType = PlaceHolder
placeHolderTypeTc :: Type
placeHolderTypeTc = panic "Evaluated the place holder for a PostTcType"
placeHolderNames :: PlaceHolder
placeHolderNames = PlaceHolder
placeHolderNamesTc :: NameSet
placeHolderNamesTc = emptyNameSet
placeHolderHsWrapper :: PlaceHolder
placeHolderHsWrapper = PlaceHolder
type DataId id =
( DataIdPost id
, DataIdPost (NameOrRdrName id)
)
type DataIdPost id =
( Data id
, Data (PostRn id NameSet)
, Data (PostRn id Fixity)
, Data (PostRn id Bool)
, Data (PostRn id Name)
, Data (PostRn id (Located Name))
, Data (PostRn id [Name])
, Data (PostRn id id)
, Data (PostTc id Type)
, Data (PostTc id Coercion)
, Data (PostTc id id)
, Data (PostTc id [Type])
, Data (PostTc id ConLike)
, Data (PostTc id [ConLike])
, Data (PostTc id HsWrapper)
, Data (PostTc id [FieldLabel])
)
type family NameOrRdrName id where
NameOrRdrName Id = Name
NameOrRdrName Name = Name
NameOrRdrName RdrName = RdrName
type OutputableBndrId id =
( OutputableBndr id
, OutputableBndr (NameOrRdrName id)
)