module Bioshake.Tags where
import Bioshake.Types
import Control.Monad
import Language.Haskell.TH
class DeDuped a
instance DeDuped a => DeDuped (a :-> b)
class HasRG a
instance (HasRG a, IsBam (a :-> b)) => HasRG (a :-> b)
class PairedEnd a
instance PairedEnd a => PairedEnd (a :-> b)
class Sorted a
class IsBam a
class IsBcf a
class IsBed a
class IsCSV a
class IsFastQ a
class IsGff a
class IsMPileup a
class IsSam a
class IsSeqzGZ a
class IsTSV a
class IsVCF a
class IsTGZ a
class IsCov a
allTags = [''IsFastQ
,''DeDuped
,''HasRG
,''IsBam
,''IsBcf
,''IsBed
,''IsCSV
,''IsGff
,''IsMPileup
,''IsSam
,''IsSeqzGZ
,''IsTSV
,''IsVCF
,''IsTGZ
,''IsCov
,''PairedEnd
,''Sorted]
allTransTagsPipe ty =
forM allTags $ \tag -> do
a <- newName "a"
return $ InstanceD Nothing [AppT (ConT tag) (VarT a)] (AppT (ConT tag) (AppT (AppT (ConT ''(:->)) (VarT a)) (ConT ty) )) []
allTransTags ty =
forM allTags $ \tag -> do
a <- newName "a"
return $ InstanceD Nothing [AppT (ConT tag) (VarT a)] (AppT (ConT tag) (AppT (ConT ty) (VarT a))) []