Skip to content

Commit

Permalink
disabled UPLC tests while we rewrite things
Browse files Browse the repository at this point in the history
  • Loading branch information
gnumonik committed May 16, 2024
1 parent 0993609 commit fe6d66e
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions tests/TestCoreFn.hs
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ import Language.PureScript.Environment
import Test.Hspec (Spec, context, shouldBe, shouldSatisfy, specify)
import Language.PureScript.CoreFn.Desugar.Utils (purusTy)

parseModule :: Value -> Result (Version, Module Ann)
parseModule :: Value -> Result (Version, Module (Bind Ann) Ann)
parseModule = parse moduleFromJSON

-- convert a module to its json CoreFn representation and back
parseMod :: Module Ann -> Result (Module Ann)
parseMod :: Module (Bind Ann) Ann -> Result (Module (Bind Ann) Ann)
parseMod m =
let v = Version [0] []
in snd <$> parseModule (moduleToJSON v m)
Expand Down
6 changes: 4 additions & 2 deletions tests/TestPurus.hs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ import PlutusCore.Default
shouldPassTests :: IO ()
shouldPassTests = do
traverse_ runPurusDefault shouldPass
let misc = "./tests/purus/passing/Misc/output/Lib/index.cfn"
-- let misc = "./tests/purus/passing/Misc/output/Lib/index.cfn"
{- UPLC tests disabled atm while we rewrite stuff
uplc1 <- declToUPLC misc "main"
writeFile "./tests/purus/passing/Misc/output/Lib/main.plc" (show uplc1)
uplc2 <- declToUPLC misc "minus"
Expand All @@ -34,7 +36,7 @@ shouldPassTests = do
(EvaluationSuccess (Constant () (Some (ValueOf DefaultUniInteger 2))),[])
misc
"main"

-}
runPurus :: P.CodegenTarget -> FilePath -> IO ()
runPurus target dir = do
outDirExists <- doesDirectoryExist outputDir
Expand Down
1 change: 0 additions & 1 deletion tests/purus/passing/Misc/output/Lib/fakeminus.plc

This file was deleted.

36 changes: 18 additions & 18 deletions tests/purus/passing/Misc/output/Lib/index.cfn.pretty
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Ord$Dict =
ConInt :: Int -> TestBinderSum
ConInt = ConInt

ConInts :: Array Int -> TestBinderSum
ConInts :: Array (Int) -> TestBinderSum
ConInts = ConInts

ConBoolean :: Boolean -> TestBinderSum
Expand Down Expand Up @@ -332,23 +332,23 @@ workingEven =
true -> (1: Int)
_ -> (42: Int)

emptyList :: forall (t121 :: Type). Array t121
emptyList = ([]: forall (t121 :: Type). Array t121)
emptyList :: forall (t121 :: Type). Array (t121)
emptyList = ([]: forall (t121 :: Type). Array (t121))

cons :: forall (a :: Type). a -> Array a -> Array a
cons = \(x: a) -> \(xs: Array a) -> ([(x: a)]: Array a)
cons :: forall (a :: Type). a -> Array (a) -> Array (a)
cons = \(x: a) -> \(xs: Array (a)) -> ([(x: a)]: Array (a))

consEmptyList1 :: Array Int
consEmptyList1 :: Array (Int)
consEmptyList1 =
(cons: forall (a :: Type). a -> Array a -> Array a)
(cons: forall (a :: Type). a -> Array (a) -> Array (a))
(1: Int)
(emptyList: forall (t121 :: Type). Array t121)
(emptyList: forall (t121 :: Type). Array (t121))

consEmptyList2 :: Array String
consEmptyList2 :: Array (String)
consEmptyList2 =
(cons: forall (a :: Type). a -> Array a -> Array a)
(cons: forall (a :: Type). a -> Array (a) -> Array (a))
("hello": String)
(emptyList: forall (t121 :: Type). Array t121)
(emptyList: forall (t121 :: Type). Array (t121))

compare :: forall (@a :: Type). Ord$Dict a -> a -> a -> Int
compare =
Expand All @@ -366,9 +366,9 @@ brokenEven =
_ ->
(brokenEven: Int -> Int) ((minus: Int -> Int -> Int) (n: Int) (2: Int))

arrForall :: forall (a :: Type). Array a -> a
arrForall :: forall (a :: Type). Array (a -> a)
arrForall =
([(id: forall (t :: Type). t -> t)]: forall (a :: Type). Array a -> a)
([(id: forall (t :: Type). t -> t)]: forall (a :: Type). Array (a -> a))

anObj :: { foo :: Int }
anObj = ({ foo: (3: Int) }: { foo :: Int })
Expand Down Expand Up @@ -444,8 +444,8 @@ guardedCase =
_ -> (v: forall $23. $23 -> Int) (true: Boolean)
_ -> (v: forall $23. $23 -> Int) (true: Boolean)

aList :: Array Int
aList = ([(1: Int), (2: Int), (3: Int), (4: Int), (5: Int)]: Array Int)
aList :: Array (Int)
aList = ([(1: Int), (2: Int), (3: Int), (4: Int), (5: Int)]: Array (Int))

aFunction4 :: forall (r :: Row Type). { a :: Int | r } -> Int
aFunction4 = \(r: { a :: Int | r }) -> (r: { a :: Int | r }).a
Expand All @@ -462,8 +462,8 @@ aFunction3 =
true -> (4: Int)
_ -> (1: Int)

aFunction2 :: Int -> Array Int
aFunction2 = \(x: Int) -> ([(x: Int), (1: Int)]: Array Int)
aFunction2 :: Int -> Array (Int)
aFunction2 = \(x: Int) -> ([(x: Int), (1: Int)]: Array (Int))

aFunction :: forall (x :: Type). x -> forall (y :: Type). y -> Int -> Int
aFunction =
Expand All @@ -477,7 +477,7 @@ aFunction6 =
go :: forall (z :: Type). z -> Int
go = \(v: z) -> (10: Int)
in (aFunction: forall (x :: Type). x -> forall (y :: Type). y -> Int -> Int)
([]: Array t151)
([]: Array (t151))
(go: forall (z :: Type). z -> Int)

aBool :: Boolean
Expand Down
1 change: 0 additions & 1 deletion tests/purus/passing/Misc/output/Lib/main.plc

This file was deleted.

0 comments on commit fe6d66e

Please sign in to comment.