unison-runtime-0.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Unison.Runtime.Stack

Documentation

data K Source #

Instances

Instances details
Show K Source # 
Instance details

Defined in Unison.Runtime.Stack

Methods

showsPrec :: Int -> K -> ShowS #

show :: K -> String #

showList :: [K] -> ShowS #

Eq K Source # 
Instance details

Defined in Unison.Runtime.Stack

Methods

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

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

Ord K Source # 
Instance details

Defined in Unison.Runtime.Stack

Methods

compare :: K -> K -> Ordering #

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

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

(>) :: K -> K -> Bool #

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

max :: K -> K -> K #

min :: K -> K -> K #

data GClosure comb Source #

Bundled Patterns

pattern DataC :: Reference -> Word64 -> [Int] -> [RClosure] -> RClosure 
pattern PApV :: RComb -> [Int] -> [RClosure] -> RClosure 
pattern CapV :: K -> Int -> Int -> [Int] -> [RClosure] -> RClosure 

Instances

Instances details
Foldable GClosure Source # 
Instance details

Defined in Unison.Runtime.Stack

Methods

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

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

foldMap' :: Monoid m => (a -> m) -> GClosure a -> m #

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

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

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

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

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

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

toList :: GClosure a -> [a] #

null :: GClosure a -> Bool #

length :: GClosure a -> Int #

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

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

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

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

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

Traversable GClosure Source # 
Instance details

Defined in Unison.Runtime.Stack

Methods

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

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

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

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

Functor GClosure Source # 
Instance details

Defined in Unison.Runtime.Stack

Methods

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

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

Show comb => Show (GClosure comb) Source # 
Instance details

Defined in Unison.Runtime.Stack

Methods

showsPrec :: Int -> GClosure comb -> ShowS #

show :: GClosure comb -> String #

showList :: [GClosure comb] -> ShowS #

Eq comb => Eq (GClosure comb) Source # 
Instance details

Defined in Unison.Runtime.Stack

Methods

(==) :: GClosure comb -> GClosure comb -> Bool #

(/=) :: GClosure comb -> GClosure comb -> Bool #

Ord comb => Ord (GClosure comb) Source # 
Instance details

Defined in Unison.Runtime.Stack

Methods

compare :: GClosure comb -> GClosure comb -> Ordering #

(<) :: GClosure comb -> GClosure comb -> Bool #

(<=) :: GClosure comb -> GClosure comb -> Bool #

(>) :: GClosure comb -> GClosure comb -> Bool #

(>=) :: GClosure comb -> GClosure comb -> Bool #

max :: GClosure comb -> GClosure comb -> GClosure comb #

min :: GClosure comb -> GClosure comb -> GClosure comb #

ForeignConvention (Ticket RClosure) Source # 
Instance details

Defined in Unison.Runtime.Foreign.Function

ForeignConvention (TVar RClosure) Source # 
Instance details

Defined in Unison.Runtime.Foreign.Function

Methods

readForeign :: [Int] -> [Int] -> Stack 'UN -> Stack 'BX -> IO ([Int], [Int], TVar RClosure) Source #

writeForeign :: Stack 'UN -> Stack 'BX -> TVar RClosure -> IO (Stack 'UN, Stack 'BX) Source #

ForeignConvention (IORef RClosure) Source # 
Instance details

Defined in Unison.Runtime.Foreign.Function

Methods

readForeign :: [Int] -> [Int] -> Stack 'UN -> Stack 'BX -> IO ([Int], [Int], IORef RClosure) Source #

writeForeign :: Stack 'UN -> Stack 'BX -> IORef RClosure -> IO (Stack 'UN, Stack 'BX) Source #

ForeignConvention (MVar RClosure) Source # 
Instance details

Defined in Unison.Runtime.Foreign.Function

Methods

readForeign :: [Int] -> [Int] -> Stack 'UN -> Stack 'BX -> IO ([Int], [Int], MVar RClosure) Source #

writeForeign :: Stack 'UN -> Stack 'BX -> MVar RClosure -> IO (Stack 'UN, Stack 'BX) Source #

ForeignConvention (Array RClosure) Source # 
Instance details

Defined in Unison.Runtime.Foreign.Function

Methods

readForeign :: [Int] -> [Int] -> Stack 'UN -> Stack 'BX -> IO ([Int], [Int], Array RClosure) Source #

writeForeign :: Stack 'UN -> Stack 'BX -> Array RClosure -> IO (Stack 'UN, Stack 'BX) Source #

ForeignConvention (Promise RClosure) Source # 
Instance details

Defined in Unison.Runtime.Foreign.Function

GClosure comb ~ Elem 'BX => ForeignConvention (GClosure comb) Source # 
Instance details

Defined in Unison.Runtime.Foreign.Function

Methods

readForeign :: [Int] -> [Int] -> Stack 'UN -> Stack 'BX -> IO ([Int], [Int], GClosure comb) Source #

writeForeign :: Stack 'UN -> Stack 'BX -> GClosure comb -> IO (Stack 'UN, Stack 'BX) Source #

GClosure comb ~ Elem 'BX => ForeignConvention [GClosure comb] Source # 
Instance details

Defined in Unison.Runtime.Foreign.Function

Methods

readForeign :: [Int] -> [Int] -> Stack 'UN -> Stack 'BX -> IO ([Int], [Int], [GClosure comb]) Source #

writeForeign :: Stack 'UN -> Stack 'BX -> [GClosure comb] -> IO (Stack 'UN, Stack 'BX) Source #

ForeignConvention (MutableArray s RClosure) Source # 
Instance details

Defined in Unison.Runtime.Foreign.Function

newtype Callback Source #

Constructors

Hook (Stack 'UN -> Stack 'BX -> IO ()) 

Instances

Instances details
Eq Callback Source # 
Instance details

Defined in Unison.Runtime.Stack

Ord Callback Source # 
Instance details

Defined in Unison.Runtime.Stack

data Augment Source #

Constructors

I 
K 
C 

data Dump Source #

Constructors

A 
F Int Int 
S 

class MEM (b :: Mem) where Source #

Associated Types

data Stack b :: Type Source #

type Elem b :: Type Source #

type Seg b :: Type Source #

Methods

alloc :: IO (Stack b) Source #

peek :: Stack b -> IO (Elem b) Source #

peekOff :: Stack b -> Off -> IO (Elem b) Source #

poke :: Stack b -> Elem b -> IO () Source #

pokeOff :: Stack b -> Off -> Elem b -> IO () Source #

grab :: Stack b -> SZ -> IO (Seg b, Stack b) Source #

ensure :: Stack b -> SZ -> IO (Stack b) Source #

bump :: Stack b -> IO (Stack b) Source #

bumpn :: Stack b -> SZ -> IO (Stack b) Source #

duplicate :: Stack b -> IO (Stack b) Source #

discardFrame :: Stack b -> IO (Stack b) Source #

saveFrame :: Stack b -> IO (Stack b, SZ, SZ) Source #

saveArgs :: Stack b -> IO (Stack b, SZ) Source #

restoreFrame :: Stack b -> SZ -> SZ -> IO (Stack b) Source #

prepareArgs :: Stack b -> Args' -> IO (Stack b) Source #

acceptArgs :: Stack b -> Int -> IO (Stack b) Source #

frameArgs :: Stack b -> IO (Stack b) Source #

augSeg :: Augment -> Stack b -> Seg b -> Maybe Args' -> IO (Seg b) Source #

dumpSeg :: Stack b -> Seg b -> Dump -> IO (Stack b) Source #

adjustArgs :: Stack b -> SZ -> IO (Stack b) Source #

fsize :: Stack b -> SZ Source #

asize :: Stack b -> SZ Source #

Instances

Instances details
MEM 'BX Source # 
Instance details

Defined in Unison.Runtime.Stack

Associated Types

data Stack 'BX Source #

type Elem 'BX Source #

type Seg 'BX Source #

MEM 'UN Source # 
Instance details

Defined in Unison.Runtime.Stack

Associated Types

data Stack 'UN Source #

type Elem 'UN Source #

type Seg 'UN Source #

type Off = Int Source #

type SZ = Int Source #

type FP = Int Source #

pokeD :: Stack 'UN -> Double -> IO () Source #

pokeOffD :: Stack 'UN -> Int -> Double -> IO () Source #

pokeN :: Stack 'UN -> Word64 -> IO () Source #

pokeOffN :: Stack 'UN -> Int -> Word64 -> IO () Source #

pokeBi :: BuiltinForeign b => Stack 'BX -> b -> IO () Source #

pokeOffBi :: BuiltinForeign b => Stack 'BX -> Int -> b -> IO () Source #

frameView :: MEM b => Show (Elem b) => Stack b -> IO () Source #