Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/greg/sqlite' into greg/sqlite
Browse files Browse the repository at this point in the history
  • Loading branch information
rsoeldner committed Nov 29, 2023
2 parents 544d771 + e118e98 commit 0ec10db
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
1 change: 0 additions & 1 deletion pact-core-tests/Pact/Core/Test/PersistenceTests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import Pact.Core.Guards (KeySet)
import Pact.Core.Gen.Serialise (keySetGen, keySetNameGen, moduleNameGen, moduleDataGen, builtinGen, infoGen
,defPactIdGen, defPactExecGen, namespaceNameGen, namespaceGen)
import Pact.Core.Serialise (PactSerialise, serialisePact)
import Pact.Core.Builtin (RawBuiltin)
import Pact.Core.Persistence.SQLite
import Pact.Core.Persistence (WriteType(Insert), readKeySet, writeKeySet, writeModule, readModule
,writeDefPacts, readDefPacts, readNamespace, writeNamespace)
Expand Down
34 changes: 34 additions & 0 deletions pact-core-tests/Pact/Core/Test/ReplTests.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{-# LANGUAGE GADTs #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE NamedFieldPuns #-}

module Pact.Core.Test.ReplTests where

Expand Down Expand Up @@ -33,6 +34,8 @@ import Pact.Core.Serialise (PactSerialise(..), serialisePact, Document(LegacyDoc

import Pact.Core.Info (SpanInfo)
import Pact.Core.Compile
import Pact.Core.IR.Term (Module(..), EvalModule)
import Pact.Core.Builtin (ReplBuiltin)
import Pact.Core.Repl.Compile
import Pact.Core.PactValue
import Pact.Core.Environment
Expand All @@ -51,6 +54,37 @@ tests = do
]


enhanceModuleData :: ModuleData RawBuiltin () -> ModuleData ReplRawBuiltin SpanInfo
enhanceModuleData = \case
ModuleData em defs -> undefined
InterfaceData ifd defs -> undefined

stripModuleData :: ModuleData ReplRawBuiltin SpanInfo -> ModuleData RawBuiltin ()
stripModuleData = \case
ModuleData em defs -> undefined
InterfaceData ifd defs -> undefined

enhanceEvalModule :: EvalModule RawBuiltin () -> EvalModule ReplRawBuiltin SpanInfo
enhanceEvalModule Module
{ _mName
, _mGovernance
, _mDefs
, _mBlessed
, _mImports
, _mImplements
, _mHash
, _mInfo
} = Module
{ _mName
, _mGovernance
, _mDefs = _ _mDefs
, _mBlessed
, _mImports
, _mImplements
, _mHash
, _mInfo = def
}


replTestDir :: [Char]
replTestDir = "pact-core-tests" </> "pact-tests"
Expand Down

0 comments on commit 0ec10db

Please sign in to comment.