Safe Haskell | None |
---|---|
Language | Haskell2010 |
Another way to desugar overloaded string literals. See FromSymbol
.
Synopsis
- class FromSymbol (s :: Symbol) a where
- fromSymbol :: a
Documentation
class FromSymbol (s :: Symbol) a where Source #
Another way to desugar overloaded string literals using this class.
A string literal "example"
is desugared to
fromSymbol
@"example"
Enabled with:
{-# OPTIONS -fplugin=Overloaded -fplugin-opt=Overloaded:Symbols #-}
fromSymbol :: a Source #
Instances
(KnownNat y, KnownNat m, KnownNat d, ParseDay s ~ (,,) y m d) => FromSymbol s Day Source # | |
Defined in Overloaded.Symbols fromSymbol :: Day Source # | |
(KnownSymbol s, SeqList (ToList s)) => FromSymbol s ByteString Source # | |
Defined in Overloaded.Symbols | |
(KnownSymbol s, SeqList (ToList s)) => FromSymbol s ByteString Source # | |
Defined in Overloaded.Symbols | |
KnownSymbol s => FromSymbol s Text Source # | |
Defined in Overloaded.Symbols fromSymbol :: Text Source # | |
KnownSymbol s => FromSymbol s Text Source # | |
Defined in Overloaded.Symbols fromSymbol :: Text Source # | |
(KnownSymbol s, a ~ Char) => FromSymbol s [a] Source # | |
Defined in Overloaded.Symbols fromSymbol :: [a] Source # |