pointfree-fancy-1.1.1.9: Tool for refactoring expressions into pointfree form

Safe HaskellNone
LanguageHaskell98

Plugin.Pl.Common

Synopsis

Documentation

data Fixity Source #

Constructors

Pref 
Inf 
Instances
Eq Fixity Source # 
Instance details

Defined in Plugin.Pl.Common

Methods

(==) :: Fixity -> Fixity -> Bool #

(/=) :: Fixity -> Fixity -> Bool #

Ord Fixity Source # 
Instance details

Defined in Plugin.Pl.Common

Show Fixity Source # 
Instance details

Defined in Plugin.Pl.Common

data Expr Source #

Instances
Eq Expr Source # 
Instance details

Defined in Plugin.Pl.Common

Methods

(==) :: Expr -> Expr -> Bool #

(/=) :: Expr -> Expr -> Bool #

Ord Expr Source # 
Instance details

Defined in Plugin.Pl.Common

Methods

compare :: Expr -> Expr -> Ordering #

(<) :: Expr -> Expr -> Bool #

(<=) :: Expr -> Expr -> Bool #

(>) :: Expr -> Expr -> Bool #

(>=) :: Expr -> Expr -> Bool #

max :: Expr -> Expr -> Expr #

min :: Expr -> Expr -> Expr #

Show Expr Source # 
Instance details

Defined in Plugin.Pl.Common

Methods

showsPrec :: Int -> Expr -> ShowS #

show :: Expr -> String #

showList :: [Expr] -> ShowS #

data Pattern Source #

Instances
Eq Pattern Source # 
Instance details

Defined in Plugin.Pl.Common

Methods

(==) :: Pattern -> Pattern -> Bool #

(/=) :: Pattern -> Pattern -> Bool #

Ord Pattern Source # 
Instance details

Defined in Plugin.Pl.Common

Show Pattern Source # 
Instance details

Defined in Plugin.Pl.Common

data Decl Source #

Constructors

Define 

Fields

Instances
Eq Decl Source # 
Instance details

Defined in Plugin.Pl.Common

Methods

(==) :: Decl -> Decl -> Bool #

(/=) :: Decl -> Decl -> Bool #

Ord Decl Source # 
Instance details

Defined in Plugin.Pl.Common

Methods

compare :: Decl -> Decl -> Ordering #

(<) :: Decl -> Decl -> Bool #

(<=) :: Decl -> Decl -> Bool #

(>) :: Decl -> Decl -> Bool #

(>=) :: Decl -> Decl -> Bool #

max :: Decl -> Decl -> Decl #

min :: Decl -> Decl -> Decl #

Show Decl Source # 
Instance details

Defined in Plugin.Pl.Common

Methods

showsPrec :: Int -> Decl -> ShowS #

show :: Decl -> String #

showList :: [Decl] -> ShowS #

data TopLevel Source #

Constructors

TLD Bool Decl 
TLE Expr 
Instances
Eq TopLevel Source # 
Instance details

Defined in Plugin.Pl.Common

Ord TopLevel Source # 
Instance details

Defined in Plugin.Pl.Common

Show TopLevel Source # 
Instance details

Defined in Plugin.Pl.Common

bt :: a Source #

readM :: (Monad m, Read a) => String -> m a Source #

data Assoc l #

Associativity of an operator.

Constructors

AssocNone l

non-associative operator (declared with infix)

AssocLeft l

left-associative operator (declared with infixl).

AssocRight l

right-associative operator (declared with infixr)

Instances
Functor Assoc 
Instance details

Defined in Language.Haskell.Exts.Syntax

Methods

fmap :: (a -> b) -> Assoc a -> Assoc b #

(<$) :: a -> Assoc b -> Assoc a #

Foldable Assoc 
Instance details

Defined in Language.Haskell.Exts.Syntax

Methods

fold :: Monoid m => Assoc m -> m #

foldMap :: Monoid m => (a -> m) -> Assoc a -> m #

foldr :: (a -> b -> b) -> b -> Assoc a -> b #

foldr' :: (a -> b -> b) -> b -> Assoc a -> b #

foldl :: (b -> a -> b) -> b -> Assoc a -> b #

foldl' :: (b -> a -> b) -> b -> Assoc a -> b #

foldr1 :: (a -> a -> a) -> Assoc a -> a #

foldl1 :: (a -> a -> a) -> Assoc a -> a #

toList :: Assoc a -> [a] #

null :: Assoc a -> Bool #

length :: Assoc a -> Int #

elem :: Eq a => a -> Assoc a -> Bool #

maximum :: Ord a => Assoc a -> a #

minimum :: Ord a => Assoc a -> a #

sum :: Num a => Assoc a -> a #

product :: Num a => Assoc a -> a #

Traversable Assoc 
Instance details

Defined in Language.Haskell.Exts.Syntax

Methods

traverse :: Applicative f => (a -> f b) -> Assoc a -> f (Assoc b) #

sequenceA :: Applicative f => Assoc (f a) -> f (Assoc a) #

mapM :: Monad m => (a -> m b) -> Assoc a -> m (Assoc b) #

sequence :: Monad m => Assoc (m a) -> m (Assoc a) #

Annotated Assoc 
Instance details

Defined in Language.Haskell.Exts.Syntax

Methods

ann :: Assoc l -> l #

amap :: (l -> l) -> Assoc l -> Assoc l #

Eq l => Eq (Assoc l) 
Instance details

Defined in Language.Haskell.Exts.Syntax

Methods

(==) :: Assoc l -> Assoc l -> Bool #

(/=) :: Assoc l -> Assoc l -> Bool #

Data l => Data (Assoc l) 
Instance details

Defined in Language.Haskell.Exts.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Assoc l -> c (Assoc l) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Assoc l) #

toConstr :: Assoc l -> Constr #

dataTypeOf :: Assoc l -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Assoc l)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Assoc l)) #

gmapT :: (forall b. Data b => b -> b) -> Assoc l -> Assoc l #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Assoc l -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Assoc l -> r #

gmapQ :: (forall d. Data d => d -> u) -> Assoc l -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Assoc l -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Assoc l -> m (Assoc l) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Assoc l -> m (Assoc l) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Assoc l -> m (Assoc l) #

Ord l => Ord (Assoc l) 
Instance details

Defined in Language.Haskell.Exts.Syntax

Methods

compare :: Assoc l -> Assoc l -> Ordering #

(<) :: Assoc l -> Assoc l -> Bool #

(<=) :: Assoc l -> Assoc l -> Bool #

(>) :: Assoc l -> Assoc l -> Bool #

(>=) :: Assoc l -> Assoc l -> Bool #

max :: Assoc l -> Assoc l -> Assoc l #

min :: Assoc l -> Assoc l -> Assoc l #

Show l => Show (Assoc l) 
Instance details

Defined in Language.Haskell.Exts.Syntax

Methods

showsPrec :: Int -> Assoc l -> ShowS #

show :: Assoc l -> String #

showList :: [Assoc l] -> ShowS #

Generic (Assoc l) 
Instance details

Defined in Language.Haskell.Exts.Syntax

Associated Types

type Rep (Assoc l) :: * -> * #

Methods

from :: Assoc l -> Rep (Assoc l) x #

to :: Rep (Assoc l) x -> Assoc l #

Pretty (Assoc l) 
Instance details

Defined in Language.Haskell.Exts.Pretty

Methods

pretty :: Assoc l -> Doc

prettyPrec :: Int -> Assoc l -> Doc

type Rep (Assoc l) 
Instance details

Defined in Language.Haskell.Exts.Syntax

type Rep (Assoc l) = D1 (MetaData "Assoc" "Language.Haskell.Exts.Syntax" "haskell-src-exts-1.20.2-2ICFwnD62Z41OwyyQu0OCQ" False) (C1 (MetaCons "AssocNone" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l)) :+: (C1 (MetaCons "AssocLeft" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l)) :+: C1 (MetaCons "AssocRight" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 l))))

fromMaybe :: a -> Maybe a -> a #

The fromMaybe function takes a default value and and Maybe value. If the Maybe is Nothing, it returns the default values; otherwise, it returns the value contained in the Maybe.

Examples

Expand

Basic usage:

>>> fromMaybe "" (Just "Hello, World!")
"Hello, World!"
>>> fromMaybe "" Nothing
""

Read an integer from a string using readMaybe. If we fail to parse an integer, we want to return 0 by default:

>>> import Text.Read ( readMaybe )
>>> fromMaybe 0 (readMaybe "5")
5
>>> fromMaybe 0 (readMaybe "")
0

fromJust :: Maybe a -> a #

The fromJust function extracts the element out of a Just and throws an error if its argument is Nothing.

Examples

Expand

Basic usage:

>>> fromJust (Just 1)
1
>>> 2 * (fromJust (Just 10))
20
>>> 2 * (fromJust Nothing)
*** Exception: Maybe.fromJust: Nothing

isJust :: Maybe a -> Bool #

The isJust function returns True iff its argument is of the form Just _.

Examples

Expand

Basic usage:

>>> isJust (Just 3)
True
>>> isJust (Just ())
True
>>> isJust Nothing
False

Only the outer constructor is taken into consideration:

>>> isJust (Just Nothing)
True

first :: Arrow a => a b c -> a (b, d) (c, d) #

Send the first component of the input through the argument arrow, and copy the rest unchanged to the output.

second :: Arrow a => a b c -> a (d, b) (d, c) #

A mirror image of first.

The default definition may be overridden with a more efficient version if desired.

(***) :: Arrow a => a b c -> a b' c' -> a (b, b') (c, c') infixr 3 #

Split the input between the two argument arrows and combine their output. Note that this is in general not a functor.

The default definition may be overridden with a more efficient version if desired.

(&&&) :: Arrow a => a b c -> a b c' -> a b (c, c') infixr 3 #

Fanout: send the input to both argument arrows and combine their output.

The default definition may be overridden with a more efficient version if desired.

(|||) :: ArrowChoice a => a b d -> a c d -> a (Either b c) d infixr 2 #

Fanin: Split the input between the two argument arrows and merge their outputs.

The default definition may be overridden with a more efficient version if desired.

(+++) :: ArrowChoice a => a b c -> a b' c' -> a (Either b b') (Either c c') infixr 2 #

Split the input between the two argument arrows, retagging and merging their outputs. Note that this is in general not a functor.

The default definition may be overridden with a more efficient version if desired.

minimumBy :: Foldable t => (a -> a -> Ordering) -> t a -> a #

The least element of a non-empty structure with respect to the given comparison function.

intersperse :: a -> [a] -> [a] #

The intersperse function takes an element and a list and `intersperses' that element between the elements of the list. For example,

>>> intersperse ',' "abcde"
"a,b,c,d,e"

assert :: Bool -> a -> a #

If the first argument evaluates to True, then the result is the second argument. Otherwise an AssertionFailed exception is raised, containing a String with the source file and line number of the call to assert.

Assertions can normally be turned on or off with a compiler flag (for GHC, assertions are normally on unless optimisation is turned on with -O or the -fignore-asserts option is given). When assertions are turned off, the first argument to assert is ignored, and the second argument is returned as the result.