| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Overloaded.CodeStrings
Synopsis
- class IsCodeString a where
- codeFromString :: String -> SpliceQ a
Documentation
class IsCodeString a where Source #
Class for auto-spliced string literals
The string literals "beer" is desugared into $$(codeFromString @"beer") splice.
{-# OPTIONS -fplugin=Overloaded -fplugin-opt=Overloaded:CodeLabels #-}
This feature is not very usable, see https://gitlab.haskell.org/ghc/ghc/-/issues/18211
Methods
codeFromString :: String -> SpliceQ a Source #
Instances
| IsCodeString ByteString Source # | |
Defined in Overloaded.CodeStrings Methods codeFromString :: String -> SpliceQ ByteString Source # | |
| a ~ Char => IsCodeString [a] Source # | |
Defined in Overloaded.CodeStrings Methods codeFromString :: String -> SpliceQ [a] Source # | |