mirror of
https://github.com/urbit/shrub.git
synced 2024-12-19 16:51:42 +03:00
various
This commit is contained in:
parent
5331c5be87
commit
34ce34ce7e
@ -26,12 +26,16 @@ compileHoonTest ln = do
|
||||
cst <- parse ln & \case
|
||||
Left x -> error (unpack x)
|
||||
Right x -> pure x
|
||||
pPrint cst
|
||||
-- pPrint cst
|
||||
hon <- pure $ hone cst
|
||||
pPrint hon
|
||||
exp <- pure $ desugar hon
|
||||
pPrint exp
|
||||
nok <- pure $ copy exp
|
||||
putStrLn "==== input ===="
|
||||
putStrLn ln
|
||||
putStrLn "==== nock ===="
|
||||
pPrint nok
|
||||
putStrLn "==== output ===="
|
||||
res <- runCare $ nock (A 140) nok
|
||||
pPrint res
|
||||
|
@ -125,9 +125,11 @@ namely = flip lookup fash
|
||||
fash :: HashMap JetName (Hash, Jet)
|
||||
fash = mapFromList $ map (\(n, h, j) -> (n, (h, j))) jets
|
||||
|
||||
tx = textToAtom
|
||||
|
||||
type Entry = (JetName, Hash, Jet)
|
||||
-- | Your jets here
|
||||
jets :: [Entry]
|
||||
jets =
|
||||
[ (123, 1520491622440108403, \(A a) -> trace "jetting" $ A (a - 1))
|
||||
[ (tx "dec", 1520491622440108403, \(A a) -> trace "jetting" $ A (a - 1))
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user