{-# language LambdaCase #-}
{-# options_ghc -Wno-unused-imports #-}
module Heidi.Data.Frame.Algorithms.GenericTrie.Generic where
import qualified Data.Set as S
import qualified Data.GenericTrie as GT
import qualified Data.Text as T (Text, pack, unpack)
import Heidi.Data.Row.GenericTrie (Row)
import Heidi.Data.Frame.Algorithms.GenericTrie (spreadWith, gatherWith)
import Core.Data.Frame.List (Frame)
import Data.Generics.Encode.Internal (VP(..), TC(..), tcTyCon, tcTyN, mkTyCon, mkTyN)
keyToValue :: [TC] -> VP
keyToValue :: [TC] -> VP
keyToValue = String -> VP
VPString (String -> VP) -> ([TC] -> String) -> [TC] -> VP
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (TC -> String) -> [TC] -> String
forall (t :: * -> *) a b. Foldable t => (a -> [b]) -> t a -> [b]
concatMap TC -> String
tcTyN
valueToKey :: VP -> [TC]
valueToKey :: VP -> [TC]
valueToKey = TC -> [TC]
forall (f :: * -> *) a. Applicative f => a -> f a
pure (TC -> [TC]) -> (VP -> TC) -> VP -> [TC]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> TC
mkTyN (String -> TC) -> (VP -> String) -> VP -> TC
forall b c a. (b -> c) -> (a -> b) -> a -> c
. VP -> String
forall a. Show a => a -> String
show