I’m running into an error that I’m not sure how to get by. Any insight appreciated
Expected: [MentionT (QExpr Sqlite m0)]
-> SqlInsertValues Sqlite (MentionT (QExpr Sqlite s0))
Actual: (forall s'. [MentionT (QExpr Sqlite s')])
-> SqlInsertValues Sqlite (MentionT (QExpr Sqlite s0))
data MentionT f = Mention {
_idxm :: C f Int32
, _eidm :: PrimaryKey EvT f
, _pidm :: C f Text -- PrimaryKey PlebT f
} deriving (Generic, Beamable)
-- readme specified this "Identity trick
type Mention = MentionT
type MentionId = PrimaryKey MentionT Identity
instance Table MentionT where
data PrimaryKey MentionT f = MentionId (C f Int32) deriving (Generic, Beamable)
primaryKey = MentionId . _idxm
mention i id = Mention default_ (val_ . EvId $ i) (val_ id)
insertExpressions :: forall be table s.
(BeamSqlBackend be, Beamable table)
=> (forall s'. [table (QExpr be s')])
-> SqlInsertValues be (table (QExpr be s))
-- like this it works
runInsert $ insert (_mentions spec') $ insertExpressions $ [
Mention default_ (val_ . EvId . wq $ i) (val_ . wq $ id) ]
I think if I specify the s in the type it will work but how do I get the type of s? ( :: _ ) ← asking the compiler doesn’t work.