{-# LANGUAGE TypeFamilies #-}

-- | Configuration options for Lift the lambda lifter.
module GHC.Stg.Lift.Config (
    StgLiftConfig (..),
  ) where

import GHC.Prelude

import GHC.Platform.Profile

data StgLiftConfig = StgLiftConfig
  { StgLiftConfig -> Profile
c_targetProfile         :: !Profile
  , StgLiftConfig -> Maybe Int
c_liftLamsRecArgs       :: !(Maybe Int)
  -- ^ Maximum number of arguments after lambda lifting a recursive function.
  , StgLiftConfig -> Maybe Int
c_liftLamsNonRecArgs    :: !(Maybe Int)
  -- ^ Maximum number of arguments after lambda lifting non-recursive function.
  , StgLiftConfig -> Bool
c_liftLamsKnown         :: !Bool
  -- ^ Lambda lift even when this turns a known call into an unknown call.
  }
  deriving (Int -> StgLiftConfig -> ShowS
[StgLiftConfig] -> ShowS
StgLiftConfig -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StgLiftConfig] -> ShowS
$cshowList :: [StgLiftConfig] -> ShowS
show :: StgLiftConfig -> String
$cshow :: StgLiftConfig -> String
showsPrec :: Int -> StgLiftConfig -> ShowS
$cshowsPrec :: Int -> StgLiftConfig -> ShowS
Show, ReadPrec [StgLiftConfig]
ReadPrec StgLiftConfig
Int -> ReadS StgLiftConfig
ReadS [StgLiftConfig]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StgLiftConfig]
$creadListPrec :: ReadPrec [StgLiftConfig]
readPrec :: ReadPrec StgLiftConfig
$creadPrec :: ReadPrec StgLiftConfig
readList :: ReadS [StgLiftConfig]
$creadList :: ReadS [StgLiftConfig]
readsPrec :: Int -> ReadS StgLiftConfig
$creadsPrec :: Int -> ReadS StgLiftConfig
Read, StgLiftConfig -> StgLiftConfig -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StgLiftConfig -> StgLiftConfig -> Bool
$c/= :: StgLiftConfig -> StgLiftConfig -> Bool
== :: StgLiftConfig -> StgLiftConfig -> Bool
$c== :: StgLiftConfig -> StgLiftConfig -> Bool
Eq, Eq StgLiftConfig
StgLiftConfig -> StgLiftConfig -> Bool
StgLiftConfig -> StgLiftConfig -> Ordering
StgLiftConfig -> StgLiftConfig -> StgLiftConfig
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: StgLiftConfig -> StgLiftConfig -> StgLiftConfig
$cmin :: StgLiftConfig -> StgLiftConfig -> StgLiftConfig
max :: StgLiftConfig -> StgLiftConfig -> StgLiftConfig
$cmax :: StgLiftConfig -> StgLiftConfig -> StgLiftConfig
>= :: StgLiftConfig -> StgLiftConfig -> Bool
$c>= :: StgLiftConfig -> StgLiftConfig -> Bool
> :: StgLiftConfig -> StgLiftConfig -> Bool
$c> :: StgLiftConfig -> StgLiftConfig -> Bool
<= :: StgLiftConfig -> StgLiftConfig -> Bool
$c<= :: StgLiftConfig -> StgLiftConfig -> Bool
< :: StgLiftConfig -> StgLiftConfig -> Bool
$c< :: StgLiftConfig -> StgLiftConfig -> Bool
compare :: StgLiftConfig -> StgLiftConfig -> Ordering
$ccompare :: StgLiftConfig -> StgLiftConfig -> Ordering
Ord)