Skip to content

Commit

Permalink
Add some NOINLINEs to generic derived functions
Browse files Browse the repository at this point in the history
  • Loading branch information
TeofilC committed Oct 18, 2024
1 parent c482564 commit 81c3719
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Rel8/Generic/Rel8able.hs
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ class HTable (GColumns t) => Rel8able t where
type GColumns t = G.GColumns TColumns (GRep t Expr)
type GFromExprs t = t Result

{-# NOINLINE gfromColumns #-}
default gfromColumns :: forall context.
( SRel8able t Expr
, forall table. SRel8able t (Field table)
Expand All @@ -181,6 +182,7 @@ class HTable (GColumns t) => Rel8able t where
SName -> sfromColumns
SResult -> sfromResult

{-# NOINLINE gtoColumns #-}
default gtoColumns :: forall context.
( SRel8able t Expr
, forall table. SRel8able t (Field table)
Expand All @@ -194,10 +196,12 @@ class HTable (GColumns t) => Rel8able t where
SName -> stoColumns
SResult -> stoResult

{-# NOINLINE gfromResult #-}
default gfromResult :: (SSerialize t, GFromExprs t ~ t Result)
=> GColumns t Result -> GFromExprs t
gfromResult = sfromResult

{-# NOINLINE gtoResult #-}
default gtoResult :: (SSerialize t, GFromExprs t ~ t Result)
=> GFromExprs t -> GColumns t Result
gtoResult = stoResult
Expand Down

0 comments on commit 81c3719

Please sign in to comment.