I think you need add the Filter type signature, which is based on the table you defined elsewhere (I am not sure if you were trying to avoid needing to type in the column names somewhere though.... I am not sure if this is possible).
Does this work for you? If the table is defined as-
share [mkPersist sqlSettings, mkMigrate "migrateAll"] [persistLowerCase|
KingsLadiesInWaiting
name String
skillLevel Int
deriving Show
|]
just add-
getMapList :: Handler [T.Text]
getMapList = runDB $ do
dbList <- selectList ([]::[Filter (KingsLadiesInWaitingGeneric backend)]) []
return (map getMapName dbList)
where getMapName (Entity (Key (PersistText mapName)) _) = mapName
When I did this it compiled.
This should make for an interesting game!