Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
>>>
import Wakame
>>>
data Point = Point { x :: Double, y :: Double } deriving (Show, Generic)
>>>
pt = Point 1.2 8.3
keys :: (IsString s, Generic a, Keys' s (Rep a)) => a -> [s] Source #
Function to retrieve key values
Return value can be anything which has IsString
instance.
>>> import Data.Functor.Identity (Identity)
>>> keys pt :: [Identity String]
[Identity "x",Identity "y"]
class IsString s => Keys' s f where Source #
Instances
(IsString s, KnownSymbol key) => Keys' s (S1 (MetaSel (Nothing :: Maybe Symbol) su ss ds) (Rec0 (V ((,) key a))) :: k -> Type) Source # | |
(IsString s, KnownSymbol key) => Keys' s (S1 (MetaSel (Just key) su ss ds) a :: k -> Type) Source # | |
(Keys' s a, Keys' s b) => Keys' s (a :*: b :: k -> Type) Source # | |
Defined in Wakame.Keys | |
Keys' s a => Keys' s (C1 f a :: k -> Type) Source # | |
Defined in Wakame.Keys | |
Keys' s a => Keys' s (D1 f a :: k -> Type) Source # | |
Defined in Wakame.Keys |