This commit is contained in:
pilfer-pandex 2019-10-02 15:17:03 -07:00
parent 5331c5be87
commit 34ce34ce7e
2 changed files with 8 additions and 2 deletions

View File

@ -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

View File

@ -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))
]