1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-19 21:01:48 +03:00
juvix/app/Commands/Dev/Asm.hs
Jan Mas Rovira 69594edc7b
Read Package on demand and cache it (#2548)
This patch dramatically increases the efficiency of `juvix dev root`,
which was unnecessarily parsing all dependencies included in the
`Package.juvix` file. Other commands that do not require the `Package`
will also be faster.

It also refactors some functions so that the `TaggedLock` effect is run
globally.

I've added `singletons-base` as a dependency so we can have `++` on the
type level. We've tried to define a type family ourselves but inference
was not working properly.
2023-12-06 18:24:59 +01:00

14 lines
438 B
Haskell

module Commands.Dev.Asm where
import Commands.Base
import Commands.Dev.Asm.Compile as Compile
import Commands.Dev.Asm.Options
import Commands.Dev.Asm.Run as Run
import Commands.Dev.Asm.Validate as Validate
runCommand :: forall r. (Members '[Embed IO, App, TaggedLock] r) => AsmCommand -> Sem r ()
runCommand = \case
Run opts -> Run.runCommand opts
Validate opts -> Validate.runCommand opts
Compile opts -> Compile.runCommand opts