Skip to content

Commit

Permalink
remove dead code comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcardon committed Oct 19, 2023
1 parent 81cf5a5 commit 78ef2bf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 26 deletions.
10 changes: 0 additions & 10 deletions pact-core/Pact/Core/IR/Term.hs
Original file line number Diff line number Diff line change
Expand Up @@ -189,20 +189,10 @@ data TopLevel name ty builtin info
deriving (Show, Functor)

data ReplTopLevel name ty builtin info
-- = RTLTopLevel (TopLevel name ty builtin info)
= RTLDefConst (DefConst name ty builtin info)
| RTLDefun (Defun name ty builtin info)
deriving (Show, Functor)

-- pattern RTLTerm :: Term name ty builtin info -> ReplTopLevel name ty builtin info
-- pattern RTLTerm e = RTLTopLevel (TLTerm e)

-- pattern RTLModule :: Module name ty builtin info -> ReplTopLevel name ty builtin info
-- pattern RTLModule m = RTLTopLevel (TLModule m)

-- pattern RTLInterface :: Interface name ty builtin info -> ReplTopLevel name ty builtin info
-- pattern RTLInterface iface = RTLTopLevel (TLInterface iface)

defName :: Def name t b i -> Text
defName (Dfun d) = _dfunName d
defName (DConst d) = _dcName d
Expand Down
17 changes: 1 addition & 16 deletions pact-core/Pact/Core/Repl/Utils.hs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ instance HasEvalState (ReplState b) b SpanInfo where

instance Pretty b => PhaseDebug b i (ReplM b) where
debugPrint dp term = do
-- flags <- use replFlags
case dp of
DPLexer -> whenReplFlagSet ReplDebugLexer $ liftIO $ do
putStrLn "----------- Lexer output -----------------"
Expand All @@ -157,10 +156,6 @@ instance HasLoaded (ReplState b) b SpanInfo where
loaded = evalState . esLoaded

data ReplAction
-- = RALoad Text
-- | RASetLispSyntax
-- | RASetNewSyntax
-- | RATypecheck Text
= RASetFlag ReplDebugFlag
| RADebugAll
| RADebugNone
Expand Down Expand Up @@ -191,16 +186,7 @@ replAction =
setFlag <?> "asdf"
setFlag =
cmdKw "debug" *> ((RASetFlag <$> replFlag) <|> (RADebugAll <$ MP.chunk "all") <|> (RADebugNone <$ MP.chunk "none"))
-- setLang = do
-- cmdKw "syntax"
-- (RASetLispSyntax <$ MP.chunk "lisp") <|> (RASetNewSyntax <$ MP.chunk "new")
-- tc = do
-- cmdKw "type"
-- RATypecheck <$> MP.takeRest
-- load = do
-- cmdKw "load"
-- let c = MP.char '\"'
-- RALoad <$> MP.between c c (MP.takeWhile1P Nothing (/= '\"'))


parseReplAction :: Text -> Maybe ReplAction
parseReplAction = MP.parseMaybe replAction
Expand Down Expand Up @@ -274,7 +260,6 @@ replCompletion natives =
Term.defName <$> Term._mDefs md
InterfaceData iface _ ->
fmap Term._dcName $ mapMaybe (preview Term._IfDConst) $ Term._ifDefns iface
-- fmap Term.defName . Term._mDefs . _mdModule
toPrefixed m =
concat $ prefixF <$> M.toList m
prefixF (mn, ems) = let
Expand Down

0 comments on commit 78ef2bf

Please sign in to comment.