Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix usage of Show instances for terms #1105

Merged
merged 1 commit into from
Dec 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Pact/Typechecker.hs
Original file line number Diff line number Diff line change
Expand Up @@ -907,11 +907,11 @@ toAST (TVar v i) = case v of -- value position only, TApp has its own resolver
TConst{..} -> case _tModule of
-- if modulename is nothing, it's a builtin
Nothing -> toAST $ return $ Left (Direct $ constTerm _tConstVal)
_ -> die i $ "Non-native constant value in native context: " ++ show t
_ -> die i $ "Non-native constant value in native context: " <> showPretty t
TGuard{..} -> do
g <- traverse (toAST . return . Left . Direct) _tGuard
trackPrim _tInfo (TyGuard $ Just $ guardTypeOf _tGuard) (PrimGuard g)
_ -> die i $ "Native in value context: " <> show t
_ -> die i $ "Native in value context: " <> showPretty t
(Right t) -> return t

toAST (TApp Term.App{..} _) = do
Expand Down Expand Up @@ -958,9 +958,9 @@ toAST (TApp Term.App{..} _) = do
freshArg <- trackIdNode =<<
freshId (_tiInfo (_aId (_aNode argAST')))
(_fName (_aAppFun argAST) <> "_" <> lamArgName <> "_p")
debug $ "Adding fresh arg to partial application: " ++ show freshArg
debug $ "Adding fresh arg to partial application: " ++ showPretty freshArg
return $ over aAppArgs (++ [Var freshArg]) argAST'
(TyFun t,a) -> die'' argAST $ "App required for funtype argument: " ++ show t ++ ", found: " ++ show a
(TyFun t,a) -> die'' argAST $ "App required for funtype argument: " ++ showPretty t ++ ", found: " ++ showPretty a
_ -> return argAST

-- other special forms: bindings, yield/resume
Expand Down