summaryrefslogtreecommitdiff
path: root/compiler/GHC/Data/Bool.hs
blob: 1428e7d2fd263547b62182b9259a3f77f0ca320b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
module GHC.Data.Bool
  ( OverridingBool(..)
  , overrideWith
  )
where

import GHC.Prelude

data OverridingBool
  = Auto
  | Always
  | Never
  deriving Show

overrideWith :: Bool -> OverridingBool -> Bool
overrideWith b Auto   = b
overrideWith _ Always = True
overrideWith _ Never  = False