{-# LANGUAGE TemplateHaskellQuotes #-}
module Data.Singletons.Base.Util where
import Data.Functor.Identity
import Data.List.NonEmpty (NonEmpty(..))
import qualified Data.Monoid as Monoid
import Data.Semigroup as Semigroup
import Data.Void
import Language.Haskell.TH
basicTypes :: [Name]
basicTypes :: [Name]
basicTypes = [ ''Maybe
, ''[]
, ''Either
, ''NonEmpty
, ''Void
] [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ [Name]
boundedBasicTypes
boundedBasicTypes :: [Name]
boundedBasicTypes :: [Name]
boundedBasicTypes =
[ ''(,)
, ''(,,)
, ''(,,,)
, ''(,,,,)
, ''(,,,,,)
, ''(,,,,,,)
, ''Identity
] [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ [Name]
enumBasicTypes
enumBasicTypes :: [Name]
enumBasicTypes :: [Name]
enumBasicTypes = [ ''Bool, ''Ordering, ''() ]
semigroupBasicTypes :: [Name]
semigroupBasicTypes :: [Name]
semigroupBasicTypes
= [ ''Dual
, ''All
, ''Any
, ''Sum
, ''Product
, ''Min
, ''Max
, ''Semigroup.First
, ''Semigroup.Last
, ''WrappedMonoid
]
monoidBasicTypes :: [Name]
monoidBasicTypes :: [Name]
monoidBasicTypes
= [ ''Monoid.First
, ''Monoid.Last
]