{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE PolyKinds #-}
module Haskus.Utils.Types.Symbol
( Symbol
, symbolValue
, KnownSymbol
, CmpSymbol
, SomeSymbol (..)
, sameSymbol
, someSymbolVal
)
where
import GHC.TypeLits
import Data.Proxy
symbolValue :: forall (s :: Symbol). (KnownSymbol s) => String
{-# INLINABLE symbolValue #-}
symbolValue :: String
symbolValue = Proxy s -> String
forall (n :: Symbol) (proxy :: Symbol -> *).
KnownSymbol n =>
proxy n -> String
symbolVal (Proxy s
forall k (t :: k). Proxy t
Proxy :: Proxy s)