Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Args'
- data Args
- data RefNums = RN {}
- data MLit
- data GInstr comb
- = UPrim1 !UPrim1 !Int
- | UPrim2 !UPrim2 !Int !Int
- | BPrim1 !BPrim1 !Int
- | BPrim2 !BPrim2 !Int !Int
- | RefCAS !Int !Int !Int
- | ForeignCall !Bool !ForeignFunc !Args
- | SetDyn !Word64 !Int
- | Capture !Word64
- | Name !(GRef comb) !Args
- | Info !String
- | Pack !Reference !PackedTag !Args
- | Lit !MLit
- | Print !Int
- | Reset !(EnumSet Word64)
- | Fork !Int
- | Atomically !Int
- | Seq !Args
- | TryForce !Int
- | SandboxingFailure !Text
- type Instr = GInstr CombIx
- type RInstr val = GInstr (RComb val)
- data GSection comb where
- App !Bool !(GRef comb) !Args
- Call !Bool !CombIx comb !Args
- Jump !Int !Args
- Match !Int !(GBranch comb)
- Yield !Args
- Ins !(GInstr comb) !(GSection comb)
- Let !(GSection comb) !CombIx !Int !(GSection comb)
- Die String
- Exit
- DMatch !(Maybe Reference) !Int !(GBranch comb)
- NMatch !(Maybe Reference) !Int !(GBranch comb)
- RMatch !Int !(GSection comb) !(EnumMap Word64 (GBranch comb))
- pattern MatchT :: Int -> GSection comb -> Map Text (GSection comb) -> GSection comb
- pattern MatchW :: Int -> GSection comb -> EnumMap Word64 (GSection comb) -> GSection comb
- type RSection val = GSection (RComb val)
- type Section = GSection CombIx
- data GComb val comb where
- data GCombInfo comb = LamI !Int !Int !(GSection comb)
- type Comb = GComb Void CombIx
- newtype RComb val = RComb {}
- type RCombInfo val = GCombInfo (RComb val)
- type GCombs val comb = EnumMap Word64 (GComb val comb)
- type RCombs val = GCombs val (RComb val)
- data CombIx = CIx !Reference !Word64 !Word64
- data GRef comb
- type RRef val = GRef (RComb val)
- type Ref = GRef CombIx
- data UPrim1
- data UPrim2
- data BPrim1
- data BPrim2
- data GBranch comb
- type Branch = GBranch CombIx
- type RBranch val = GBranch (RComb val)
- emitCombs :: Var v => RefNums -> Reference -> Word64 -> SuperGroup v -> EnumMap Word64 Comb
- emitComb :: Var v => RefNums -> Reference -> Word64 -> RCtx v -> (Word64, SuperNormal v) -> EnumMap Word64 Comb
- resolveCombs :: Maybe (EnumMap Word64 (RCombs val)) -> EnumMap Word64 (GCombs val CombIx) -> EnumMap Word64 (RCombs val)
- sanitizeCombsOfForeignFuncs :: Bool -> Set ForeignFunc -> EnumMap Word64 (EnumMap Word64 (GComb Void CombIx)) -> EnumMap Word64 (EnumMap Word64 (GComb Void CombIx))
- absurdCombs :: EnumMap Word64 (EnumMap Word64 (GComb Void cix)) -> EnumMap Word64 (GCombs any cix)
- emptyRNs :: RefNums
- argsToLists :: Args -> [Int]
- countArgs :: Args -> Int
- combRef :: CombIx -> Reference
- combDeps :: GComb val comb -> [Word64]
- combTypes :: GComb any comb -> [Word64]
- prettyCombs :: Word64 -> EnumMap Word64 Comb -> ShowS
- prettyComb :: (Show val, Show comb) => Word64 -> Word64 -> GComb val comb -> ShowS
Documentation
UPrim1 !UPrim1 !Int | |
UPrim2 !UPrim2 !Int !Int | |
BPrim1 !BPrim1 !Int | |
BPrim2 !BPrim2 !Int !Int | |
RefCAS !Int !Int !Int | |
ForeignCall !Bool !ForeignFunc !Args | |
SetDyn !Word64 !Int | |
Capture !Word64 | |
Name !(GRef comb) !Args | |
Info !String | |
Pack !Reference !PackedTag !Args | |
Lit !MLit | |
Print !Int | |
Reset !(EnumSet Word64) | |
Fork !Int | |
Atomically !Int | |
Seq !Args | |
TryForce !Int | |
SandboxingFailure !Text |
Instances
Foldable GInstr Source # | |
Defined in Unison.Runtime.MCode fold :: Monoid m => GInstr m -> m # foldMap :: Monoid m => (a -> m) -> GInstr a -> m # foldMap' :: Monoid m => (a -> m) -> GInstr a -> m # foldr :: (a -> b -> b) -> b -> GInstr a -> b # foldr' :: (a -> b -> b) -> b -> GInstr a -> b # foldl :: (b -> a -> b) -> b -> GInstr a -> b # foldl' :: (b -> a -> b) -> b -> GInstr a -> b # foldr1 :: (a -> a -> a) -> GInstr a -> a # foldl1 :: (a -> a -> a) -> GInstr a -> a # elem :: Eq a => a -> GInstr a -> Bool # maximum :: Ord a => GInstr a -> a # minimum :: Ord a => GInstr a -> a # | |
Traversable GInstr Source # | |
Functor GInstr Source # | |
Show comb => Show (GInstr comb) Source # | |
Eq (GInstr comb) Source # | |
Ord (GInstr comb) Source # | |
Defined in Unison.Runtime.MCode |
App !Bool !(GRef comb) !Args | |
Call !Bool !CombIx comb !Args | |
Jump !Int !Args | |
Match !Int !(GBranch comb) | |
Yield !Args | |
Ins !(GInstr comb) !(GSection comb) | |
Let !(GSection comb) !CombIx !Int !(GSection comb) | |
Die String | |
Exit | |
DMatch !(Maybe Reference) !Int !(GBranch comb) | |
NMatch !(Maybe Reference) !Int !(GBranch comb) | |
RMatch !Int !(GSection comb) !(EnumMap Word64 (GBranch comb)) |
pattern MatchT :: Int -> GSection comb -> Map Text (GSection comb) -> GSection comb | |
pattern MatchW :: Int -> GSection comb -> EnumMap Word64 (GSection comb) -> GSection comb |
Instances
Foldable GSection Source # | |
Defined in Unison.Runtime.MCode fold :: Monoid m => GSection m -> m # foldMap :: Monoid m => (a -> m) -> GSection a -> m # foldMap' :: Monoid m => (a -> m) -> GSection a -> m # foldr :: (a -> b -> b) -> b -> GSection a -> b # foldr' :: (a -> b -> b) -> b -> GSection a -> b # foldl :: (b -> a -> b) -> b -> GSection a -> b # foldl' :: (b -> a -> b) -> b -> GSection a -> b # foldr1 :: (a -> a -> a) -> GSection a -> a # foldl1 :: (a -> a -> a) -> GSection a -> a # elem :: Eq a => a -> GSection a -> Bool # maximum :: Ord a => GSection a -> a # minimum :: Ord a => GSection a -> a # | |
Traversable GSection Source # | |
Functor GSection Source # | |
Show comb => Show (GSection comb) Source # | |
Eq comb => Eq (GSection comb) Source # | |
Ord comb => Ord (GSection comb) Source # | |
Defined in Unison.Runtime.MCode compare :: GSection comb -> GSection comb -> Ordering # (<) :: GSection comb -> GSection comb -> Bool # (<=) :: GSection comb -> GSection comb -> Bool # (>) :: GSection comb -> GSection comb -> Bool # (>=) :: GSection comb -> GSection comb -> Bool # |
Instances
Bifoldable GComb Source # | |
Bifunctor GComb Source # | |
Bitraversable GComb Source # | |
Defined in Unison.Runtime.MCode bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> GComb a b -> f (GComb c d) # | |
Foldable (GComb val) Source # | |
Defined in Unison.Runtime.MCode fold :: Monoid m => GComb val m -> m # foldMap :: Monoid m => (a -> m) -> GComb val a -> m # foldMap' :: Monoid m => (a -> m) -> GComb val a -> m # foldr :: (a -> b -> b) -> b -> GComb val a -> b # foldr' :: (a -> b -> b) -> b -> GComb val a -> b # foldl :: (b -> a -> b) -> b -> GComb val a -> b # foldl' :: (b -> a -> b) -> b -> GComb val a -> b # foldr1 :: (a -> a -> a) -> GComb val a -> a # foldl1 :: (a -> a -> a) -> GComb val a -> a # toList :: GComb val a -> [a] # length :: GComb val a -> Int # elem :: Eq a => a -> GComb val a -> Bool # maximum :: Ord a => GComb val a -> a # minimum :: Ord a => GComb val a -> a # | |
Traversable (GComb val) Source # | |
Functor (GComb val) Source # | |
(Show comb, Show val) => Show (GComb val comb) Source # | |
(Eq comb, Eq val) => Eq (GComb val comb) Source # | |
(Ord comb, Ord val) => Ord (GComb val comb) Source # | |
Defined in Unison.Runtime.MCode compare :: GComb val comb -> GComb val comb -> Ordering # (<) :: GComb val comb -> GComb val comb -> Bool # (<=) :: GComb val comb -> GComb val comb -> Bool # (>) :: GComb val comb -> GComb val comb -> Bool # (>=) :: GComb val comb -> GComb val comb -> Bool # |
Instances
The fixed point of a GComb where all references to a Comb are themselves Combs.
type GCombs val comb = EnumMap Word64 (GComb val comb) Source #
Map of combinators, parameterized by comb reference type
Instances
Foldable GRef Source # | |
Defined in Unison.Runtime.MCode fold :: Monoid m => GRef m -> m # foldMap :: Monoid m => (a -> m) -> GRef a -> m # foldMap' :: Monoid m => (a -> m) -> GRef a -> m # foldr :: (a -> b -> b) -> b -> GRef a -> b # foldr' :: (a -> b -> b) -> b -> GRef a -> b # foldl :: (b -> a -> b) -> b -> GRef a -> b # foldl' :: (b -> a -> b) -> b -> GRef a -> b # foldr1 :: (a -> a -> a) -> GRef a -> a # foldl1 :: (a -> a -> a) -> GRef a -> a # elem :: Eq a => a -> GRef a -> Bool # maximum :: Ord a => GRef a -> a # | |
Traversable GRef Source # | |
Functor GRef Source # | |
Show comb => Show (GRef comb) Source # | |
Eq (GRef comb) Source # | |
Ord (GRef comb) Source # | |
Defined in Unison.Runtime.MCode |
DECI | |
DECN | |
INCI | |
INCN | |
NEGI | |
SGNI | |
LZRO | |
TZRO | |
COMN | |
COMI | |
POPC | |
ABSF | |
EXPF | |
LOGF | |
SQRT | |
COSF | |
ACOS | |
COSH | |
ACSH | |
SINF | |
ASIN | |
SINH | |
ASNH | |
TANF | |
ATAN | |
TANH | |
ATNH | |
ITOF | |
NTOF | |
CEIL | |
FLOR | |
TRNF | |
RNDF | |
TRNC | |
NOTB |
SIZT | |
USNC | |
UCNS | |
ITOT | |
NTOT | |
FTOT | |
TTOI | |
TTON | |
TTOF | |
PAKT | |
UPKT | |
VWLS | |
VWRS | |
SIZS | |
PAKB | |
UPKB | |
SIZB | |
FLTB | |
MISS | |
CACH | |
LKUP | |
LOAD | |
CVLD | |
VALU | |
TLTT | |
DBTX | |
SDBL | |
REFN | |
REFR | |
RRFC | |
TIKR |
EQLU | |
CMPU | |
LEQU | |
LESU | |
DRPT | |
CATT | |
TAKT | |
IXOT | |
EQLT | |
LEQT | |
LEST | |
DRPS | |
CATS | |
TAKS | |
CONS | |
SNOC | |
IDXS | |
SPLL | |
SPLR | |
TAKB | |
DRPB | |
IDXB | |
CATB | |
IXOB | |
THRO | |
TRCE | |
SDBX | |
SDBV | |
REFW |
Test1 !Word64 !(GSection comb) !(GSection comb) | |
Test2 !Word64 !(GSection comb) !Word64 !(GSection comb) !(GSection comb) | |
TestW !(GSection comb) !(EnumMap Word64 (GSection comb)) | |
TestT !(GSection comb) !(Map Text (GSection comb)) |
Instances
Foldable GBranch Source # | |
Defined in Unison.Runtime.MCode fold :: Monoid m => GBranch m -> m # foldMap :: Monoid m => (a -> m) -> GBranch a -> m # foldMap' :: Monoid m => (a -> m) -> GBranch a -> m # foldr :: (a -> b -> b) -> b -> GBranch a -> b # foldr' :: (a -> b -> b) -> b -> GBranch a -> b # foldl :: (b -> a -> b) -> b -> GBranch a -> b # foldl' :: (b -> a -> b) -> b -> GBranch a -> b # foldr1 :: (a -> a -> a) -> GBranch a -> a # foldl1 :: (a -> a -> a) -> GBranch a -> a # elem :: Eq a => a -> GBranch a -> Bool # maximum :: Ord a => GBranch a -> a # minimum :: Ord a => GBranch a -> a # | |
Traversable GBranch Source # | |
Functor GBranch Source # | |
Show comb => Show (GBranch comb) Source # | |
Eq comb => Eq (GBranch comb) Source # | |
Ord comb => Ord (GBranch comb) Source # | |
Defined in Unison.Runtime.MCode |
emitCombs :: Var v => RefNums -> Reference -> Word64 -> SuperGroup v -> EnumMap Word64 Comb Source #
emitComb :: Var v => RefNums -> Reference -> Word64 -> RCtx v -> (Word64, SuperNormal v) -> EnumMap Word64 Comb Source #
resolveCombs :: Maybe (EnumMap Word64 (RCombs val)) -> EnumMap Word64 (GCombs val CombIx) -> EnumMap Word64 (RCombs val) Source #
lazily replace all references to combinators with the combinators themselves, tying the knot recursively when necessary.
sanitizeCombsOfForeignFuncs :: Bool -> Set ForeignFunc -> EnumMap Word64 (EnumMap Word64 (GComb Void CombIx)) -> EnumMap Word64 (EnumMap Word64 (GComb Void CombIx)) Source #
If running in a sandboxed environment, replace all restricted foreign functions with an error.
absurdCombs :: EnumMap Word64 (EnumMap Word64 (GComb Void cix)) -> EnumMap Word64 (GCombs any cix) Source #
argsToLists :: Args -> [Int] Source #