overloaded-0.1.2: Overloaded pragmas as a plugin
Overloaded.If
Description
Overloaded if-expression.
if
class ToBool b where Source #
Class for Bool-like datastrucutres
Bool
An if--expression if b then t else e is desugared to
if-
if b then t else e
ifte (toBool b) t e
toBool
Enabled with:
{-# OPTIONS -fplugin=Overloaded -fplugin-opt=Overloaded:If #-}
Methods
toBool :: b -> Bool Source #
Defined in Overloaded.If
toBool :: Bool -> Bool Source #
Just is True
Just
True
toBool :: Maybe a -> Bool Source #
Right is True
Right
toBool :: Either b a -> Bool Source #
ifte :: ToBool b => b -> a -> a -> a Source #
ToBool overloaded if-expression.
ToBool