mirror of
https://github.com/urbit/shrub.git
synced 2024-12-20 01:01:37 +03:00
various
This commit is contained in:
parent
5331c5be87
commit
34ce34ce7e
@ -26,12 +26,16 @@ compileHoonTest ln = do
|
|||||||
cst <- parse ln & \case
|
cst <- parse ln & \case
|
||||||
Left x -> error (unpack x)
|
Left x -> error (unpack x)
|
||||||
Right x -> pure x
|
Right x -> pure x
|
||||||
pPrint cst
|
-- pPrint cst
|
||||||
hon <- pure $ hone cst
|
hon <- pure $ hone cst
|
||||||
pPrint hon
|
pPrint hon
|
||||||
exp <- pure $ desugar hon
|
exp <- pure $ desugar hon
|
||||||
pPrint exp
|
pPrint exp
|
||||||
nok <- pure $ copy exp
|
nok <- pure $ copy exp
|
||||||
|
putStrLn "==== input ===="
|
||||||
|
putStrLn ln
|
||||||
|
putStrLn "==== nock ===="
|
||||||
pPrint nok
|
pPrint nok
|
||||||
|
putStrLn "==== output ===="
|
||||||
res <- runCare $ nock (A 140) nok
|
res <- runCare $ nock (A 140) nok
|
||||||
pPrint res
|
pPrint res
|
||||||
|
@ -125,9 +125,11 @@ namely = flip lookup fash
|
|||||||
fash :: HashMap JetName (Hash, Jet)
|
fash :: HashMap JetName (Hash, Jet)
|
||||||
fash = mapFromList $ map (\(n, h, j) -> (n, (h, j))) jets
|
fash = mapFromList $ map (\(n, h, j) -> (n, (h, j))) jets
|
||||||
|
|
||||||
|
tx = textToAtom
|
||||||
|
|
||||||
type Entry = (JetName, Hash, Jet)
|
type Entry = (JetName, Hash, Jet)
|
||||||
-- | Your jets here
|
-- | Your jets here
|
||||||
jets :: [Entry]
|
jets :: [Entry]
|
||||||
jets =
|
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