mirror of https://github.com/voidlizard/hbs2
bf6: --run
This commit is contained in:
parent
acd6698dbf
commit
2029220eb8
|
@ -31,6 +31,13 @@ main = do
|
||||||
|
|
||||||
|
|
||||||
case cli of
|
case cli of
|
||||||
|
|
||||||
|
[ListVal [SymbolVal "--run", StringLike fn]] -> do
|
||||||
|
what <- liftIO $ readFile fn
|
||||||
|
>>= either (error.show) pure . parseTop
|
||||||
|
|
||||||
|
run dict what >>= eatNil display
|
||||||
|
|
||||||
[ListVal [SymbolVal "stdin"]] -> do
|
[ListVal [SymbolVal "stdin"]] -> do
|
||||||
what <- liftIO getContents
|
what <- liftIO getContents
|
||||||
>>= either (error.show) pure . parseTop
|
>>= either (error.show) pure . parseTop
|
||||||
|
|
Loading…
Reference in New Issue