1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-22 22:31:33 +03:00
juvix/app/Commands/Dev/Core/Repl/Options.hs

23 lines
578 B
Haskell
Raw Normal View History

2022-09-14 17:16:15 +03:00
module Commands.Dev.Core.Repl.Options where
import CommonOptions
import Juvix.Compiler.Core.Pretty.Options qualified as Core
newtype CoreReplOptions = CoreReplOptions
{ _coreReplShowDeBruijn :: Bool
}
deriving stock (Data)
makeLenses ''CoreReplOptions
instance CanonicalProjection CoreReplOptions Core.Options where
project c =
Core.defaultOptions
{ Core._optShowDeBruijnIndices = c ^. coreReplShowDeBruijn
}
parseCoreReplOptions :: Parser CoreReplOptions
parseCoreReplOptions = do
_coreReplShowDeBruijn <- optDeBruijn
pure CoreReplOptions {..}