hnix-0.10.1: Haskell implementation of the Nix language
Safe HaskellNone
LanguageHaskell2010

Nix.Utils.Fix1

Synopsis

Documentation

newtype Fix1 (t :: (k -> *) -> k -> *) (a :: k) Source #

The fixpoint combinator, courtesy of Gregory Malecha. https://gist.github.com/gmalecha/ceb3778b9fdaa4374976e325ac8feced

Constructors

Fix1 

Fields

Instances

Instances details
MonadReader e (t (Fix1 t)) => MonadReader e (Fix1 t) Source # 
Instance details

Defined in Nix.Utils.Fix1

Methods

ask :: Fix1 t e #

local :: (e -> e) -> Fix1 t a -> Fix1 t a #

reader :: (e -> a) -> Fix1 t a #

MonadState s (t (Fix1 t)) => MonadState s (Fix1 t) Source # 
Instance details

Defined in Nix.Utils.Fix1

Methods

get :: Fix1 t s #

put :: s -> Fix1 t () #

state :: (s -> (a, s)) -> Fix1 t a #

Monad (t (Fix1 t)) => Monad (Fix1 t) Source # 
Instance details

Defined in Nix.Utils.Fix1

Methods

(>>=) :: Fix1 t a -> (a -> Fix1 t b) -> Fix1 t b #

(>>) :: Fix1 t a -> Fix1 t b -> Fix1 t b #

return :: a -> Fix1 t a #

Functor (t (Fix1 t)) => Functor (Fix1 t) Source # 
Instance details

Defined in Nix.Utils.Fix1

Methods

fmap :: (a -> b) -> Fix1 t a -> Fix1 t b #

(<$) :: a -> Fix1 t b -> Fix1 t a #

MonadFix (t (Fix1 t)) => MonadFix (Fix1 t) Source # 
Instance details

Defined in Nix.Utils.Fix1

Methods

mfix :: (a -> Fix1 t a) -> Fix1 t a #

Applicative (t (Fix1 t)) => Applicative (Fix1 t) Source # 
Instance details

Defined in Nix.Utils.Fix1

Methods

pure :: a -> Fix1 t a #

(<*>) :: Fix1 t (a -> b) -> Fix1 t a -> Fix1 t b #

liftA2 :: (a -> b -> c) -> Fix1 t a -> Fix1 t b -> Fix1 t c #

(*>) :: Fix1 t a -> Fix1 t b -> Fix1 t b #

(<*) :: Fix1 t a -> Fix1 t b -> Fix1 t a #

Alternative (t (Fix1 t)) => Alternative (Fix1 t) Source # 
Instance details

Defined in Nix.Utils.Fix1

Methods

empty :: Fix1 t a #

(<|>) :: Fix1 t a -> Fix1 t a -> Fix1 t a #

some :: Fix1 t a -> Fix1 t [a] #

many :: Fix1 t a -> Fix1 t [a] #

MonadPlus (t (Fix1 t)) => MonadPlus (Fix1 t) Source # 
Instance details

Defined in Nix.Utils.Fix1

Methods

mzero :: Fix1 t a #

mplus :: Fix1 t a -> Fix1 t a -> Fix1 t a #

MonadIO (t (Fix1 t)) => MonadIO (Fix1 t) Source # 
Instance details

Defined in Nix.Utils.Fix1

Methods

liftIO :: IO a -> Fix1 t a #

MonadThrow (t (Fix1 t)) => MonadThrow (Fix1 t) Source # 
Instance details

Defined in Nix.Utils.Fix1

Methods

throwM :: Exception e => e -> Fix1 t a #

MonadCatch (t (Fix1 t)) => MonadCatch (Fix1 t) Source # 
Instance details

Defined in Nix.Utils.Fix1

Methods

catch :: Exception e => Fix1 t a -> (e -> Fix1 t a) -> Fix1 t a #

MonadPutStr (t (Fix1 t)) => MonadPutStr (Fix1 t) Source # 
Instance details

Defined in Nix.Standard

Methods

putStr :: String -> Fix1 t () Source #

MonadHttp (t (Fix1 t)) => MonadHttp (Fix1 t) Source # 
Instance details

Defined in Nix.Standard

MonadPaths (t (Fix1 t)) => MonadPaths (Fix1 t) Source # 
Instance details

Defined in Nix.Standard

MonadEnv (t (Fix1 t)) => MonadEnv (Fix1 t) Source # 
Instance details

Defined in Nix.Standard

MonadInstantiate (t (Fix1 t)) => MonadInstantiate (Fix1 t) Source # 
Instance details

Defined in Nix.Standard

MonadExec (t (Fix1 t)) => MonadExec (Fix1 t) Source # 
Instance details

Defined in Nix.Standard

MonadIntrospect (t (Fix1 t)) => MonadIntrospect (Fix1 t) Source # 
Instance details

Defined in Nix.Standard

Methods

recursiveSize :: a -> Fix1 t Word Source #

newtype Fix1T (t :: (k -> *) -> (* -> *) -> k -> *) (m :: * -> *) (a :: k) Source #

Constructors

Fix1T 

Fields

Instances

Instances details
MonadReader e (t (Fix1T t m) m) => MonadReader e (Fix1T t m) Source # 
Instance details

Defined in Nix.Utils.Fix1

Methods

ask :: Fix1T t m e #

local :: (e -> e) -> Fix1T t m a -> Fix1T t m a #

reader :: (e -> a) -> Fix1T t m a #

MonadState s (t (Fix1T t m) m) => MonadState s (Fix1T t m) Source # 
Instance details

Defined in Nix.Utils.Fix1

Methods

get :: Fix1T t m s #

put :: s -> Fix1T t m () #

state :: (s -> (a, s)) -> Fix1T t m a #

MonadTrans (Fix1T StandardTF) Source # 
Instance details

Defined in Nix.Standard

Methods

lift :: Monad m => m a -> Fix1T StandardTF m a #

Monad (t (Fix1T t m) m) => Monad (Fix1T t m) Source # 
Instance details

Defined in Nix.Utils.Fix1

Methods

(>>=) :: Fix1T t m a -> (a -> Fix1T t m b) -> Fix1T t m b #

(>>) :: Fix1T t m a -> Fix1T t m b -> Fix1T t m b #

return :: a -> Fix1T t m a #

Functor (t (Fix1T t m) m) => Functor (Fix1T t m) Source # 
Instance details

Defined in Nix.Utils.Fix1

Methods

fmap :: (a -> b) -> Fix1T t m a -> Fix1T t m b #

(<$) :: a -> Fix1T t m b -> Fix1T t m a #

MonadFix (t (Fix1T t m) m) => MonadFix (Fix1T t m) Source # 
Instance details

Defined in Nix.Utils.Fix1

Methods

mfix :: (a -> Fix1T t m a) -> Fix1T t m a #

MonadFail (t (Fix1T t m) m) => MonadFail (Fix1T t m) Source # 
Instance details

Defined in Nix.Utils.Fix1

Methods

fail :: String -> Fix1T t m a #

Applicative (t (Fix1T t m) m) => Applicative (Fix1T t m) Source # 
Instance details

Defined in Nix.Utils.Fix1

Methods

pure :: a -> Fix1T t m a #

(<*>) :: Fix1T t m (a -> b) -> Fix1T t m a -> Fix1T t m b #

liftA2 :: (a -> b -> c) -> Fix1T t m a -> Fix1T t m b -> Fix1T t m c #

(*>) :: Fix1T t m a -> Fix1T t m b -> Fix1T t m b #

(<*) :: Fix1T t m a -> Fix1T t m b -> Fix1T t m a #

Alternative (t (Fix1T t m) m) => Alternative (Fix1T t m) Source # 
Instance details

Defined in Nix.Utils.Fix1

Methods

empty :: Fix1T t m a #

(<|>) :: Fix1T t m a -> Fix1T t m a -> Fix1T t m a #

some :: Fix1T t m a -> Fix1T t m [a] #

many :: Fix1T t m a -> Fix1T t m [a] #

MonadPlus (t (Fix1T t m) m) => MonadPlus (Fix1T t m) Source # 
Instance details

Defined in Nix.Utils.Fix1

Methods

mzero :: Fix1T t m a #

mplus :: Fix1T t m a -> Fix1T t m a -> Fix1T t m a #

MonadIO (t (Fix1T t m) m) => MonadIO (Fix1T t m) Source # 
Instance details

Defined in Nix.Utils.Fix1

Methods

liftIO :: IO a -> Fix1T t m a #

MonadThrow (t (Fix1T t m) m) => MonadThrow (Fix1T t m) Source # 
Instance details

Defined in Nix.Utils.Fix1

Methods

throwM :: Exception e => e -> Fix1T t m a #

MonadCatch (t (Fix1T t m) m) => MonadCatch (Fix1T t m) Source # 
Instance details

Defined in Nix.Utils.Fix1

Methods

catch :: Exception e => Fix1T t m a -> (e -> Fix1T t m a) -> Fix1T t m a #

MonadMask (t (Fix1T t m) m) => MonadMask (Fix1T t m) Source # 
Instance details

Defined in Nix.Utils.Fix1

Methods

mask :: ((forall a. Fix1T t m a -> Fix1T t m a) -> Fix1T t m b) -> Fix1T t m b #

uninterruptibleMask :: ((forall a. Fix1T t m a -> Fix1T t m a) -> Fix1T t m b) -> Fix1T t m b #

generalBracket :: Fix1T t m a -> (a -> ExitCase b -> Fix1T t m c) -> (a -> Fix1T t m b) -> Fix1T t m (b, c) #

(MonadFix1T t m, MonadRef m) => MonadRef (Fix1T t m) Source # 
Instance details

Defined in Nix.Standard

Associated Types

type Ref (Fix1T t m) :: Type -> Type #

Methods

newRef :: a -> Fix1T t m (Ref (Fix1T t m) a) #

readRef :: Ref (Fix1T t m) a -> Fix1T t m a #

writeRef :: Ref (Fix1T t m) a -> a -> Fix1T t m () #

modifyRef :: Ref (Fix1T t m) a -> (a -> a) -> Fix1T t m () #

modifyRef' :: Ref (Fix1T t m) a -> (a -> a) -> Fix1T t m () #

(MonadFix1T t m, MonadAtomicRef m) => MonadAtomicRef (Fix1T t m) Source # 
Instance details

Defined in Nix.Standard

Methods

atomicModifyRef :: Ref (Fix1T t m) a -> (a -> (a, b)) -> Fix1T t m b #

atomicModifyRef' :: Ref (Fix1T t m) a -> (a -> (a, b)) -> Fix1T t m b #

MonadThunkId m => MonadThunkId (Fix1T StandardTF m) Source # 
Instance details

Defined in Nix.Standard

Associated Types

type ThunkId (Fix1T StandardTF m) Source #

(MonadFix1T t m, MonadFail (Fix1T t m), MonadFile m) => MonadFile (Fix1T t m) Source # 
Instance details

Defined in Nix.Standard

(MonadFix1T t m, MonadStore m) => MonadStore (Fix1T t m) Source # 
Instance details

Defined in Nix.Standard

MonadPutStr (t (Fix1T t m) m) => MonadPutStr (Fix1T t m) Source # 
Instance details

Defined in Nix.Standard

Methods

putStr :: String -> Fix1T t m () Source #

MonadHttp (t (Fix1T t m) m) => MonadHttp (Fix1T t m) Source # 
Instance details

Defined in Nix.Standard

MonadPaths (t (Fix1T t m) m) => MonadPaths (Fix1T t m) Source # 
Instance details

Defined in Nix.Standard

MonadEnv (t (Fix1T t m) m) => MonadEnv (Fix1T t m) Source # 
Instance details

Defined in Nix.Standard

MonadInstantiate (t (Fix1T t m) m) => MonadInstantiate (Fix1T t m) Source # 
Instance details

Defined in Nix.Standard

MonadExec (t (Fix1T t m) m) => MonadExec (Fix1T t m) Source # 
Instance details

Defined in Nix.Standard

MonadIntrospect (t (Fix1T t m) m) => MonadIntrospect (Fix1T t m) Source # 
Instance details

Defined in Nix.Standard

Methods

recursiveSize :: a -> Fix1T t m Word Source #

type Ref (Fix1T t m) Source # 
Instance details

Defined in Nix.Standard

type Ref (Fix1T t m) = Ref m
type ThunkId (Fix1T StandardTF m) Source # 
Instance details

Defined in Nix.Standard