diff --git a/.github/workflows/ci-deptycheck.yml b/.github/workflows/ci-deptycheck.yml index 198ebf008..7d2954c2b 100644 --- a/.github/workflows/ci-deptycheck.yml +++ b/.github/workflows/ci-deptycheck.yml @@ -138,7 +138,7 @@ jobs: ################### get-test-sets: - name: Aquire test sets + name: Acquire test sets needs: - deptycheck-build-lib runs-on: ubuntu-latest @@ -187,7 +187,7 @@ jobs: ################# get-examples: - name: Aquire examples + name: Acquire examples needs: - deptycheck-build-lib runs-on: ubuntu-latest diff --git a/.github/workflows/ci-non-primary-os.yml b/.github/workflows/ci-non-primary-os.yml new file mode 100644 index 000000000..486cbf202 --- /dev/null +++ b/.github/workflows/ci-non-primary-os.yml @@ -0,0 +1,30 @@ +--- +name: Non-primary OS + +on: + push: + branches: + - main + - master + tags: + - '*' + pull_request: + branches: + - main + - master + +permissions: + statuses: write + +concurrency: + group: ${{ github.workflow }}@${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + name: Clone on Windows + runs-on: windows-latest + steps: + + - name: Checkout + uses: actions/checkout@v4 diff --git a/README.md b/README.md index 1d81b5803..177065fa1 100644 --- a/README.md +++ b/README.md @@ -301,12 +301,6 @@ You can read more on the design of generators in [documentation](https://deptych ## Derivation of generators - - DepTyCheck supports automatic derivation of generators using the datatype definition. For now, it is not tunable at all, however, it is planned to be added. diff --git a/deptycheck.ipkg b/deptycheck.ipkg index f2fde31c1..a4446c164 100644 --- a/deptycheck.ipkg +++ b/deptycheck.ipkg @@ -9,7 +9,7 @@ license = "MPL-2.0" sourcedir = "src" builddir = ".build" -version = 0.0.240616 +version = 0.0.240909 modules = Deriving.DepTyCheck , Deriving.DepTyCheck.Gen @@ -20,6 +20,7 @@ modules = Deriving.DepTyCheck , Deriving.DepTyCheck.Gen.Core.ConsEntry , Deriving.DepTyCheck.Gen.Core.Util , Deriving.DepTyCheck.Gen.Checked + , Deriving.DepTyCheck.Util.Fusion , Deriving.DepTyCheck.Util.Logging , Deriving.DepTyCheck.Util.Reflection , Language.Reflection.Compat diff --git a/docs/source/conf.py b/docs/source/conf.py index 384310818..c1d8e6daf 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -68,7 +68,6 @@ # html_theme = "sphinx_rtd_theme" html_theme_options = { - "display_version": True, "prev_next_buttons_location": "bottom", } html_logo = "../../icons/deptycheck-lib-html-logo.png" diff --git a/docs/source/explanation/derivation/design/single-con.md b/docs/source/explanation/derivation/design/single-con.md index 21d8a6d95..2cc555948 100644 --- a/docs/source/explanation/derivation/design/single-con.md +++ b/docs/source/explanation/derivation/design/single-con.md @@ -298,7 +298,7 @@ genD_idx_generated @{data_Nat} @{data_String} fuel b = data_D_giv_b fuel b --> In this case, generation of non-recursive constructors `JJ` and `TL` is straightforward, -the only difference is that `b` is a function argument, not a result of subgeneration. +the only difference is that `b` is a function parameter, not a result of subgeneration. Recursive cases are not so easy. Surely, we can first generate value `b` using derived `data_Bool` generator (as we did before for `JJ` constructor) diff --git a/docs/source/explanation/derivation/design/when-derivation-happens.md b/docs/source/explanation/derivation/design/when-derivation-happens.md index c2a655ff3..54abce1e6 100644 --- a/docs/source/explanation/derivation/design/when-derivation-happens.md +++ b/docs/source/explanation/derivation/design/when-derivation-happens.md @@ -62,7 +62,9 @@ thus inapplicable directly for dependent types. Since, we focus on total generators for dependent types, we cannot rely on common hybrid approach. Considering all said above, it is decided to go the hard way and to do derivation of generators directly, using metaprogramming facility if Idris called *elaboration scripts*. -% TODO to add a link to Idris documentation as soon as elaboration scripts are documented. + Thus, DepTyCheck's derivation mechanism is a fully compile-time metaprogram that analyses generated datatype and produces generator's code which is checked for type correctness and totality right after. diff --git a/examples/README.md b/examples/README.md index 480b1c219..5e75a3aa3 100644 --- a/examples/README.md +++ b/examples/README.md @@ -16,6 +16,7 @@ The examples are the following: - [sorted lists](sorted-list/) of natural numbers - list and vector of strings, [both with unique elements](uniq-list/) implemented using `So` and usual `Eq` comparison +- a sequence of [unique mentions of a given subset](covering-seq/) of elements interleaved with unrelated elements - naive possibly empty [sorted binary trees](sorted-tree-naive/) of natural numbers, implemented as if without dependent types with added limitations on sortedness - [indexed non-empty sorted binary trees](sorted-tree-indexed/) of natural numbers, with type indices for value bounds diff --git a/examples/covering-seq/covering-seq.ipkg b/examples/covering-seq/covering-seq.ipkg new file mode 100644 index 000000000..ceb69a6e9 --- /dev/null +++ b/examples/covering-seq/covering-seq.ipkg @@ -0,0 +1,13 @@ +package covering-seq + +version = 0.1 + +authors = "Denis Buzdalov" + +sourcedir = "src" +builddir = ".build" + +depends = deptycheck + +modules = Data.List.Covering + , Data.List.Covering.Gen diff --git a/examples/covering-seq/src/Data/List/Covering.idr b/examples/covering-seq/src/Data/List/Covering.idr new file mode 100644 index 000000000..e7feeb68f --- /dev/null +++ b/examples/covering-seq/src/Data/List/Covering.idr @@ -0,0 +1,64 @@ +module Data.List.Covering + +import public Data.Fin +import Data.String + +%default total + +namespace BitMask + + -- BitMask n ~~ Vect n Bool + public export + data BitMask : (bits : Nat) -> Type where + Nil : BitMask 0 + (::) : Bool -> BitMask n -> BitMask (S n) + + export + Interpolation (BitMask n) where + interpolate [] = "" + interpolate (True ::bs) = "1\{bs}" + interpolate (False::bs) = "0\{bs}" + + public export + update : Fin n -> (newValue : Bool) -> BitMask n -> BitMask n + update FZ v (_::bs) = v::bs + update (FS n) v (b::bs) = b :: update n v bs + + namespace Index + + public export + data AtIndex : (n : Nat) -> Fin n -> BitMask n -> Bool -> Type where + Here : AtIndex (S n) FZ (b::bs) b + There : AtIndex n i bs v -> AtIndex (S n) (FS i) (b::bs) v + + public export + data AllBitsAre : (n : Nat) -> Bool -> BitMask n -> Type where + Finish : AllBitsAre Z b [] + Continue : AllBitsAre n b bs -> AllBitsAre (S n) b (b::bs) + + export + setBits : BitMask n -> List $ Fin n + setBits [] = [] + setBits $ True ::bs = FZ :: (FS <$> setBits bs) + setBits $ False::bs = FS <$> setBits bs + +-- Contains all and only mentions (hits) of values enabled in the given bitmask in any order interleaved with some arbitrary numbers (misses). +public export +data CoveringSequence : (n : Nat) -> BitMask n -> Type where + End : AllBitsAre n False bs => CoveringSequence n bs + Miss : Nat -> CoveringSequence n bs -> CoveringSequence n bs + Hit : (i : Fin n) -> AtIndex n i bs True => CoveringSequence n (update i False bs) -> CoveringSequence n bs + +public export +hits : CoveringSequence n bs -> List $ Fin n +hits End = [] +hits $ Miss k xs = hits xs +hits $ Hit i xs = i :: hits xs + +export +Interpolation (CoveringSequence n bs) where + interpolate = joinBy " " . asList where + asList : forall n, bs. CoveringSequence n bs -> List String + asList End = [] + asList $ Miss k xs = show k :: asList xs + asList $ Hit i xs = "[\{show i}]" :: asList xs diff --git a/examples/covering-seq/src/Data/List/Covering/Gen.idr b/examples/covering-seq/src/Data/List/Covering/Gen.idr new file mode 100644 index 000000000..6a5ced416 --- /dev/null +++ b/examples/covering-seq/src/Data/List/Covering/Gen.idr @@ -0,0 +1,14 @@ +module Data.List.Covering.Gen + +import public Data.List.Covering + +import public Test.DepTyCheck.Gen +import Deriving.DepTyCheck.Gen + +%default total + +%logging "deptycheck.derive" 5 + +export +genCoveringSequence : Fuel -> {n : Nat} -> (bs : BitMask n) -> Gen MaybeEmpty $ CoveringSequence n bs +genCoveringSequence = deriveGen diff --git a/examples/covering-seq/tests/.clean-names b/examples/covering-seq/tests/.clean-names new file mode 120000 index 000000000..205c45381 --- /dev/null +++ b/examples/covering-seq/tests/.clean-names @@ -0,0 +1 @@ +../../../tests/.clean-names \ No newline at end of file diff --git a/examples/covering-seq/tests/Tests.idr b/examples/covering-seq/tests/Tests.idr new file mode 100644 index 000000000..0460c48fc --- /dev/null +++ b/examples/covering-seq/tests/Tests.idr @@ -0,0 +1,9 @@ +module Tests + +import Test.Golden.RunnerHelper + +main : IO () +main = goldenRunner + [ "Covering sequence data structure" `atDir` "data" + , "Generator for covering sequences" `atDir` "gens" + ] diff --git a/examples/covering-seq/tests/data/simple-seqs/Main.idr b/examples/covering-seq/tests/data/simple-seqs/Main.idr new file mode 100644 index 000000000..de9cfb0b8 --- /dev/null +++ b/examples/covering-seq/tests/data/simple-seqs/Main.idr @@ -0,0 +1,35 @@ +import Data.List.Covering + +%default total + +MaskIIII : BitMask ? +MaskIIII = [True, True, True, True] + +x0123 : CoveringSequence ? MaskIIII +x0123 = Hit 0 $ Hit 1 $ Hit 2 $ Hit 3 $ End + +x0123' : CoveringSequence ? MaskIIII +x0123' = Hit 0 $ Hit 1 $ Miss 20 $ Hit 2 $ Hit 3 $ Miss 30 $ End + +x2301 : CoveringSequence ? MaskIIII +x2301 = Hit 2 $ Hit 3 $ Hit 0 $ Hit 1 $ End + +x2301' : CoveringSequence ? MaskIIII +x2301' = Hit 2 $ Hit 3 $ Miss 20 $ Hit 0 $ Hit 1 $ Miss 30 $ End + +failing "Can't find an implementation for AtIndex" + x23012 : CoveringSequence ? MaskIIII + x23012 = Hit 2 $ Hit 3 $ Hit 0 $ Hit 1 $ Hit 2 $ End + +MaskIIOI : BitMask ? +MaskIIOI = [True, True, False, True] + +x013 : CoveringSequence ? MaskIIOI +x013 = Hit 0 $ Hit 1 $ Hit 3 $ End + +x103 : CoveringSequence ? MaskIIOI +x103 = Hit 1 $ Hit 0 $ Hit 3 $ End + +failing "Can't find an implementation for AtIndex" + badx0123 : CoveringSequence ? MaskIIOI + badx0123 = Hit 0 $ Hit 1 $ Hit 2 $ Hit 3 $ End diff --git a/examples/covering-seq/tests/data/simple-seqs/expected b/examples/covering-seq/tests/data/simple-seqs/expected new file mode 100644 index 000000000..b2b84aa45 --- /dev/null +++ b/examples/covering-seq/tests/data/simple-seqs/expected @@ -0,0 +1 @@ +1/1: Building Main (Main.idr) diff --git a/examples/covering-seq/tests/data/simple-seqs/run b/examples/covering-seq/tests/data/simple-seqs/run new file mode 100755 index 000000000..e95d24fbc --- /dev/null +++ b/examples/covering-seq/tests/data/simple-seqs/run @@ -0,0 +1,6 @@ +rm -rf build + +flock "$1" pack -q install-deps test.ipkg && \ +idris2 --find-ipkg --check Main.idr + +rm -rf build diff --git a/examples/covering-seq/tests/data/simple-seqs/test.ipkg b/examples/covering-seq/tests/data/simple-seqs/test.ipkg new file mode 100644 index 000000000..cadc7efca --- /dev/null +++ b/examples/covering-seq/tests/data/simple-seqs/test.ipkg @@ -0,0 +1,3 @@ +package a-test + +depends = covering-seq diff --git a/examples/covering-seq/tests/gens/covering-seqs/Main.idr b/examples/covering-seq/tests/gens/covering-seqs/Main.idr new file mode 100644 index 000000000..ef26d8b81 --- /dev/null +++ b/examples/covering-seq/tests/gens/covering-seqs/Main.idr @@ -0,0 +1,27 @@ +import Data.Fuel +import Data.List +import Data.List.Lazy +import Data.List.Covering.Gen +import Data.String + +import System.Random.Pure.StdGen + +%default total + +submain : {n : _} -> BitMask n -> IO () +submain bs = do + putStrLn "-----------------------" + putStrLn "bitmask: \{bs}" + putStrLn "-----------------------" + let vals = unGenTryN 10 someStdGen $ genCoveringSequence (limit $ 2 * n) bs + Lazy.for_ vals $ \v => do + let hits = hits v + let verdict = if sort hits == setBits bs then "ok" else "fail, hits are: \{show hits}, expected: \{show $ setBits bs}" + putStrLn "\{v} (\{verdict})" + +main : IO () +main = do + submain [True, True, True, True] + submain [True, False, True, True] + submain [False, False, True, False] + submain [False, False, False, False] diff --git a/examples/covering-seq/tests/gens/covering-seqs/expected b/examples/covering-seq/tests/gens/covering-seqs/expected new file mode 100644 index 000000000..19014a5c4 --- /dev/null +++ b/examples/covering-seq/tests/gens/covering-seqs/expected @@ -0,0 +1,52 @@ +----------------------- +bitmask: 1111 +----------------------- +3 3 [1] [3] [2] [0] 5 (ok) +[2] [3] [1] [0] (ok) +[3] [2] [1] 1 [0] 2 (ok) +5 3 3 4 [3] [2] [1] [0] (ok) +1 6 4 2 [3] [0] [2] [1] (ok) +0 1 [3] [2] 7 [1] [0] (ok) +8 5 [3] 5 [2] 7 [1] [0] (ok) +[3] 7 [2] [1] 5 [0] 6 (ok) +[3] [2] 5 [1] [0] (ok) +[3] 4 [2] 3 [1] [0] 2 8 (ok) +----------------------- +bitmask: 1011 +----------------------- +3 3 [3] 4 [2] [0] 5 (ok) +[2] [3] [0] (ok) +8 6 [0] [3] 2 [2] 6 (ok) +[3] 3 4 6 1 8 [2] [0] (ok) +[3] 5 0 [2] [0] 3 (ok) +[3] 7 7 [2] [0] (ok) +7 [3] 8 3 7 [2] [0] 7 (ok) +[3] 8 [2] 0 0 5 [0] (ok) +7 [3] [2] 3 8 8 [0] 4 (ok) +[3] 4 [2] 5 [0] 4 2 6 (ok) +----------------------- +bitmask: 0010 +----------------------- +3 3 [2] 1 4 (ok) +8 7 5 2 [2] 0 3 8 (ok) +[2] 0 4 (ok) +0 8 [2] (ok) +[2] 4 (ok) +6 1 8 1 6 4 2 [2] (ok) +7 1 [2] 5 7 (ok) +8 5 [2] 7 8 7 3 (ok) +8 5 7 8 [2] 8 6 (ok) +[2] 7 5 5 (ok) +----------------------- +bitmask: 0000 +----------------------- +3 3 1 4 4 (ok) +8 7 5 2 2 1 3 8 (ok) +0 4 6 8 5 (ok) +3 4 (ok) +6 1 8 (ok) +4 2 1 2 5 1 2 7 (ok) +5 7 7 7 0 (ok) +7 5 8 6 7 5 (ok) +8 7 6 2 (ok) +8 7 3 5 (ok) diff --git a/examples/covering-seq/tests/gens/covering-seqs/run b/examples/covering-seq/tests/gens/covering-seqs/run new file mode 100755 index 000000000..3445c95bf --- /dev/null +++ b/examples/covering-seq/tests/gens/covering-seqs/run @@ -0,0 +1,6 @@ +rm -rf build + +flock "$1" pack -q install-deps test.ipkg && \ +pack run test.ipkg + +rm -rf build diff --git a/examples/covering-seq/tests/gens/covering-seqs/test.ipkg b/examples/covering-seq/tests/gens/covering-seqs/test.ipkg new file mode 100644 index 000000000..a094bbec5 --- /dev/null +++ b/examples/covering-seq/tests/gens/covering-seqs/test.ipkg @@ -0,0 +1,6 @@ +package a-test + +depends = covering-seq + +executable = a-test +main = Main diff --git a/examples/covering-seq/tests/gens/print/DerivedGen.idr b/examples/covering-seq/tests/gens/print/DerivedGen.idr new file mode 100644 index 000000000..fa3a36e6d --- /dev/null +++ b/examples/covering-seq/tests/gens/print/DerivedGen.idr @@ -0,0 +1,12 @@ +module DerivedGen + +import Data.List.Covering + +import Deriving.DepTyCheck.Gen + +%default total + +%language ElabReflection + +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter $ Fuel -> {n : Nat} -> (bs : BitMask n) -> Gen MaybeEmpty $ CoveringSequence n bs diff --git a/examples/covering-seq/tests/gens/print/derive.ipkg b/examples/covering-seq/tests/gens/print/derive.ipkg new file mode 100644 index 000000000..dd2f3cc24 --- /dev/null +++ b/examples/covering-seq/tests/gens/print/derive.ipkg @@ -0,0 +1,6 @@ +package derive-test + +authors = "Denis Buzdalov" + +depends = deptycheck + , covering-seq diff --git a/examples/covering-seq/tests/gens/print/expected b/examples/covering-seq/tests/gens/print/expected new file mode 100644 index 000000000..67d9dba1c --- /dev/null +++ b/examples/covering-seq/tests/gens/print/expected @@ -0,0 +1,738 @@ +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> (bs : BitMask n) -> Gen MaybeEmpty (CoveringSequence n bs) + MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") +.=> MkArg MW ImplicitArg (Just "outer^") implicitTrue +.=> MkArg MW ExplicitArg (Just "outer^") implicitTrue +.=> local + { decls = + [ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "[0, 1]" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") + .-> MkArg MW ExplicitArg (Just "{arg:1}") (var "Data.List.Covering.BitMask.BitMask" .$ var "n") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ (var "Data.List.Covering.CoveringSequence" .$ var "n" .$ var "{arg:1}") + }) + , IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "[0, 1, 2, 3]" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") + .-> MkArg MW ExplicitArg (Just "{arg:2}") (var "Data.Fin.Fin" .$ var "n") + .-> MkArg MW ExplicitArg (Just "{arg:3}") (var "Data.List.Covering.BitMask.BitMask" .$ var "n") + .-> MkArg MW ExplicitArg (Just "{arg:4}") (var "Prelude.Basics.Bool") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ (var "Data.List.Covering.BitMask.Index.AtIndex" .$ var "n" .$ var "{arg:2}" .$ var "{arg:3}" .$ var "{arg:4}") + }) + , IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "[0]" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") + .-> var "Test.DepTyCheck.Gen.Gen" .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" .$ (var "Data.Fin.Fin" .$ var "n") + }) + , IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "[]" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> var "Test.DepTyCheck.Gen.Gen" .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" .$ var "Prelude.Types.Nat" + }) + , IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "[0, 1, 2]" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") + .-> MkArg MW ExplicitArg (Just "{arg:5}") (var "Prelude.Basics.Bool") + .-> MkArg MW ExplicitArg (Just "{arg:6}") (var "Data.List.Covering.BitMask.BitMask" .$ var "n") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ (var "Data.List.Covering.BitMask.Index.AllBitsAre" .$ var "n" .$ var "{arg:5}" .$ var "{arg:6}") + }) + , IDef + emptyFC + "[0, 1]" + [ var "[0, 1]" .$ bindVar "^fuel_arg^" .$ bindVar "inter^" .$ bindVar "inter^<{arg:1}>" + .= local + { decls = + [ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "<>" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") + .-> MkArg MW ExplicitArg (Just "{arg:1}") (var "Data.List.Covering.BitMask.BitMask" .$ var "n") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ (var "Data.List.Covering.CoveringSequence" .$ var "n" .$ var "{arg:1}") + }) + , IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "<>" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") + .-> MkArg MW ExplicitArg (Just "{arg:1}") (var "Data.List.Covering.BitMask.BitMask" .$ var "n") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ (var "Data.List.Covering.CoveringSequence" .$ var "n" .$ var "{arg:1}") + }) + , IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "<>" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") + .-> MkArg MW ExplicitArg (Just "{arg:1}") (var "Data.List.Covering.BitMask.BitMask" .$ var "n") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ (var "Data.List.Covering.CoveringSequence" .$ var "n" .$ var "{arg:1}") + }) + , IDef + emptyFC + "<>" + [ var "<>" .$ bindVar "^cons_fuel^" .$ bindVar "n" .$ bindVar "bs" + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Data.List.Covering.End (orders)")) + .$ ( var ">>=" + .$ ( var "[0, 1, 2]" + .$ var "^outmost-fuel^" + .$ var "n" + .$ var "Prelude.Basics.False" + .$ var "bs") + .$ ( MkArg MW ExplicitArg (Just "^bnd^{conArg:1}") implicitFalse + .=> var "Prelude.pure" + .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) + .$ ( var "Data.List.Covering.End" + .! ("n", implicitTrue) + .! ("bs", implicitTrue) + .@ var "^bnd^{conArg:1}"))) + ] + , IDef + emptyFC + "<>" + [ var "<>" .$ bindVar "^cons_fuel^" .$ bindVar "n" .$ bindVar "bs" + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Data.List.Covering.Miss (orders)")) + .$ ( var ">>=" + .$ (var "[]" .$ var "^outmost-fuel^") + .$ ( MkArg MW ExplicitArg (Just "^bnd^{arg:7}") implicitFalse + .=> var ">>=" + .$ (var "[0, 1]" .$ var "^cons_fuel^" .$ var "n" .$ var "bs") + .$ ( MkArg MW ExplicitArg (Just "^bnd^{arg:8}") implicitFalse + .=> var "Prelude.pure" + .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) + .$ ( var "Data.List.Covering.Miss" + .! ("n", implicitTrue) + .! ("bs", implicitTrue) + .$ var "^bnd^{arg:7}" + .$ var "^bnd^{arg:8}")))) + ] + , IDef + emptyFC + "<>" + [ var "<>" .$ bindVar "^cons_fuel^" .$ bindVar "n" .$ bindVar "bs" + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Data.List.Covering.Hit (orders)")) + .$ ( var ">>=" + .$ (var "[0]" .$ var "^outmost-fuel^" .$ var "n") + .$ ( MkArg MW ExplicitArg (Just "i") implicitFalse + .=> var ">>=" + .$ ( var "[0, 1, 2, 3]" + .$ var "^outmost-fuel^" + .$ var "n" + .$ var "i" + .$ var "bs" + .$ var "Prelude.Basics.True") + .$ ( MkArg MW ExplicitArg (Just "^bnd^{conArg:2}") implicitFalse + .=> var ">>=" + .$ ( var "[0, 1]" + .$ var "^cons_fuel^" + .$ var "n" + .$ ( var "Data.List.Covering.BitMask.update" + .! ("n", var "n") + .$ var "i" + .$ var "Prelude.Basics.False" + .$ var "bs")) + .$ ( MkArg MW ExplicitArg (Just "^bnd^{arg:9}") implicitFalse + .=> var "Prelude.pure" + .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) + .$ ( var "Data.List.Covering.Hit" + .! ("n", implicitTrue) + .! ("bs", implicitTrue) + .$ implicitTrue + .@ var "^bnd^{conArg:2}" + .$ var "^bnd^{arg:9}"))))) + ] + ] + , scope = + iCase + { sc = var "^fuel_arg^" + , ty = var "Data.Fuel.Fuel" + , clauses = + [ var "Data.Fuel.Dry" + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Data.List.Covering.CoveringSequence[0, 1] (dry fuel)")) + .$ (var "<>" .$ var "Data.Fuel.Dry" .$ var "inter^" .$ var "inter^<{arg:1}>") + , var "Data.Fuel.More" .$ bindVar "^sub^fuel_arg^" + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Data.List.Covering.CoveringSequence[0, 1] (spend fuel)")) + .$ ( var "Test.DepTyCheck.Gen.frequency" + .$ ( var "::" + .$ ( var "Builtin.MkPair" + .$ var "Data.Nat1.one" + .$ ( var "<>" + .$ var "^fuel_arg^" + .$ var "inter^" + .$ var "inter^<{arg:1}>")) + .$ ( var "::" + .$ ( var "Builtin.MkPair" + .$ (var "Deriving.DepTyCheck.Util.Reflection.leftDepth" .$ var "^sub^fuel_arg^") + .$ ( var "<>" + .$ var "^sub^fuel_arg^" + .$ var "inter^" + .$ var "inter^<{arg:1}>")) + .$ ( var "::" + .$ ( var "Builtin.MkPair" + .$ (var "Deriving.DepTyCheck.Util.Reflection.leftDepth" .$ var "^sub^fuel_arg^") + .$ ( var "<>" + .$ var "^sub^fuel_arg^" + .$ var "inter^" + .$ var "inter^<{arg:1}>")) + .$ var "Nil")))) + ] + } + } + ] + , IDef + emptyFC + "[0, 1, 2, 3]" + [ var "[0, 1, 2, 3]" + .$ bindVar "^fuel_arg^" + .$ bindVar "inter^" + .$ bindVar "inter^<{arg:2}>" + .$ bindVar "inter^<{arg:3}>" + .$ bindVar "inter^<{arg:4}>" + .= local + { decls = + [ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "<>" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") + .-> MkArg MW ExplicitArg (Just "{arg:2}") (var "Data.Fin.Fin" .$ var "n") + .-> MkArg MW ExplicitArg (Just "{arg:3}") (var "Data.List.Covering.BitMask.BitMask" .$ var "n") + .-> MkArg MW ExplicitArg (Just "{arg:4}") (var "Prelude.Basics.Bool") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ ( var "Data.List.Covering.BitMask.Index.AtIndex" + .$ var "n" + .$ var "{arg:2}" + .$ var "{arg:3}" + .$ var "{arg:4}") + }) + , IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "<>" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") + .-> MkArg MW ExplicitArg (Just "{arg:2}") (var "Data.Fin.Fin" .$ var "n") + .-> MkArg MW ExplicitArg (Just "{arg:3}") (var "Data.List.Covering.BitMask.BitMask" .$ var "n") + .-> MkArg MW ExplicitArg (Just "{arg:4}") (var "Prelude.Basics.Bool") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ ( var "Data.List.Covering.BitMask.Index.AtIndex" + .$ var "n" + .$ var "{arg:2}" + .$ var "{arg:3}" + .$ var "{arg:4}") + }) + , IDef + emptyFC + "<>" + [ withClause + { lhs = + var "<>" + .$ bindVar "^cons_fuel^" + .$ (var "Prelude.Types.S" .$ bindVar "n") + .$ (var "Data.Fin.FZ" .! ("k", implicitTrue)) + .$ (var "Data.List.Covering.BitMask.(::)" .! ("n", implicitTrue) .$ bindVar "b" .$ bindVar "bs") + .$ bindVar "to_be_deceqed^^b0" + , rig = MW + , wval = var "Decidable.Equality.decEq" .$ var "to_be_deceqed^^b0" .$ var "b" + , prf = Nothing + , flags = [] + , clauses = + [ var "<>" + .$ bindVar "^cons_fuel^" + .$ (var "Prelude.Types.S" .$ bindVar "n") + .$ (var "Data.Fin.FZ" .! ("k", implicitTrue)) + .$ (var "Data.List.Covering.BitMask.(::)" .! ("n", implicitTrue) .$ bindVar "b" .$ bindVar "bs") + .$ bindVar "b" + .$ (var "Prelude.Yes" .$ var "Builtin.Refl") + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Data.List.Covering.BitMask.Index.Here (orders)")) + .$ ( var "Prelude.pure" + .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) + .$ ( var "Data.List.Covering.BitMask.Index.Here" + .! ("n", implicitTrue) + .! ("bs", var "bs") + .! ("b", var "b"))) + , var "<>" + .$ bindVar "^cons_fuel^" + .$ (var "Prelude.Types.S" .$ bindVar "n") + .$ (var "Data.Fin.FZ" .! ("k", implicitTrue)) + .$ (var "Data.List.Covering.BitMask.(::)" .! ("n", implicitTrue) .$ bindVar "b" .$ bindVar "bs") + .$ bindVar "to_be_deceqed^^b0" + .$ (var "Prelude.No" .$ implicitTrue) + .= var "empty" + ] + } + , var "<>" + .$ implicitTrue + .$ implicitTrue + .$ implicitTrue + .$ implicitTrue + .$ implicitTrue + .= var "empty" + ] + , IDef + emptyFC + "<>" + [ var "<>" + .$ bindVar "^cons_fuel^" + .$ (var "Prelude.Types.S" .$ bindVar "n") + .$ (var "Data.Fin.FS" .! ("k", implicitTrue) .$ bindVar "i") + .$ (var "Data.List.Covering.BitMask.(::)" .! ("n", implicitTrue) .$ bindVar "b" .$ bindVar "bs") + .$ bindVar "v" + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Data.List.Covering.BitMask.Index.There (orders)")) + .$ ( var ">>=" + .$ ( var "[0, 1, 2, 3]" + .$ var "^cons_fuel^" + .$ var "n" + .$ var "i" + .$ var "bs" + .$ var "v") + .$ ( MkArg MW ExplicitArg (Just "^bnd^{arg:10}") implicitFalse + .=> var "Prelude.pure" + .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) + .$ ( var "Data.List.Covering.BitMask.Index.There" + .! ("b", var "b") + .! ("v", implicitTrue) + .! ("n", implicitTrue) + .! ("bs", implicitTrue) + .! ("i", implicitTrue) + .$ var "^bnd^{arg:10}"))) + , var "<>" + .$ implicitTrue + .$ implicitTrue + .$ implicitTrue + .$ implicitTrue + .$ implicitTrue + .= var "empty" + ] + ] + , scope = + iCase + { sc = var "^fuel_arg^" + , ty = var "Data.Fuel.Fuel" + , clauses = + [ var "Data.Fuel.Dry" + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Data.List.Covering.BitMask.Index.AtIndex[0, 1, 2, 3] (dry fuel)")) + .$ ( var "<>" + .$ var "Data.Fuel.Dry" + .$ var "inter^" + .$ var "inter^<{arg:2}>" + .$ var "inter^<{arg:3}>" + .$ var "inter^<{arg:4}>") + , var "Data.Fuel.More" .$ bindVar "^sub^fuel_arg^" + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Data.List.Covering.BitMask.Index.AtIndex[0, 1, 2, 3] (spend fuel)")) + .$ ( var "Test.DepTyCheck.Gen.frequency" + .$ ( var "::" + .$ ( var "Builtin.MkPair" + .$ var "Data.Nat1.one" + .$ ( var "<>" + .$ var "^fuel_arg^" + .$ var "inter^" + .$ var "inter^<{arg:2}>" + .$ var "inter^<{arg:3}>" + .$ var "inter^<{arg:4}>")) + .$ ( var "::" + .$ ( var "Builtin.MkPair" + .$ (var "Deriving.DepTyCheck.Util.Reflection.leftDepth" .$ var "^sub^fuel_arg^") + .$ ( var "<>" + .$ var "^sub^fuel_arg^" + .$ var "inter^" + .$ var "inter^<{arg:2}>" + .$ var "inter^<{arg:3}>" + .$ var "inter^<{arg:4}>")) + .$ var "Nil"))) + ] + } + } + ] + , IDef + emptyFC + "[0]" + [ var "[0]" .$ bindVar "^fuel_arg^" .$ bindVar "inter^" + .= local + { decls = + [ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "<>" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ (var "Data.Fin.Fin" .$ var "n") + }) + , IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "<>" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ (var "Data.Fin.Fin" .$ var "n") + }) + , IDef + emptyFC + "<>" + [ var "<>" .$ bindVar "^cons_fuel^" .$ (var "Prelude.Types.S" .$ bindVar "k") + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Data.Fin.FZ (orders)")) + .$ ( var "Prelude.pure" + .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) + .$ (var "Data.Fin.FZ" .! ("k", var "k"))) + , var "<>" .$ implicitTrue .$ implicitTrue .= var "empty" + ] + , IDef + emptyFC + "<>" + [ var "<>" .$ bindVar "^cons_fuel^" .$ (var "Prelude.Types.S" .$ bindVar "k") + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Data.Fin.FS (orders)")) + .$ ( var ">>=" + .$ (var "[0]" .$ var "^cons_fuel^" .$ var "k") + .$ ( MkArg MW ExplicitArg (Just "^bnd^{arg:11}") implicitFalse + .=> var "Prelude.pure" + .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) + .$ (var "Data.Fin.FS" .! ("k", implicitTrue) .$ var "^bnd^{arg:11}"))) + , var "<>" .$ implicitTrue .$ implicitTrue .= var "empty" + ] + ] + , scope = + iCase + { sc = var "^fuel_arg^" + , ty = var "Data.Fuel.Fuel" + , clauses = + [ var "Data.Fuel.Dry" + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Data.Fin.Fin[0] (dry fuel)")) + .$ (var "<>" .$ var "Data.Fuel.Dry" .$ var "inter^") + , var "Data.Fuel.More" .$ bindVar "^sub^fuel_arg^" + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Data.Fin.Fin[0] (spend fuel)")) + .$ ( var "Test.DepTyCheck.Gen.frequency" + .$ ( var "::" + .$ ( var "Builtin.MkPair" + .$ var "Data.Nat1.one" + .$ (var "<>" .$ var "^fuel_arg^" .$ var "inter^")) + .$ ( var "::" + .$ ( var "Builtin.MkPair" + .$ (var "Deriving.DepTyCheck.Util.Reflection.leftDepth" .$ var "^sub^fuel_arg^") + .$ (var "<>" .$ var "^sub^fuel_arg^" .$ var "inter^")) + .$ var "Nil"))) + ] + } + } + ] + , IDef + emptyFC + "[]" + [ var "[]" .$ bindVar "^fuel_arg^" + .= local + { decls = + [ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "<>" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> var "Test.DepTyCheck.Gen.Gen" .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" .$ var "Prelude.Types.Nat" + }) + , IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "<>" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> var "Test.DepTyCheck.Gen.Gen" .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" .$ var "Prelude.Types.Nat" + }) + , IDef + emptyFC + "<>" + [ var "<>" .$ bindVar "^cons_fuel^" + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Prelude.Types.Z (orders)")) + .$ (var "Prelude.pure" .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) .$ var "Prelude.Types.Z") + ] + , IDef + emptyFC + "<>" + [ var "<>" .$ bindVar "^cons_fuel^" + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Prelude.Types.S (orders)")) + .$ ( var ">>=" + .$ (var "[]" .$ var "^cons_fuel^") + .$ ( MkArg MW ExplicitArg (Just "^bnd^{arg:12}") implicitFalse + .=> var "Prelude.pure" + .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) + .$ (var "Prelude.Types.S" .$ var "^bnd^{arg:12}"))) + ] + ] + , scope = + iCase + { sc = var "^fuel_arg^" + , ty = var "Data.Fuel.Fuel" + , clauses = + [ var "Data.Fuel.Dry" + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Prelude.Types.Nat[] (dry fuel)")) + .$ (var "<>" .$ var "Data.Fuel.Dry") + , var "Data.Fuel.More" .$ bindVar "^sub^fuel_arg^" + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Prelude.Types.Nat[] (spend fuel)")) + .$ ( var "Test.DepTyCheck.Gen.frequency" + .$ ( var "::" + .$ (var "Builtin.MkPair" .$ var "Data.Nat1.one" .$ (var "<>" .$ var "^fuel_arg^")) + .$ ( var "::" + .$ ( var "Builtin.MkPair" + .$ (var "Deriving.DepTyCheck.Util.Reflection.leftDepth" .$ var "^sub^fuel_arg^") + .$ (var "<>" .$ var "^sub^fuel_arg^")) + .$ var "Nil"))) + ] + } + } + ] + , IDef + emptyFC + "[0, 1, 2]" + [ var "[0, 1, 2]" + .$ bindVar "^fuel_arg^" + .$ bindVar "inter^" + .$ bindVar "inter^<{arg:5}>" + .$ bindVar "inter^<{arg:6}>" + .= local + { decls = + [ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "<>" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") + .-> MkArg MW ExplicitArg (Just "{arg:5}") (var "Prelude.Basics.Bool") + .-> MkArg MW ExplicitArg (Just "{arg:6}") (var "Data.List.Covering.BitMask.BitMask" .$ var "n") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ (var "Data.List.Covering.BitMask.Index.AllBitsAre" .$ var "n" .$ var "{arg:5}" .$ var "{arg:6}") + }) + , IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "<>" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") + .-> MkArg MW ExplicitArg (Just "{arg:5}") (var "Prelude.Basics.Bool") + .-> MkArg MW ExplicitArg (Just "{arg:6}") (var "Data.List.Covering.BitMask.BitMask" .$ var "n") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ (var "Data.List.Covering.BitMask.Index.AllBitsAre" .$ var "n" .$ var "{arg:5}" .$ var "{arg:6}") + }) + , IDef + emptyFC + "<>" + [ var "<>" + .$ bindVar "^cons_fuel^" + .$ var "Prelude.Types.Z" + .$ bindVar "b" + .$ var "Data.List.Covering.BitMask.Nil" + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Data.List.Covering.BitMask.Index.Finish (orders)")) + .$ ( var "Prelude.pure" + .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) + .$ (var "Data.List.Covering.BitMask.Index.Finish" .! ("b", var "b"))) + , var "<>" .$ implicitTrue .$ implicitTrue .$ implicitTrue .$ implicitTrue + .= var "empty" + ] + , IDef + emptyFC + "<>" + [ withClause + { lhs = + var "<>" + .$ bindVar "^cons_fuel^" + .$ (var "Prelude.Types.S" .$ bindVar "n") + .$ bindVar "b" + .$ (var "Data.List.Covering.BitMask.(::)" .! ("n", implicitTrue) .$ bindVar "to_be_deceqed^^b0" .$ bindVar "bs") + , rig = MW + , wval = var "Decidable.Equality.decEq" .$ var "to_be_deceqed^^b0" .$ var "b" + , prf = Nothing + , flags = [] + , clauses = + [ var "<>" + .$ bindVar "^cons_fuel^" + .$ (var "Prelude.Types.S" .$ bindVar "n") + .$ bindVar "b" + .$ (var "Data.List.Covering.BitMask.(::)" .! ("n", implicitTrue) .$ bindVar "b" .$ bindVar "bs") + .$ (var "Prelude.Yes" .$ var "Builtin.Refl") + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Data.List.Covering.BitMask.Index.Continue (orders)")) + .$ ( var ">>=" + .$ ( var "[0, 1, 2]" + .$ var "^cons_fuel^" + .$ var "n" + .$ var "b" + .$ var "bs") + .$ ( MkArg MW ExplicitArg (Just "^bnd^{arg:13}") implicitFalse + .=> var "Prelude.pure" + .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) + .$ ( var "Data.List.Covering.BitMask.Index.Continue" + .! ("n", implicitTrue) + .! ("bs", implicitTrue) + .! ("b", implicitTrue) + .$ var "^bnd^{arg:13}"))) + , var "<>" + .$ bindVar "^cons_fuel^" + .$ (var "Prelude.Types.S" .$ bindVar "n") + .$ bindVar "b" + .$ ( var "Data.List.Covering.BitMask.(::)" + .! ("n", implicitTrue) + .$ bindVar "to_be_deceqed^^b0" + .$ bindVar "bs") + .$ (var "Prelude.No" .$ implicitTrue) + .= var "empty" + ] + } + , var "<>" .$ implicitTrue .$ implicitTrue .$ implicitTrue .$ implicitTrue + .= var "empty" + ] + ] + , scope = + iCase + { sc = var "^fuel_arg^" + , ty = var "Data.Fuel.Fuel" + , clauses = + [ var "Data.Fuel.Dry" + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Data.List.Covering.BitMask.Index.AllBitsAre[0, 1, 2] (dry fuel)")) + .$ ( var "<>" + .$ var "Data.Fuel.Dry" + .$ var "inter^" + .$ var "inter^<{arg:5}>" + .$ var "inter^<{arg:6}>") + , var "Data.Fuel.More" .$ bindVar "^sub^fuel_arg^" + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Data.List.Covering.BitMask.Index.AllBitsAre[0, 1, 2] (spend fuel)")) + .$ ( var "Test.DepTyCheck.Gen.frequency" + .$ ( var "::" + .$ ( var "Builtin.MkPair" + .$ var "Data.Nat1.one" + .$ ( var "<>" + .$ var "^fuel_arg^" + .$ var "inter^" + .$ var "inter^<{arg:5}>" + .$ var "inter^<{arg:6}>")) + .$ ( var "::" + .$ ( var "Builtin.MkPair" + .$ (var "Deriving.DepTyCheck.Util.Reflection.leftDepth" .$ var "^sub^fuel_arg^") + .$ ( var "<>" + .$ var "^sub^fuel_arg^" + .$ var "inter^" + .$ var "inter^<{arg:5}>" + .$ var "inter^<{arg:6}>")) + .$ var "Nil"))) + ] + } + } + ] + ] + , scope = var "[0, 1]" .$ var "^outmost-fuel^" .$ var "outer^" .$ var "outer^" + } + diff --git a/examples/covering-seq/tests/gens/print/run b/examples/covering-seq/tests/gens/print/run new file mode 120000 index 000000000..d47546361 --- /dev/null +++ b/examples/covering-seq/tests/gens/print/run @@ -0,0 +1 @@ +../../../../../tests/derivation/_common/run \ No newline at end of file diff --git a/examples/covering-seq/tests/tests.ipkg b/examples/covering-seq/tests/tests.ipkg new file mode 100644 index 000000000..5f0f1f0de --- /dev/null +++ b/examples/covering-seq/tests/tests.ipkg @@ -0,0 +1,8 @@ +package covering-seq-tests + +main = Tests +executable = runtests + +builddir = ".build" + +depends = golden-runner-helper diff --git a/examples/pil-fun/pil-fun.ipkg b/examples/pil-fun/pil-fun.ipkg index 8f2119842..29134011d 100644 --- a/examples/pil-fun/pil-fun.ipkg +++ b/examples/pil-fun/pil-fun.ipkg @@ -10,6 +10,7 @@ builddir = ".build" prebuild = "sh .derive-in-parallel" depends = deptycheck + , getopts , prettier executable = "pil-fun" diff --git a/examples/pil-fun/src/Language/PilFun.idr b/examples/pil-fun/src/Language/PilFun.idr index 07e7b0ee8..46e670b63 100644 --- a/examples/pil-fun/src/Language/PilFun.idr +++ b/examples/pil-fun/src/Language/PilFun.idr @@ -113,10 +113,10 @@ namespace SnocListTyMut decEq ((:<) _ _ _) [<] = No $ \case Refl impossible public export - data AtIndex : (sx : SnocListTyMut) -> (idx : IndexIn sx) -> Ty -> Mut -> Type where + data AtIndex : {sx : SnocListTyMut} -> (idx : IndexIn sx) -> Ty -> Mut -> Type where [search sx idx] - Here' : AtIndex ((:<) sx ty mut) Here ty mut - There' : AtIndex sx i ty mut -> AtIndex ((:<) sx x m) (There i) ty mut + Here' : AtIndex {sx = (:<) sx ty mut} Here ty mut + There' : AtIndex {sx} i ty mut -> AtIndex {sx = (:<) sx x m} (There i) ty mut ||| Add a bunch of immutable variables public export @@ -167,10 +167,10 @@ namespace SnocListFunSig (.length) = length public export - data AtIndex : (sx : SnocListFunSig) -> (idx : IndexIn sx) -> FunSig -> Type where + data AtIndex : {sx : SnocListFunSig} -> (idx : IndexIn sx) -> FunSig -> Type where [search sx idx] - Here' : AtIndex (sx :< sig) Here sig - There' : AtIndex sx i sig -> AtIndex (sx :< x) (There i) sig + Here' : AtIndex {sx = sx :< sig} Here sig + There' : AtIndex {sx} i sig -> AtIndex {sx = sx :< x} (There i) sig public export Vars : Type @@ -189,11 +189,11 @@ data Expr : Funs -> Vars -> Ty -> Type where C : (x : Literal ty) -> Expr funs vars ty V : (n : IndexIn vars) -> - AtIndex vars n ty mut => + AtIndex n ty mut => Expr funs vars ty F : (n : IndexIn funs) -> - AtIndex funs n (from ==> Just to) => + AtIndex n (from ==> Just to) => ExprsSnocList funs vars from -> Expr funs vars to @@ -220,7 +220,7 @@ data Stmts : (funs : Funs) -> Stmts funs vars retTy (#=) : (n : IndexIn vars) -> - AtIndex vars n ty Mutable => + AtIndex n ty Mutable => (v : Expr funs vars ty) -> (cont : Stmts funs vars retTy) -> Stmts funs vars retTy @@ -231,7 +231,7 @@ data Stmts : (funs : Funs) -> Stmts funs vars retTy Call : (n : IndexIn funs) -> - AtIndex funs n (from ==> Nothing) => + AtIndex n (from ==> Nothing) => ExprsSnocList funs vars from -> (cont : Stmts funs vars retTy) -> Stmts funs vars retTy diff --git a/examples/pil-fun/src/Language/PilFun/Pretty.idr b/examples/pil-fun/src/Language/PilFun/Pretty.idr index d581ae336..98d4bdaab 100644 --- a/examples/pil-fun/src/Language/PilFun/Pretty.idr +++ b/examples/pil-fun/src/Language/PilFun/Pretty.idr @@ -21,37 +21,37 @@ import System.Random.Pure.StdGen public export data UniqNames : Funs -> Vars -> Type public export -data NameIsNew : (funs : Funs) -> (vars : Vars) -> UniqNames funs vars -> String -> Type +data NameIsNew : UniqNames funs vars -> String -> Type data UniqNames : Funs -> Vars -> Type where Empty : UniqNames [<] [<] - JustNew : (ss : UniqNames funs vars) => (s : String) -> (0 _ : NameIsNew funs vars ss s) => UniqNames funs vars - NewFun : (ss : UniqNames funs vars) => (s : String) -> (0 _ : NameIsNew funs vars ss s) => + JustNew : (ss : UniqNames funs vars) => (s : String) -> (0 _ : NameIsNew ss s) => UniqNames funs vars + NewFun : (ss : UniqNames funs vars) => (s : String) -> (0 _ : NameIsNew ss s) => {default False isInfix : Bool} -> (0 infixCond : So $ not isInfix || fun.From.length >= 1) => UniqNames (funs: (s : String) -> (0 _ : NameIsNew funs vars ss s) => UniqNames funs ((:<) vars var mut) + NewVar : (ss : UniqNames funs vars) => (s : String) -> (0 _ : NameIsNew ss s) => UniqNames funs ((:<) vars var mut) -data NameIsNew : (funs : Funs) -> (vars : Vars) -> UniqNames funs vars -> String -> Type where - E : NameIsNew [<] [<] Empty x - J : (0 _ : So $ x /= s) -> NameIsNew funs vars ss x -> NameIsNew funs vars (JustNew @{ss} s @{sub}) x - F : (0 _ : So $ x /= s) -> NameIsNew funs vars ss x -> NameIsNew (funs: NameIsNew funs vars ss x -> NameIsNew funs ((:<) vars var mut) (NewVar @{ss} s @{sub}) x +data NameIsNew : UniqNames funs vars -> String -> Type where + E : NameIsNew {funs=[<]} {vars=[<]} Empty x + J : (0 _ : So $ x /= s) -> NameIsNew {funs} {vars} ss x -> NameIsNew {funs} {vars} (JustNew @{ss} s @{sub}) x + F : (0 _ : So $ x /= s) -> NameIsNew {funs} {vars} ss x -> NameIsNew {funs=funs: NameIsNew {funs} {vars} ss x -> NameIsNew {funs} {vars=(:<) vars var mut} (NewVar @{ss} s @{sub}) x public export interface NamesRestrictions where reservedKeywords : SortedSet String rawNewName : Fuel -> (Fuel -> Gen MaybeEmpty String) => - (funs : Funs) -> (vars : Vars) -> (names : UniqNames funs vars) -> - Gen MaybeEmpty (s ** NameIsNew funs vars names s) + (vars : Vars) -> (funs : Funs) -> (names : UniqNames funs vars) -> + Gen MaybeEmpty (s ** NameIsNew names s) export genNewName : Fuel -> (Fuel -> Gen MaybeEmpty String) => NamesRestrictions => (funs : Funs) -> (vars : Vars) -> (names : UniqNames funs vars) -> - Gen MaybeEmpty (s ** NameIsNew funs vars names s) + Gen MaybeEmpty (s ** NameIsNew names s) genNewName fl @{genStr} funs vars names = do - nn@(nm ** _) <- rawNewName fl @{genStr} funs vars names + nn@(nm ** _) <- rawNewName fl @{genStr} vars funs names if reservedKeywords `contains'` nm then assert_total $ genNewName fl @{genStr} funs vars names -- we could reduce fuel instead of `assert_total` else pure nn @@ -102,3 +102,11 @@ getExprs (sx: (indeed : Bool) -> Doc opts -> Doc opts -> Doc opts wrapBrIf False pre x = pre `vappend` indent' 2 x wrapBrIf True pre x = ifMultiline (pre <++> "{" <++> x <++> "}") (vsep [pre <++> "{", indent' 2 x, "}"]) + +public export +0 PP : Type +PP = {funs : _} -> {vars : _} -> {retTy : _} -> {opts : _} -> + (names : UniqNames funs vars) => + (newNames : Gen0 String) => + Fuel -> + Stmts funs vars retTy -> Gen0 $ Doc opts diff --git a/examples/pil-fun/src/Language/PilFun/Pretty/DSL.idr b/examples/pil-fun/src/Language/PilFun/Pretty/DSL.idr index 09c3a2a8b..29f98f207 100644 --- a/examples/pil-fun/src/Language/PilFun/Pretty/DSL.idr +++ b/examples/pil-fun/src/Language/PilFun/Pretty/DSL.idr @@ -17,7 +17,7 @@ public export %inline AddFun : (isInfix : Bool) -> (s : String) -> (fun : FunSig) -> (0 _ : So $ not isInfix || fun.From.length >= 1) => (ctx : NamedCtxt) -> - (0 _ : NameIsNew ctx.functions ctx.variables ctx.fvNames s) => + (0 _ : NameIsNew ctx.fvNames s) => NamedCtxt AddFun isInfix s fun $ MkNamedCtxt funs vars names = MkNamedCtxt (funs: {vars : _} -> {retTy : _} -> {opts : _} -> - (names : UniqNames funs vars) => - (newNames : Gen0 String) => - Fuel -> - Stmts funs vars retTy -> Gen0 $ Doc opts +printScala3 : PP printScala3 fl = printStmts {names} {newNames} fl True diff --git a/examples/pil-fun/src/Runner.idr b/examples/pil-fun/src/Runner.idr index 7dc5aa9f6..4e8c1412b 100644 --- a/examples/pil-fun/src/Runner.idr +++ b/examples/pil-fun/src/Runner.idr @@ -2,6 +2,9 @@ module Runner import Data.Fuel import Data.List.Lazy +import Data.List1 +import Data.SortedMap +import Data.String import Language.PilFun.Derived import Language.PilFun.Pretty.Derived @@ -12,12 +15,110 @@ import Test.DepTyCheck.Gen import Text.PrettyPrint.Bernardy +import System +import System.GetOpts import System.Random.Pure.StdGen %default total -stdFuns : NamedCtxt -stdFuns = do +------------------- +--- CLI options --- +------------------- + +record Config where + constructor MkConfig + usedSeed : IO StdGen + layoutOpts : LayoutOpts + testsCnt : Nat + modelFuel : Fuel + ppFuel : Fuel + +defaultConfig : Config +defaultConfig = MkConfig + { usedSeed = initSeed + , layoutOpts = Opts 152 + , testsCnt = 10 + , modelFuel = limit 8 + , ppFuel = limit 1000000 + } + +parseSeed : String -> Either String $ Config -> Config +parseSeed str = do + let n1:::n2::[] = trim <$> split (== ',') str + | _ => Left "we expect two numbers divided by a comma" + let Just n1 = parsePositive n1 + | Nothing => Left "expected a positive number at the first component, given `\{n1}`" + let Just n2 = parsePositive {a=Bits64} n2 + | Nothing => Left "expected a positive number at the second component, given `\{n2}`" + let Yes prf = decSo $ testBit n2 0 + | No _ => Left "second component must be odd" + Right {usedSeed := pure $ rawStdGen n1 n2} + +parsePPWidth : String -> Either String $ Config -> Config +parsePPWidth str = case parsePositive str of + Just n => Right {layoutOpts := Opts n} + Nothing => Left "can't parse max width for the pretty-printer" + +parseTestsCount : String -> Either String $ Config -> Config +parseTestsCount str = case parsePositive str of + Just n => Right {testsCnt := n} + Nothing => Left "can't parse given count of tests" + +parseModelFuel : String -> Either String $ Config -> Config +parseModelFuel str = case parsePositive str of + Just n => Right {modelFuel := limit n} + Nothing => Left "can't parse given model fuel" + +parsePPFuel : String -> Either String $ Config -> Config +parsePPFuel str = case parsePositive str of + Just n => Right {ppFuel := limit n} + Nothing => Left "can't parse given pretty-printer fuel" + +cliOpts : List $ OptDescr $ Config -> Config +cliOpts = + [ MkOpt [] ["seed"] + (ReqArg' parseSeed ",") + "Sets particular random seed to start with." + , MkOpt ['w'] ["pp-width"] + (ReqArg' parsePPWidth "") + "Sets the max length for the pretty-printer." + , MkOpt ['n'] ["tests-count"] + (ReqArg' parseTestsCount "") + "Sets the count of tests to generate." + , MkOpt [] ["model-fuel"] + (ReqArg' parseModelFuel "") + "Sets how much fuel there is for generation of the model." + , MkOpt [] ["pp-fuel"] + (ReqArg' parsePPFuel "") + "Sets how much fuel there is for pretty-printing." + ] + +--------------- +--- Running --- +--------------- + +namesGen : Gen0 String +namesGen = pack <$> listOf {length = choose (1,10)} (choose ('a', 'z')) + +run : Config -> + NamedCtxt -> + (pp : PP) -> + IO () +run conf ctxt pp = do + seed <- conf.usedSeed + let vals = unGenTryN conf.testsCnt seed $ + genStmts conf.modelFuel ctxt.functions ctxt.variables Nothing >>= + pp @{ctxt.fvNames} @{namesGen} conf.ppFuel + Lazy.for_ vals $ \val => do + putStrLn "-------------------\n" + putStr $ render conf.layoutOpts val + +----------------------- +--- Language config --- +----------------------- + +scala3StdFuns : NamedCtxt +scala3StdFuns = do AddFun True "+" $ [< Int', Int'] ==> Just Int' AddFun True "<" $ [< Int', Int'] ==> Just Bool' AddFun True "<=" $ [< Int', Int'] ==> Just Bool' @@ -28,19 +129,32 @@ stdFuns = do AddFun False "Console.println" $ [< Int'] ==> Nothing Enough -prettyOpts : LayoutOpts -prettyOpts = Opts 152 +supportedLanguages : SortedMap String (NamedCtxt, PP) +supportedLanguages = fromList + [ ("scala3", scala3StdFuns, printScala3) + ] -namesGen : Gen0 String -namesGen = pack <$> listOf {length = choose (1,10)} (choose ('a', 'z')) +--------------- +--- Startup --- +--------------- export main : IO () main = do - let modelFuel = limit 8 - let ppFuel = limit 1000000 - let vals = unGenTryN 10 someStdGen $ - genStmts modelFuel stdFuns.functions stdFuns.variables Nothing >>= printScala3 @{stdFuns.fvNames} @{namesGen} ppFuel - Lazy.for_ vals $ \val => do - putStrLn "///////////////////\n" - putStr $ render prettyOpts val + args <- getArgs + let usage : Lazy String := usageInfo "Usage: \{fromMaybe "pil-fun" $ head' args} [options] " cliOpts + let langs : Lazy String := joinBy ", " $ SortedSet.toList $ keySet supportedLanguages + let MkResult options nonOptions [] [] = getOpt Permute cliOpts $ drop 1 args + | MkResult {unrecognized=unrecOpts@(_::_), _} => if "help" `elem` unrecOpts + then putStrLn usage + else die "unrecodnised options \{show unrecOpts}\n\{usage}" + | MkResult {errors=es@(_::_), _} => die "arguments parse errors \{show es}\n\{usage}" + let [lang] = nonOptions + | [] => die "no language is given, supported languages: \{langs}\n\{usage}" + | many => die "too many languages are given\n\{usage}" + let Just (ctxt, pp) = lookup lang supportedLanguages + | Nothing => die "unknown language \{lang}, supported languages \{langs}\n\{usage}" + + let config = foldl (flip apply) defaultConfig options + + run config ctxt pp diff --git a/examples/pil-fun/tests/gens/scala3/expected b/examples/pil-fun/tests/gens/scala3/expected new file mode 100644 index 000000000..7e594f27c --- /dev/null +++ b/examples/pil-fun/tests/gens/scala3/expected @@ -0,0 +1,167 @@ +------------------- + + +@main +def tvlt(): Unit = { + if (5.+(0)) < (2.+(2)) then { + var lybokfpr = (4.+(5)).+(4.+(5)) + lybokfpr = lybokfpr + lybokfpr = 4.+(lybokfpr + 1) + lybokfpr = lybokfpr + var uo: Boolean = (lybokfpr + lybokfpr).==(3 + 0) + + } else { + val qemiujv = (jjh: Int, gxdtmng: Int, zdkvk: Int, n: Int, zadrbgu: Boolean) => { + if (jjh + n) == zdkvk then + extension (cuohsl: Int) + def zmuqm(lnevjvz: Boolean, ssl: Int, ltiv: Int): Int = { + if (true.&&(true)).||(zadrbgu) then + if lnevjvz.&&(false && (!(zadrbgu))) then + {} + + else + if (ltiv.==(zdkvk)) || (ssl.<(4)) then + {} + else + {} + + (ssl.+(5)) + (n.+(6)) + } : Int + + else + extension (r: Int) + def mrew(nbasrya: Int, jqaak: Boolean, jpinulqg: Boolean, kazmm: Boolean) = + {} + def qsokaogqmr() = { } + + val mbn = jjh.+(1) + val ltpicdael: Int = 6 + var woyvgazf: Int = (4 + 0).+(6 + n) + + } : Unit + if (3 == 1) && (0.==(4)) then + if (2 + 1).==(1 + 2) then + extension (r: Int) def naqxvjgxmb() = { 4 <= (r + 1) } + qemiujv(1, 6, 5.+(4), 4.+(0), (1.naqxvjgxmb()).||(false.||(true))) + + else + if false then + {} + else + if true.||(false && false) then { + + } + + var wf: Boolean = (2.+(2)).<(2 + 2) + + extension (xmfo: Boolean) + def qnog(jg: Boolean, tzmk: Int, ogkzgnyugn: Int, bzyegcnug: Int) = { + qemiujv(3, 0, 0, tzmk.+(6), 5 < (tzmk + 6)) + + } + + else + var yqavod = false && true + qemiujv(6, 0, 0.+(4), 4.+(1), yqavod || (yqavod && yqavod)) + val sxfdzhrrh = (zbdd: Boolean, acoykh: Boolean, cbde: Boolean, dngc: Boolean, bqf: Boolean, drzqpmieuq: Boolean) => + {} + + if false || (2 <= 4) then + val obaztbbz: Boolean = (1.+(2)).==(2 + 6) + + else + val ji: Boolean = (2 + 4).==(0.+(1)) + val xsjzzhjk = (rbjd: Boolean, msoanazo: Int, dbbygddcsy: Boolean, j: Int, ots: Boolean, axwjjdtw: Boolean) => { } + + + } + val jrqa: Boolean = !(false) + extension (yannoshffy: Int) + def kwc(qnbouij: Int, mtsapbnquq: Int): Unit = + var k: Boolean = true + k = !(!(!(jrqa))) + + val llqkzrga = (deszncso: Boolean, dtwbodm: Boolean, wvqqvju: Boolean) => { + var x = (wvqqvju.&&(true)).||(4 == 5) + x = true + (6.+(3)).+(0.+(1)) + } + +} +------------------- + +val kwyflaeizb = (0.+(5)).+(3.+(5)) +val wfjunn = kwyflaeizb.+(kwyflaeizb + kwyflaeizb) +var lisrdrrgc: Int = 4.+(1) +val bh = (agieo: Boolean, qazggfrct: Int) => + if (0.<=(3)) && (!(false)) then { + var fwiklya = lisrdrrgc + + } else { + extension (psmyvssee: Int) def kmcysd(mc: Boolean, m: Int, kpwfobj: Int, g: Boolean, sk: Boolean) = { } + + } + lisrdrrgc = (kwyflaeizb + qazggfrct).+(kwyflaeizb.+(5)) + 6 +val qrnqnfy = (yovn: Boolean, t: Boolean) => { + if (true.||(yovn)) || yovn then { + + } + yovn +} + +@main +def chojxe(): Unit = { + if 1 < (kwyflaeizb.+(5)) then + {} + else + {} + +} +------------------- + +extension (xirzqm: Boolean) + def efqu(): Unit = + val tmxsbu = (5 == 6) && (!(false)) + var xnzeyxyo: Boolean = 4 == (3 + 4) + extension (kg: Boolean) + def doxdnly() = { + if (1.+(5)).<=(5 + 4) then { + xnzeyxyo = true + + } + if true then + {} + else + {} + + } + var drjp: Boolean = (0 == 0).||(xirzqm && false) + if tmxsbu && (tmxsbu && false) then { + + } + +var cstczqacp = (0 + 3) == (5 + 5) + +@main +def japky(): Unit = { + if cstczqacp then { + (4 < (0.+(1))).efqu() + extension (faco: Boolean) + def f(vunluob: Int, xgriaerel: Boolean, rhn: Boolean, ffmlvduuc: Boolean, l: Boolean): Unit = { + (5.==(vunluob)).efqu() + + } : Unit + val tkhyrdnc = () => { (0.+(0)).==(3) } : Boolean + + } else { + var gfknyi: Int = (1.+(3)) + (5.+(6)) + var quusqeb = (4 + 4) + (gfknyi.+(2)) + cstczqacp.efqu() + + } + var cyopq: Int = (0 + 2) + (3 + 2) + cstczqacp = cstczqacp && (true.&&(cstczqacp)) + val ycchap: Boolean = false + +} diff --git a/examples/pil-fun/tests/gens/scala3/run b/examples/pil-fun/tests/gens/scala3/run new file mode 100755 index 000000000..7307aaedb --- /dev/null +++ b/examples/pil-fun/tests/gens/scala3/run @@ -0,0 +1,6 @@ +rm -rf build + +flock "$1" pack -q install-deps pil-fun && \ +pack run pil-fun scala3 --seed 0,3 --tests 3 --model-fuel 6 + +rm -rf build diff --git a/examples/pil-fun/tests/lang/usage/UsePil.idr b/examples/pil-fun/tests/lang/usage/UsePil.idr index 65f35d52b..aa416077f 100644 --- a/examples/pil-fun/tests/lang/usage/UsePil.idr +++ b/examples/pil-fun/tests/lang/usage/UsePil.idr @@ -35,7 +35,7 @@ program = do Call Print [< V 1] Nop -failing -- "Mismatch between: Int' and Bool'" +failing "Can't find an implementation for AtIndex" -- "Mismatch between: Int' and Bool'" bad : Stmts StdF [<] Nothing bad = do NewV Int' {- 0 -} Mutable $ C 5 @@ -43,15 +43,15 @@ failing -- "Mismatch between: Int' and Bool'" 1 #= F Plus [< V 0, C 1] Nop -failing -- "Mismatch between: [<] and [ Gen MaybeEmpty SortedList +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter $ Fuel -> Gen MaybeEmpty SortedList diff --git a/examples/sorted-list/tests/gens/print/PrintDerivation.idr b/examples/sorted-list/tests/gens/print/PrintDerivation.idr deleted file mode 120000 index af4998fcf..000000000 --- a/examples/sorted-list/tests/gens/print/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../../../../../tests/derivation/_common/PrintDerivation.idr \ No newline at end of file diff --git a/examples/sorted-list/tests/gens/print/expected b/examples/sorted-list/tests/gens/print/expected index 66f4e31ee..b70dd9866 100644 --- a/examples/sorted-list/tests/gens/print/expected +++ b/examples/sorted-list/tests/gens/print/expected @@ -1,7 +1,5 @@ -1/2: Building PrintDerivation (PrintDerivation.idr) -2/2: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> Gen MaybeEmpty SortedList -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> Gen MaybeEmpty SortedList MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> local { decls = @@ -137,7 +135,7 @@ LOG gen.auto.derive.infra:0: .$ (var "Builtin.DPair.MkDPair" .$ bindVar "xs" .$ bindVar "^bnd^{conArg:1}") .= var "Prelude.pure" .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) - .$ (var "Data.List.Sorted.(::)" .$ var "x" .$ var "xs" .@ var "^bnd^{conArg:1}") + .$ (var "Data.List.Sorted.(::)" .$ implicitTrue .$ implicitTrue .@ var "^bnd^{conArg:1}") ] })) ] @@ -257,10 +255,10 @@ LOG gen.auto.derive.infra:0: .$ ( var "Builtin.DPair.MkDPair" .$ implicitTrue .$ ( var "Data.List.Sorted.NE" - .! ("xs", var "xs") - .! ("x", var "x") + .! ("xs", implicitTrue) + .! ("x", implicitTrue) .! ("prf", var "prf") - .! ("n", var "n") + .! ("n", implicitTrue) .$ var "^bnd^{arg:3}"))) ] }) @@ -369,10 +367,10 @@ LOG gen.auto.derive.infra:0: .$ ( var "Builtin.DPair.MkDPair" .$ implicitTrue .$ ( var "Data.List.Sorted.NE" - .! ("xs", var "xs") - .! ("x", var "x") + .! ("xs", implicitTrue) + .! ("x", implicitTrue) .! ("prf", var "prf") - .! ("n", var "n") + .! ("n", implicitTrue) .$ var "^bnd^{arg:3}")) ] }) @@ -479,8 +477,8 @@ LOG gen.auto.derive.infra:0: .$ ( var "Builtin.DPair.MkDPair" .$ implicitTrue .$ ( var "Data.Nat.LTESucc" - .! ("right", var "right") - .! ("left", var "left") + .! ("right", implicitTrue) + .! ("left", implicitTrue) .$ var "^bnd^{arg:4}")) ] })) diff --git a/pack.toml b/pack.toml index 79612aaf0..aa47fa769 100644 --- a/pack.toml +++ b/pack.toml @@ -30,6 +30,12 @@ path = "examples/sorted-list" ipkg = "sorted-list.ipkg" test = "tests/tests.ipkg" +[custom.all.covering-seq] +type = "local" +path = "examples/covering-seq" +ipkg = "covering-seq.ipkg" +test = "tests/tests.ipkg" + [custom.all.uniq-list] type = "local" path = "examples/uniq-list" diff --git a/src/Deriving/DepTyCheck/Gen.idr b/src/Deriving/DepTyCheck/Gen.idr index 7fe67428e..42307bce0 100644 --- a/src/Deriving/DepTyCheck/Gen.idr +++ b/src/Deriving/DepTyCheck/Gen.idr @@ -3,3 +3,8 @@ module Deriving.DepTyCheck.Gen import public Deriving.DepTyCheck.Gen.Entry %default total + +%defaulthint %inline +public export +DefaultConstructorDerivator : ConstructorDerivator +DefaultConstructorDerivator = LeastEffort diff --git a/src/Deriving/DepTyCheck/Gen/Core/ConsDerive.idr b/src/Deriving/DepTyCheck/Gen/Core/ConsDerive.idr index c86098f12..fc2f8b4d7 100644 --- a/src/Deriving/DepTyCheck/Gen/Core/ConsDerive.idr +++ b/src/Deriving/DepTyCheck/Gen/Core/ConsDerive.idr @@ -13,6 +13,41 @@ import public Deriving.DepTyCheck.Gen.Derive %default total +record TypeApp (0 con : Con) where + constructor MkTypeApp + argHeadType : TypeInfo + {auto 0 argHeadTypeGood : AllTyArgsNamed argHeadType} + argApps : Vect argHeadType.args.length .| Either (Fin con.args.length) TTImp + +getTypeApps : Elaboration m => NamesInfoInTypes => (con : Con) -> m $ Vect con.args.length $ TypeApp con +getTypeApps con = do + let conArgIdxs = SortedMap.fromList $ mapI con.args $ \idx, arg => (argName arg, idx) + + -- Analyse that we can do subgeneration for each constructor argument + -- Fails using `Elaboration` if the given expression is not an application to a type constructor + let analyseTypeApp : TTImp -> m $ TypeApp con + analyseTypeApp expr = do + let (lhs, args) = unAppAny expr + ty <- case lhs of + IVar _ lhsName => do let Nothing = lookupType lhsName -- TODO to support `lhsName` to be a type parameter of type `Type` + | Just found => pure found + -- we didn't found, failing, there are at least two reasons + failAt (getFC lhs) $ if isNamespaced lhsName + then "Data type `\{lhsName}` is unavailable at the site of derivation (forgotten import?)" + else "Usupported applications to a non-concrete type `\{lhsName}`" + IPrimVal _ (PrT t) => pure $ typeInfoForPrimType t + IType _ => pure typeInfoForTypeOfTypes + lhs@(IPi {}) => failAt (getFC lhs) "Fields with function types are not supported in constructors" + lhs => failAt (getFC lhs) "Unsupported type of a constructor field: \{show lhs}" + let Yes lengthCorrect = decEq ty.args.length args.length + | No _ => failAt (getFC lhs) "INTERNAL ERROR: wrong count of unapp when analysing type application" + _ <- ensureTyArgsNamed ty + pure $ MkTypeApp ty $ rewrite lengthCorrect in args.asVect <&> \arg => case getExpr arg of + expr@(IVar _ n) => mirror . maybeToEither expr $ lookup n conArgIdxs + expr => Right expr + + for con.args.asVect $ analyseTypeApp . type + ------------------------------------------------- --- Derivation of a generator for constructor --- ------------------------------------------------- @@ -42,151 +77,127 @@ namespace NonObligatoryExts [LeastEffort] {default False simplificationHack : Bool} -> ConstructorDerivator where consGenExpr sig con givs fuel = do - let niit : NamesInfoInTypes = %search -- I don't why it won't be found without this + -- Prepare local search context + let _ : NamesInfoInTypes = %search -- I don't why it won't be found without this + + -- Log all arguments' position and their names (if they have some) + logPoint {level=15} "least-effort" [sig, con] "- con args: \{List.allFins con.args.length}" ------------------------------------------------------------- -- Prepare intermediate data and functions using this data -- ------------------------------------------------------------- - -- Get file position of the constructor definition (for better error reporting) - let conFC = getFC con.type - -- Build a map from constructor's argument name to its index let conArgIdxs = SortedMap.fromList $ mapI con.args $ \idx, arg => (argName arg, idx) - -- Analyse that we can do subgeneration for each constructor argument - -- Fails using `Elaboration` if the given expression is not an application to a type constructor - let analyseTypeApp : TTImp -> m TypeApp - analyseTypeApp expr = do - let (lhs, args) = unAppAny expr - ty <- case lhs of - IVar _ lhsName => do let e = failAt (getFC lhs) $ "Only applications to non-polymorphic type constructors are supported" - ++ " at the moment, we found `\{lhsName}`" - maybe e pure $ lookupType lhsName -- TODO to support `lhsName` to be a type parameter of type `Type` - IPrimVal _ (PrT t) => pure $ typeInfoForPrimType t - IType _ => pure typeInfoForTypeOfTypes - lhs => failAt (getFC lhs) "Only applications to a name is supported, given \{lhs}" - let Yes lengthCorrect = decEq ty.args.length args.length - | No _ => failAt (getFC lhs) "INTERNAL ERROR: wrong count of unapp when analysing type application" - _ <- ensureTyArgsNamed ty - pure $ MkTypeApp ty $ rewrite lengthCorrect in args.asVect <&> \arg => case getExpr arg of - expr@(IVar _ n) => mirror . maybeToEither expr $ lookup n conArgIdxs - expr => Right expr - -- Compute left-to-right need of generation when there are non-trivial types at the left - argsTypeApps <- for con.args.asVect $ analyseTypeApp . type + argsTypeApps <- getTypeApps con + + -- Get dependencies of constructor's arguments + let rawDeps' = argDeps con.args + let rawDeps : Vect _ $ SortedSet $ Fin con.args.length := downmap (mapIn weakenToSuper) rawDeps' + let dependees = concat rawDeps -- arguments which any other argument depends on -- Decide how constructor arguments would be named during generation - let bindNames : Vect (con.args.length) String - bindNames = flip mapI .| fromList con.args .| \_ => bindNameRenamer . argName + let bindNames = withIndex (fromList con.args) <&> map (bindNameRenamer . argName) + + -- Form the expression of calling the current constructor + let callCons = do + let constructorCall = callCon con $ bindNames <&> \(idx, n) => if contains idx dependees then implicitTrue else varStr n + let wrapImpls : Nat -> TTImp + wrapImpls Z = constructorCall + wrapImpls (S n) = var `{Builtin.DPair.MkDPair} .$ implicitTrue .$ wrapImpls n + let consExpr = wrapImpls $ sig.targetType.args.length `minus` sig.givenParams.size + `(Prelude.pure {f=Test.DepTyCheck.Gen.Gen _} ~consExpr) -- Derive constructor calling expression for given order of generation let genForOrder : List (Fin con.args.length) -> m TTImp - genForOrder order = foldr apply callCons <$> evalStateT givs (for order genForOneArg) where - - -- ... state is the set of arguments that are already present (given or generated) - genForOneArg : forall m. - CanonicGen m => - MonadState (SortedSet $ Fin con.args.length) m => - (gened : Fin con.args.length) -> m $ TTImp -> TTImp - genForOneArg genedArg = do - - -- Get info for the `genedArg` - let MkTypeApp typeOfGened argsOfTypeOfGened = index genedArg $ the (Vect _ TypeApp) argsTypeApps - - -- Acquire the set of arguments that are already present - presentArguments <- get - - -- TODO to put the following check as up as possible as soon as it typecheks O_O - -- Check that those argument that we need to generate is not already present - let False = contains genedArg presentArguments - | True => pure id - - -- Filter arguments classification according to the set of arguments that are left to be generated; - -- Those which are `Right` are given, those which are `Left` are needs to be generated. - let depArgs : Vect typeOfGened.args.length (Either (Fin con.args.length) TTImp) := argsOfTypeOfGened <&> \case - Right expr => Right expr - Left i => if contains i presentArguments then Right $ var $ argName $ index' con.args i else Left i - - -- Determine which arguments will be on the left of dpair in subgen call, in correct order - let subgeneratedArgs = mapMaybe getLeft $ toList depArgs - - -- Make sure generated arguments will not be generated again - modify $ insert genedArg . union (fromList subgeneratedArgs) - - -- Form a task for subgen - let (subgivensLength ** subgivens) = mapMaybe (\(ie, idx) => (idx,) <$> getRight ie) $ depArgs `zip` Fin.range - let subsig : GenSignature := MkGenSignature typeOfGened $ fromList $ fst <$> toList subgivens - let Yes Refl = decEq subsig.givenParams.size subgivensLength - | No _ => fail "INTERNAL ERROR: error in given params set length computation" - - -- Check if called subgenerator can call the current one - let mutRec = hasNameInsideDeep sig.targetType.name $ var subsig.targetType.name - - -- Decide whether to use local (decreasing) or outmost fuel, depending on whether we are in mutual recursion with subgen - let subfuel = if mutRec then fuel else var outmostFuelArg - - -- Form an expression to call the subgen - subgenCall <- callGen subsig subfuel $ snd <$> subgivens - - -- Form an expression of binding the result of subgen - let genedArg:::subgeneratedArgs = genedArg:::subgeneratedArgs <&> bindVar . flip Vect.index bindNames - let bindSubgenResult = foldr (\l, r => var `{Builtin.DPair.MkDPair} .$ l .$ r) genedArg subgeneratedArgs - - -- Form an expression of the RHS of a bind; simplify lambda if subgeneration result type does not require pattern matching - let bindRHS = \cont => case bindSubgenResult of - IBindVar _ n => lam (MkArg MW ExplicitArg (Just $ UN $ Basic n) implicitFalse) cont - _ => `(\ ~bindSubgenResult => ~cont) - - -- Chain the subgen call with a given continuation - pure $ \cont => `(~subgenCall >>= ~(bindRHS cont)) - - callCons : TTImp - callCons = do - let constructorCall = callCon con $ bindNames <&> varStr - let wrapImpls : Nat -> TTImp - wrapImpls Z = constructorCall - wrapImpls (S n) = var `{Builtin.DPair.MkDPair} .$ implicitTrue .$ wrapImpls n - let consExpr = wrapImpls $ sig.targetType.args.length `minus` sig.givenParams.size - `(Prelude.pure {f=Test.DepTyCheck.Gen.Gen _} ~consExpr) + -- ... state is the set of arguments that are already present (given or generated) + genForOrder order = map (foldr apply callCons) $ evalStateT givs $ for order $ \genedArg => do - -- Get dependencies of constructor's arguments - rawDeps <- argDeps con.args - let deps = downmap ((`difference` givs) . mapIn weakenToSuper) rawDeps + -- Get info for the `genedArg` + let MkTypeApp typeOfGened argsOfTypeOfGened = index genedArg $ the (Vect _ $ TypeApp con) argsTypeApps + + -- Acquire the set of arguments that are already present + presentArguments <- get + + -- TODO to put the following check as up as possible as soon as it typecheks O_O + -- Check that those argument that we need to generate is not already present + let False = contains genedArg presentArguments + | True => pure id + + -- Filter arguments classification according to the set of arguments that are left to be generated; + -- Those which are `Right` are given, those which are `Left` are needs to be generated. + let depArgs : Vect typeOfGened.args.length (Either (Fin con.args.length) TTImp) := argsOfTypeOfGened <&> \case + Right expr => Right expr + Left i => if contains i presentArguments then Right $ var $ argName $ index' con.args i else Left i + + -- Determine which arguments will be on the left of dpair in subgen call, in correct order + let subgeneratedArgs = mapMaybe getLeft $ toList depArgs + + -- Make sure generated arguments will not be generated again + modify $ insert genedArg . union (fromList subgeneratedArgs) + + -- Form a task for subgen + let (subgivensLength ** subgivens) = mapMaybe (\(ie, idx) => (idx,) <$> getRight ie) $ depArgs `zip` Fin.range + let subsig : GenSignature := MkGenSignature typeOfGened $ fromList $ fst <$> toList subgivens + let Yes Refl = decEq subsig.givenParams.size subgivensLength + | No _ => fail "INTERNAL ERROR: error in given params set length computation" + + -- Check if called subgenerator can call the current one + let mutRec = hasNameInsideDeep sig.targetType.name $ var subsig.targetType.name + + -- Decide whether to use local (decreasing) or outmost fuel, depending on whether we are in mutual recursion with subgen + let subfuel = if mutRec then fuel else var outmostFuelArg + + -- Form an expression to call the subgen + subgenCall <- callGen subsig subfuel $ snd <$> subgivens + + -- Form an expression of binding the result of subgen + let genedArg:::subgeneratedArgs = genedArg:::subgeneratedArgs <&> bindVar . snd . flip Vect.index bindNames + let bindSubgenResult = foldr (\l, r => var `{Builtin.DPair.MkDPair} .$ l .$ r) genedArg subgeneratedArgs + + -- Form an expression of the RHS of a bind; simplify lambda if subgeneration result type does not require pattern matching + let bindRHS = \cont => case bindSubgenResult of + IBindVar _ n => lam (MkArg MW ExplicitArg (Just $ UN $ Basic n) implicitFalse) cont + _ => `(\ ~bindSubgenResult => ~cont) + + -- Chain the subgen call with a given continuation + pure $ \cont => `(~subgenCall >>= ~(bindRHS cont)) ------------------------------------------------- -- Left-to-right generation phase (2nd phase) --- ------------------------------------------------- -- Determine which arguments need to be generated in a left-to-right manner - let (leftToRightArgsTypeApp, leftToRightArgs) = unzip $ filter (\((MkTypeApp _ as), _) => any isRight as) $ toListI argsTypeApps + let (leftToRightArgsTypeApp, leftToRightArgs) = unzip $ filter (\(ta, _) => any isRight ta.argApps) $ toListI argsTypeApps -------------------------------------------------------------------------------- -- Preparation of input for the left-to-right phase (1st right-to-left phase) -- -------------------------------------------------------------------------------- -- Acquire those variables that appear in non-trivial type expressions, i.e. those which needs to be generated before the left-to-right phase - let preLTR = leftToRightArgsTypeApp >>= \(MkTypeApp _ as) => rights (toList as) >>= allVarNames + let preLTR = leftToRightArgsTypeApp >>= \ta => rights (toList ta.argApps) >>= allVarNames let preLTR = SortedSet.fromList $ mapMaybe (lookup' conArgIdxs) preLTR -- Find rightmost arguments among `preLTR` let depsLTR = SortedSet.fromList $ mapMaybe (\(ds, idx) => whenT .| contains idx preLTR && null ds .| idx) $ - toListI $ deps <&> intersection preLTR + toListI $ rawDeps <&> intersection preLTR . (`difference` givs) --------------------------------------------------------------------------------- -- Main right-to-left generation phase (3rd phase aka 2nd right-to-left phase) -- --------------------------------------------------------------------------------- -- Arguments that no other argument depends on - let rightmostArgs = fromFoldable {f=Vect _} range `difference` (givs `union` concat deps) + let rightmostArgs = fromFoldable {f=Vect _} range `difference` (givs `union` dependees) --------------------------------------------------------------- -- Manage different possible variants of generation ordering -- --------------------------------------------------------------- -- Prepare info about which arguments are independent and thus can be ordered arbitrarily - let disjDeps = disjointDepSets rawDeps givs + let disjDeps = disjointDepSets rawDeps' givs -- Acquire order(s) in what we will generate arguments let allOrders = do @@ -195,6 +206,10 @@ namespace NonObligatoryExts pure $ leftmost ++ leftToRightArgs ++ rightmost let allOrders = if simplificationHack then take 1 allOrders else allOrders + let allOrders = List.nub $ nub <$> allOrders + + for_ allOrders $ \order => + logPoint {level=10} "least-effort" [sig, con] "- used final order: \{order}" -------------------------- -- Producing the result -- @@ -204,13 +219,13 @@ namespace NonObligatoryExts where - -- TODO make this to be a `record` as soon as #2177 is fixed - data TypeApp : Type where - MkTypeApp : - (type : TypeInfo) -> - (0 _ : AllTyArgsNamed type) => - (argTypes : Vect type.args.length .| Either (Fin con.args.length) TTImp) -> - TypeApp + Interpolation (Fin con.args.length) where + interpolate i = case name $ index' con.args i of + Just (UN n) => "#\{show i} (\{show n})" + _ => "#\{show i}" + + Foldable f => Interpolation (f $ Fin con.args.length) where + interpolate = ("[" ++) . (++ "]") . joinBy ", " . map interpolate . toList ||| Best effort non-obligatory tactic tries to use as much external generators as possible ||| but discards some there is a conflict between them. diff --git a/src/Deriving/DepTyCheck/Gen/Core/ConsEntry.idr b/src/Deriving/DepTyCheck/Gen/Core/ConsEntry.idr index 9ab498563..1124ccdc4 100644 --- a/src/Deriving/DepTyCheck/Gen/Core/ConsEntry.idr +++ b/src/Deriving/DepTyCheck/Gen/Core/ConsEntry.idr @@ -28,11 +28,7 @@ canonicConsBody sig name con = do -- Acquire constructor's return type arguments let (conRetTy, conRetTypeArgs) = unAppAny con.type - conRetTypeArgs <- for conRetTypeArgs $ \case -- resembles similar management from `Entry` module; they must be consistent - PosApp e => pure e - NamedApp _ _ => failAt conFC "Named implicit applications (like to `\{show conRetTy}`) are not supported yet" - AutoApp _ => failAt conFC "Auto-implicit applications (like to `\{show conRetTy}`) are not supported yet" - WithApp _ => failAt conFC "Unexpected `with` application to `\{show conRetTy}` in a constructor's argument" + let conRetTypeArgs = conRetTypeArgs <&> getExpr -- Match lengths of `conRetTypeArgs` and `sig.targetType.args` let Yes conRetTypeArgsLengthCorrect = conRetTypeArgs.length `decEq` sig.targetType.args.length @@ -66,7 +62,7 @@ canonicConsBody sig name con = do renamedAppliedNames <- for appliedNames.asVect $ \(name, typeDetermined) => do let bindName = bindNameRenamer name if cast typeDetermined - then pure $ const `(_) -- no need to match type-determined parameter by hand + then pure $ const implicitTrue -- no need to match type-determined parameter by hand else if contains name !get then do -- I'm using a name containing chars that cannot be present in the code parsed from the Idris frontend diff --git a/src/Deriving/DepTyCheck/Gen/Core/Util.idr b/src/Deriving/DepTyCheck/Gen/Core/Util.idr index b4272db97..58118ee7a 100644 --- a/src/Deriving/DepTyCheck/Gen/Core/Util.idr +++ b/src/Deriving/DepTyCheck/Gen/Core/Util.idr @@ -85,7 +85,7 @@ analyseDeepConsApp ccdi freeNames = isD where let Just con = lookupCon lhsName | Nothing => Left "name `\{lhsName}` is not a constructor" - -- Aquire type-determination info, if needed + -- Acquire type-determination info, if needed typeDetermInfo <- if ccdi then assert_total {- `ccdi` is `True` here when `False` inside -} $ typeDeterminedArgs con else pure neutral let _ : Vect con.args.length (MaybeConsDetermInfo ccdi) := typeDetermInfo diff --git a/src/Deriving/DepTyCheck/Gen/Entry.idr b/src/Deriving/DepTyCheck/Gen/Entry.idr index a593f75fb..fb33996b0 100644 --- a/src/Deriving/DepTyCheck/Gen/Entry.idr +++ b/src/Deriving/DepTyCheck/Gen/Entry.idr @@ -108,11 +108,7 @@ checkTypeIsGen checkSide sig = do let (targetType, targetTypeArgs) = unAppAny targetType -- check out applications types - targetTypeArgs <- for targetTypeArgs $ \case - PosApp arg => pure arg - NamedApp n arg => failAt targetTypeFC "Target types with implicit type parameters are not supported yet" - AutoApp arg => failAt targetTypeFC "Target types with `auto` implicit type parameters are not supported yet" - WithApp arg => failAt targetTypeFC "Unexpected `with`-application in the target type" + let targetTypeArgs = targetTypeArgs <&> getExpr ------------------------------------------ -- Working with the target type familly -- @@ -371,3 +367,19 @@ deriveGenFor a = do sig <- quote a tt <- deriveGenExpr sig check tt + +||| Declares `main : IO Unit` function that prints derived generator for the given generator's signature +export +deriveGenPrinter : {default True printTTImp : Bool} -> DerivatorCore => Type -> Elab Unit +deriveGenPrinter ty = do + ty <- quote ty + logSugaredTerm "deptycheck.derive.print" DefaultLogLevel "type" ty + expr <- deriveGenExpr ty + expr <- quote expr + printTTImp <- quote printTTImp + declare `[ + main : IO Unit + main = do + putStr $ if ~printTTImp then interpolate ~expr else show ~expr + putStrLn "" + ] diff --git a/src/Deriving/DepTyCheck/Util/Fusion.idr b/src/Deriving/DepTyCheck/Util/Fusion.idr new file mode 100644 index 000000000..d92cdf80c --- /dev/null +++ b/src/Deriving/DepTyCheck/Util/Fusion.idr @@ -0,0 +1,342 @@ +module Deriving.DepTyCheck.Util.Fusion + +import Language.Reflection +import Language.Reflection.TTImp +import Language.Reflection.Derive +import Language.Reflection.Pretty +import Language.Reflection.Compat +import public Deriving.DepTyCheck.Gen +import Deriving.DepTyCheck.Util.Reflection +import Data.Nat + +%default total + +matchArgs : List Arg -> List Name -> Maybe (List (Name, TTImp)) +matchArgs na la = if length na == length la + then Just (zip la (map (.type) na)) + else Nothing + + +buildIPi : List (Name, TTImp) -> TTImp +buildIPi l = piAll type (map (\(n, tti) => MkArg MW ExplicitArg (Just n) tti) l) + + +unifyArgs : TTImp -> TTImp -> Name -> TTImp +unifyArgs (IVar _ _) (IVar _ _) n = var n -- unifyArgs (IVar n) (IVar Prelude.Types.Z) should be Z +unifyArgs l@(IApp _ _ _) (IVar _ _) _ = l +unifyArgs (IVar _ _) r@(IApp _ _ _) _ = r +unifyArgs l@(IApp _ _ _) r@(IApp _ _ _) _ = if l == r then l else type +unifyArgs l@(IPrimVal _ _) (IVar _ _) _ = l +unifyArgs (IVar _ _) r@(IPrimVal _ _) _ = r +unifyArgs l@(IPrimVal _ _) r@(IPrimVal _ _) _ = if l == r then l else type +unifyArgs _ _ _ = type -- others TTImp to add? + + +processArg : TTImp -> Name -> TTImp +processArg (IVar _ (UN (Basic _))) n = var n +processArg smth _ = smth + + +bindArgs : TTImp -> TTImp +bindArgs (IVar _ (UN (Basic n))) = bindVar n +bindArgs smth = smth + + +alignArgs : List Name -> List (Name, TTImp) -> List (Name, TTImp) -> List (Name, TTImp) +alignArgs zs xs ys = go zs xs ys where + go : List Name -> List (Name, TTImp) -> List (Name, TTImp) -> List (Name, TTImp) + go [] _ _ = [] + go (zn::zs) [] [] = [] + go (zn::zs) ((xn, xt)::xs) ((yn, yt)::ys) = case (xn == zn, yn == zn) of + (True , True ) => (zn, unifyArgs xt yt zn)::(go zs xs ys) + (True , False) => (zn, processArg xt zn) ::(go zs xs ((yn, yt)::ys)) + (False, True ) => (zn, processArg yt zn) ::(go zs ((xn, xt)::xs) ys) + (False, False) => (go zs ((xn, xt)::xs) ((yn, yt)::ys)) + go (zn::zs) ((xn, xt)::xs) [] = case (xn == zn) of + True => (zn, processArg xt zn)::(go zs xs []) + False => (go zs xs []) + go (zn::zs) [] ((yn, yt)::ys) = case (yn == zn) of + True => (zn, processArg yt zn)::(go zs [] ys) + False => (go zs [] ys) + + +fuseConstrucror : List Name -> (Name, List TTImp, List Name) -> (Name, List TTImp, List Name) -> (Name, List TTImp, List Name) +fuseConstrucror zl (xName, xArgs, xArgNames) (yName, yArgs, yArgNames) = do + let xyName = joinBy "_" [nameStr xName, nameStr yName] + + let xArgsZipped = sortBy (comparing fst) $ zip xArgNames xArgs + let yArgsZipped = sortBy (comparing fst) $ zip yArgNames yArgs + + let xyAligned = alignArgs zl xArgsZipped yArgsZipped + let xyArgNames = map fst xyAligned + let xyArgs = map snd xyAligned + + let Nothing = find ((==) type) xyArgs + | Just _ => (UN (Basic "fail"), [], []) + + (UN (Basic xyName), xyArgs, xyArgNames) + + +foldConstructor : TTImp -> List TTImp -> TTImp +foldConstructor = foldl app + + +splitRhsDef : List TTImp -> TTImp +splitRhsDef [] = type +splitRhsDef (t::[]) = t +splitRhsDef (t::ts) = app (var `{Builtin.MkPair} .$ t) (splitRhsDef ts) + + +splitRhsClaim : List TTImp -> TTImp +splitRhsClaim [] = type +splitRhsClaim (t::[]) = t +splitRhsClaim (t::ts) = app (var `{Builtin.Pair} .$ t) (splitRhsClaim ts) + + +splitClauses : TTImp -> List (List String) -> List Clause +splitClauses sc = map + (\cs => + patClause + (app sc $ var $ UN $ Basic (joinBy "_" cs)) + (splitRhsDef (map (\c => var (UN $ Basic c)) cs))) + + +splitReturnType : List Name -> List (List Name) -> List TTImp +splitReturnType tnl anll = map + (\(t, al) => foldConstructor t al) $ + zip + (map (var . UN . Basic . nameStr) tnl) + (map (map (.bindVar)) anll) + + +public export +record FusionDecl where + constructor MkFusionDecl + dataType : Decl + splitClaim : Decl + splitDef : Decl + genFClaim : Decl + genRClaim : Decl + genRDef : Name -> Name -> Name -> Decl + + +prepareConArgs : TTImp -> List TTImp +prepareConArgs t = do + let (_, tApps) = Reflection.unAppAny t + map getExpr tApps + + +joinNames : List Name -> Name +joinNames = UN . Basic . (joinBy "") . (map nameStr) + + +genRMkDPair : TTImp -> List Name -> TTImp +genRMkDPair = foldr (\n, acc => var `{MkDPair} .$ n.bindVar .$ acc) + + +genFDPair : Name -> List (Name, TTImp) -> TTImp +genFDPair n l = foldr + (\(n, tt), acc => var `{DPair} .$ tt .$ (MkArg MW ExplicitArg (Just n) tt `lam` acc)) + (foldConstructor (var n) (map (var . fst) l)) + l + + +genFRhsClaim : Name -> List (Name, TTImp) -> TTImp +genFRhsClaim n l = var `{Gen} .$ var `{MaybeEmpty} .$ genFDPair n l + + +public export +buildOrdering : Eq a => List (List a) -> List a +buildOrdering l = go l [] where + go : List (List a) -> List a -> List a + go [] res = reverse res + go (h::t) res = go t (merge h res) where + merge : List a -> List a -> List a + merge [] res = res + merge (h::t) res = if (elem h res) then merge t res else merge t (h::res) + + +deriveFusion : Vect (2 + n) (TypeInfo, List Name) -> Maybe FusionDecl +deriveFusion l = do + let typeNames = toList $ map ((.name) . fst) l + let fusionTypeName = joinNames $ typeNames + + let typeArgs = map (\(ti, la) => matchArgs ti.args la) l + let False = any isNothing typeArgs + | True => Nothing + + let uniqueNames = buildOrdering $ toList $ map snd l -- names from target type constructor and arg types from type signature + let uniqueArgs = nub $ (sortBy (comparing (\x => findIndex ((==) $ fst x) uniqueNames))) $ join $ catMaybes $ toList typeArgs + + let True = length uniqueArgs == length uniqueNames -- same parameter name could not be associated with different types + | False => Nothing + let typeSignature = buildIPi uniqueArgs + + let consPre = map (\(t, args) => (t.cons, args)) l + let True = all (not . Prelude.null . fst) consPre + | False => Nothing + let consML1 = map (\(cons, args) => (toList1' cons, args)) consPre -- how to prove and use toList? + let consL1 = map (\(cons, args) => case cons of + Just x => (x, args) + Nothing => ((MkCon (UN (Basic "")) [] type):::[], args) + ) consML1 + let consAll = map (\(cons, args) => map (\c => (c, args)) cons) consL1 + let consComb = combinations consAll + let consCombPrepared = map (map (\(con, args) => (con.name, prepareConArgs con.type, args))) consComb + let preFusedCons = consCombPrepared <&> \x => foldl (fuseConstrucror uniqueNames) (head x) (tail x) + let filteredFusedCons = filter (((/=) $ UN (Basic "fail")) . fst) $ toList preFusedCons + let fusedCons = map + (\(cn, lt, _) => mkTy cn (foldConstructor (var fusionTypeName) (map bindArgs lt))) + filteredFusedCons + + let splitName = UN $ Basic ("split" ++ (nameStr fusionTypeName)) + let argNamesList = toList $ map snd l + + let dataDecl = iData Export fusionTypeName typeSignature [] fusedCons + let claimDecl = export' splitName $ + (arg $ foldConstructor (var fusionTypeName) (map (.bindVar) uniqueNames)) .-> + splitRhsClaim (splitReturnType typeNames argNamesList) + + let defDecl = if (not $ null fusedCons) + then def splitName $ splitClauses (var splitName) $ + toList (map (toList . (map (nameStr . (.name) . fst))) consComb) + else def splitName [impossibleClause (var splitName .$ implicitTrue)] + + -- let stub = ILog Nothing + let genFName = UN $ Basic ("gen" ++ (nameStr fusionTypeName)) + let genFClaim = export' genFName $ + (MkArg MW ExplicitArg Nothing (var `{Fuel})) .-> + (genFRhsClaim fusionTypeName uniqueArgs) + + let genRClaim = export' (`{genZ_ultimate}) $ + (MkArg MW ExplicitArg Nothing (var `{Fuel})) .-> + (var `{Gen} .$ var `{MaybeEmpty} .$ var `{Z}) + + let lambdaHelpName = "{lamc:0}" + let fuelHelpName = "fl" + + let fusedVarName = toLower $ nameStr fusionTypeName + let typeVarNames = map (toLower . nameStr) typeNames + let genRDef = \ultimateGenName, fusedGenName, originalConsName => def + ultimateGenName + [ var ultimateGenName + .$ bindVar fuelHelpName + .= var `{(>>=)} + .$ (var fusedGenName .$ (var $ UN $ Basic fuelHelpName)) + .$ ( + MkArg MW ExplicitArg (Just lambdaHelpName) implicitFalse + `lam` iCase { + sc = var lambdaHelpName, + ty = implicitFalse, + clauses = + [ genRMkDPair (bindVar fusedVarName) uniqueNames + .= iCase { + sc = var splitName .$ (var $ UN $ Basic fusedVarName), + ty = implicitTrue, + clauses = [ + (splitRhsDef (map bindVar typeVarNames)) + .= var `{pure} + .$ foldConstructor + (var originalConsName) + (map var uniqueNames ++ map (var . UN . Basic) typeVarNames) + ] + } + ] + } + ) + ] + + Just (MkFusionDecl dataDecl claimDecl defDecl genFClaim genRClaim genRDef) + + +-- checkDeclared : Elaboration m => List Decl -> m (List Decl) +-- checkDeclared [] = pure [] +-- checkDeclared (x::xs) = do +-- tail <- checkDeclared xs +-- head <- case x of +-- IClaim _ _ _ _ (MkTy _ _ n _) => getInfo' n +-- IData _ _ _ (MkData _ n _ _ _) => getInfo' n +-- IDef _ n _ => getInfo' n +-- -- _ => pure [] +-- if null head then pure (x::tail) else pure tail + + +-- declareFusion : Elaboration m => List Decl -> m () +-- declareFusion l = do +-- notDeclaredYet <- checkDeclared l +-- declare notDeclaredYet + + +prepareArgsSolve : Arg -> (Name, List String) +prepareArgsSolve a = do + let (xt, as) = Reflection.unAppAny a.type + let xn = case xt of {IVar _ n => n; _ => UN $ Basic "fail"} + let ts = map getExpr as + let ns = map (\t => case t of {IBindVar _ n => n; _ => "fail"}) ts + (xn, ns) + + +public export +solveDependencies : List Arg -> List (List (Name, List String)) +solveDependencies l = go l [] where + go : List Arg -> List (List (Name, List String)) -> List (List (Name, List String)) + go [] acc = map reverse acc -- SnocList + go (a::as) acc = go as (merge (prepareArgsSolve a) acc) where + merge : (Name, List String) -> List (List (Name, List String)) -> List (List (Name, List String)) + merge a [] = [[a]] + merge (m, as) (rs::rss) = if (any (not . Prelude.null . (intersect as) . snd) rs) + then ((m, as)::rs)::rss + else rs::(merge (m, as) rss) + + +public export +runFusion : Name -> List Name -> Name -> List Name -> Elab (Maybe FusionDecl) +runFusion x xArgs y yArgs = do + xTI <- getInfo' x + yTI <- getInfo' y + let zipped = (xTI, xArgs) :: (yTI, yArgs) :: Nil + pure $ deriveFusion zipped + + +public export +runFusionList : Vect (2 + n) (Name, List Name) -> Elab (Maybe FusionDecl) +runFusionList l = do + l' <- for l $ \(n, args) => (, args) <$> getInfo' n + pure $ deriveFusion l' + + +public export +createGenSignature : Name -> Elab (Maybe GenSignature) +createGenSignature fusionName = do + ti <- getInfo' fusionName + let args = allFins ti.args.length + let Yes _ = areAllTyArgsNamed ti + | No _ => pure Nothing + let signature = MkGenSignature ti $ fromList args + pure $ Just signature + + +public export +getFusion : Maybe FusionDecl -> List Decl +getFusion Nothing = [] +getFusion (Just fd) = [(fd.dataType)] + + +public export +getSplit : Maybe FusionDecl -> List Decl +getSplit Nothing = [] +getSplit (Just fd) = [fd.splitClaim, fd.splitDef] + + +public export +getGen : Maybe FusionDecl -> Name -> Name -> Name -> List Decl +getGen Nothing _ _ _ = [] +getGen (Just fd) n1 n2 n3 = [fd.genFClaim, fd.genRClaim, fd.genRDef n1 n2 n3] + + +-- TODO: what happens with :doc +-- solveDeps should be compatible with fuse (not to group what couldn't be fused) +-- TODO: declare fused type iff it does not exist (otherwise reuse) +-- TODO: highlevel name conventions resolving (pure) +-- TODO: remove declare stage from print tests (declare should be highlevel) +-- TODO: GenSignature -> Con -> genZ_ultimate(?) diff --git a/src/Deriving/DepTyCheck/Util/Reflection.idr b/src/Deriving/DepTyCheck/Util/Reflection.idr index f2329f4a1..b9619c1db 100644 --- a/src/Deriving/DepTyCheck/Util/Reflection.idr +++ b/src/Deriving/DepTyCheck/Util/Reflection.idr @@ -261,6 +261,10 @@ allNameSuffixes nm = do [] => n ns => NS (MkNS $ reverse ns) n +export +isNamespaced : Name -> Bool +isNamespaced = not . null . fst . unNS + --------------------------------------------------- --- Working around primitive and special values --- --------------------------------------------------- @@ -312,105 +316,6 @@ extractTargetTyExpr ti = var ti.name typeCon : TypeInfo -> Con typeCon ti = MkCon ti.name ti.args type ----------------------------------------------- ---- Analyzing dependently typed signatures --- ----------------------------------------------- - -export -doesTypecheckAs : Elaboration m => (0 expected : Type) -> TTImp -> m Bool -doesTypecheckAs expected expr = try .| check {expected} expr $> True .| pure False - -export -argDeps : Elaboration m => (args : List Arg) -> m $ DVect args.length $ SortedSet . Fin . Fin.finToNat -argDeps args = do - ignore $ check {expected=Type} $ fullSig defaultRet -- we can't return trustful result if given arguments do not form a nice Pi type - concatMap depsOfOne range - - where - - %unbound_implicits off -- this is a workaround of https://github.com/idris-lang/Idris2/issues/2040 - - filteredArgs : (excluded : SortedSet $ Fin args.length) -> List Arg - filteredArgs excluded = filterI args $ \idx, _ => not $ contains idx excluded - - partialSig : (retTy : TTImp) -> (excluded : SortedSet $ Fin args.length) -> TTImp - partialSig retTy = piAll retTy . map {piInfo := ExplicitArg} . filteredArgs - - partialApp : (appliee : Name) -> (excluded : SortedSet $ Fin args.length) -> TTImp - partialApp n = appNames n . map argName . filteredArgs - - fullSig : (retTy : TTImp) -> TTImp - fullSig t = partialSig t empty - - fullApp : (appliee : Name) -> TTImp - fullApp n = partialApp n empty - - defaultRet : TTImp - defaultRet = `(Builtin.Unit) - - -- This is for check that *meaning* of types are preversed after excluding some of arguments - -- - -- Example: - -- Consider that `args` form the following: `(n : Nat) -> (a : Type) -> (v : Vect n a) -> (x : Nat) -> ...` - -- Consider we have `excluded` set containing only index 3 (the `x : Nat` argument). - -- For this case this function would return the following type: - -- ``` - -- (full : (n : Nat) -> (a : Type) -> (v : Vect n a) -> (x : Nat) -> Unit) -> - -- (part : (n : Nat) -> (a : Type) -> (v : Vect n a) -> Unit) -> - -- (n : Nat) -> (a : Type) -> (v : Vect n a) -> (x : Nat) -> - -- full n a v x = part n a v - -- ``` - -- As soon as this expression typechecks as `Type`, we are confident that - -- corresponding parameters of the full and the partial signatures are compatible, i.e. - -- removing of the parameters from `excluded` set does not change left types too much. - preservationCheckSig : (excluded : SortedSet $ Fin args.length) -> TTImp - preservationCheckSig excluded = - pi (MkArg MW ExplicitArg .| Just full .| fullSig defaultRet) $ - pi (MkArg MW ExplicitArg .| Just part .| partialSig defaultRet excluded) $ - fullSig $ - `(Builtin.Equal) .$ fullApp full .$ partialApp part excluded - where - full, part : Name - full = MN "full" 1 - part = MN "part" 1 - - checkExcluded : (excluded : SortedSet $ Fin args.length) -> m Bool - checkExcluded excluded = doesTypecheckAs Type (partialSig defaultRet excluded) - && doesTypecheckAs Type (preservationCheckSig excluded) - - -- Returns a set of indices of all arguments that do depend on the given - depsOfOne' : (idx : Fin args.length) -> m $ SortedSet $ Fin args.length - depsOfOne' idx = do - let cands = allGreaterThan idx - findMinExclude cands $ fromList cands - - where - -- tries to add candidates one by one, and leave them if typechecks without the current `idx` - findMinExclude : (left : List $ Fin args.length) -> (currExcl : SortedSet $ Fin args.length) -> m $ SortedSet $ Fin args.length - findMinExclude [] excl = pure excl - findMinExclude (x::xs) prevExcl = do - let currExcl = delete x prevExcl - findMinExclude xs $ if !(checkExcluded $ insert idx currExcl) then currExcl else prevExcl - - depsOfOne : Fin args.length -> m $ DVect args.length $ SortedSet . Fin . Fin.finToNat - depsOfOne idx = do - whoDependsOnIdx <- depsOfOne' idx - sequence $ tabulateI $ \i => - if contains i whoDependsOnIdx - then do - let Just dep = tryToFit idx - | Nothing => fail "INTERNAL ERROR: unable to fit fins during dependency calculation" - pure $ singleton dep - else pure empty - - %unbound_implicits on -- this is a workaround of https://github.com/idris-lang/Idris2/issues/2039 - - Semigroup a => Applicative f => Semigroup (f a) where - a <+> b = [| a <+> b |] - - Monoid a => Applicative f => Monoid (f a) where - neutral = pure neutral - ------------------------------------ --- Analysis of type definitions --- ------------------------------------ @@ -484,110 +389,17 @@ export allVarNames : TTImp -> List Name allVarNames = SortedSet.toList . allVarNames' -export -record NamesInfoInTypes where - constructor Names - types : SortedMap Name TypeInfo - cons : SortedMap Name (TypeInfo, Con) - namesInTypes : SortedMap TypeInfo $ SortedSet Name - -lookupByType : NamesInfoInTypes => Name -> Maybe $ SortedSet Name -lookupByType @{tyi} = lookup' tyi.types >=> lookup' tyi.namesInTypes - -lookupByCon : NamesInfoInTypes => Name -> Maybe $ SortedSet Name -lookupByCon @{tyi} = concatMap @{Deep} lookupByType . SortedSet.toList . concatMap allVarNames' . conSubexprs . snd <=< lookup' tyi.cons - -typeByCon : NamesInfoInTypes => Con -> Maybe TypeInfo -typeByCon @{tyi} = map fst . lookup' tyi.cons . name - -export -lookupType : NamesInfoInTypes => Name -> Maybe TypeInfo -lookupType @{tyi} = lookup' tyi.types - -export -lookupCon : NamesInfoInTypes => Name -> Maybe Con -lookupCon @{tyi} n = snd <$> lookup n tyi.cons - <|> typeCon <$> lookup n tyi.types - -||| Returns either resolved expression, or a non-unique name and the set of alternatives. --- We could use `Validated (SortedMap Name $ SortedSet Name) TTImp` as the result, if we depended on `contrib`. --- NOTICE: this function does not resolve re-export aliases, say, it does not resolve `Prelude.Nil` to `Prelude.Basics.Nil`. -export -resolveNamesUniquely : NamesInfoInTypes => (freeNames : SortedSet Name) -> TTImp -> Either (Name, SortedSet Name) TTImp -resolveNamesUniquely @{tyi} freeNames = do - let allConsideredNames = keySet tyi.types `union` keySet tyi.cons - let reverseNamesMap = concatMap (uncurry SortedMap.singleton) $ allConsideredNames.asList >>= \n => allNameSuffixes n <&> (, SortedSet.singleton n) - mapATTImp' $ \case - v@(IVar fc n) => if contains n freeNames then id else do - let Just resolvedAlts = lookup n reverseNamesMap | Nothing => id - let [resolved] = SortedSet.toList resolvedAlts - | _ => const $ Left (n, resolvedAlts) - const $ pure $ IVar fc resolved - _ => id - -Semigroup NamesInfoInTypes where - Names ts cs nit <+> Names ts' cs' nit' = Names (ts `mergeLeft` ts') (cs `mergeLeft` cs') (nit <+> nit') - -Eq TypeInfo where (==) = (==) `on` name -Ord TypeInfo where compare = comparing name - -Monoid NamesInfoInTypes where - neutral = Names empty empty empty - -export -hasNameInsideDeep : NamesInfoInTypes => Name -> TTImp -> Bool -hasNameInsideDeep @{tyi} nm = hasInside empty . allVarNames where - - hasInside : (visited : SortedSet Name) -> (toLook : List Name) -> Bool - hasInside visited [] = False - hasInside visited (curr::rest) = if curr == nm then True else do - let new = if contains curr visited then [] else maybe [] SortedSet.toList $ lookupByType curr - -- visited is limited and either growing or `new` is empty, thus `toLook` is strictly less - assert_total $ hasInside (insert curr visited) (new ++ rest) - -export -isRecursive : NamesInfoInTypes => (con : Con) -> {default Nothing containingType : Maybe TypeInfo} -> Bool -isRecursive con = case the (Maybe TypeInfo) $ containingType <|> typeByCon con of - Just containingType => any (hasNameInsideDeep containingType.name) $ conSubexprs con - Nothing => False - --- returns `Nothing` if given name is not a constructor -export -isRecursiveConstructor : NamesInfoInTypes => Name -> Maybe Bool -isRecursiveConstructor @{tyi} n = lookup' tyi.cons n <&> \(ty, con) => isRecursive {containingType=Just ty} con - -export -getNamesInfoInTypes : Elaboration m => TypeInfo -> m NamesInfoInTypes -getNamesInfoInTypes ty = go neutral [ty] - where - - subexprs : TypeInfo -> List TTImp - subexprs ty = map type ty.args ++ (ty.cons >>= conSubexprs) - - go : NamesInfoInTypes -> List TypeInfo -> m NamesInfoInTypes - go tyi [] = pure tyi - go tyi (ti::rest) = do - ti <- normaliseCons ti - let subes = concatMap allVarNames' $ subexprs ti - new <- map join $ for (SortedSet.toList subes) $ \n => - if isNothing $ lookupByType n - then map toList $ catch $ getInfo' n - else pure [] - let next = { types $= insert ti.name ti - , namesInTypes $= insert ti subes - , cons $= mergeLeft $ fromList $ ti.cons <&> \con => (con.name, ti, con) - } tyi - assert_total $ go next (new ++ rest) +public export +0 ArgDeps : Nat -> Type +ArgDeps n = DVect n $ SortedSet . Fin . Fin.finToNat export -getNamesInfoInTypes' : Elaboration m => TTImp -> m NamesInfoInTypes -getNamesInfoInTypes' expr = do - let varsFirstOrder = allVarNames expr - varsSecondOrder <- map concat $ Prelude.for varsFirstOrder $ \n => do - ns <- getType n - pure $ SortedSet.insert n $ flip concatMap ns $ \(n', ty) => insert n' $ allVarNames' ty - tys <- map (mapMaybe id) $ for (SortedSet.toList varsSecondOrder) $ catch . getInfo' - concat <$> Prelude.for tys getNamesInfoInTypes +argDeps : (args : List Arg) -> ArgDeps args.length +argDeps args = do + let nameToIndices = SortedMap.fromList $ mapI args $ \i, arg => (argName arg, SortedSet.singleton i) + let args = Vect.fromList args <&> \arg => allVarNames arg.type |> map (fromMaybe empty . lookup' nameToIndices) + flip upmapI args $ \i, deps => flip concatMap deps $ \candidates => + maybe empty singleton $ last' $ mapMaybe tryToFit $ SortedSet.toList candidates public export isVar : TTImp -> Bool @@ -707,3 +519,111 @@ genTypeName g = do let (IVar _ genTy, _) = unApp genTy | (genTy, _) => failAt (getFC genTy) "Expected a type name" pure genTy + +--------------------------- +--- Names info in types --- +--------------------------- + +export +record NamesInfoInTypes where + constructor Names + types : SortedMap Name TypeInfo + cons : SortedMap Name (TypeInfo, Con) + namesInTypes : SortedMap TypeInfo $ SortedSet Name + +lookupByType : NamesInfoInTypes => Name -> Maybe $ SortedSet Name +lookupByType @{tyi} = lookup' tyi.types >=> lookup' tyi.namesInTypes + +lookupByCon : NamesInfoInTypes => Name -> Maybe $ SortedSet Name +lookupByCon @{tyi} = concatMap @{Deep} lookupByType . SortedSet.toList . concatMap allVarNames' . conSubexprs . snd <=< lookup' tyi.cons + +typeByCon : NamesInfoInTypes => Con -> Maybe TypeInfo +typeByCon @{tyi} = map fst . lookup' tyi.cons . name + +export +lookupType : NamesInfoInTypes => Name -> Maybe TypeInfo +lookupType @{tyi} = lookup' tyi.types + +export +lookupCon : NamesInfoInTypes => Name -> Maybe Con +lookupCon @{tyi} n = snd <$> lookup n tyi.cons + <|> typeCon <$> lookup n tyi.types + +||| Returns either resolved expression, or a non-unique name and the set of alternatives. +-- We could use `Validated (SortedMap Name $ SortedSet Name) TTImp` as the result, if we depended on `contrib`. +-- NOTICE: this function does not resolve re-export aliases, say, it does not resolve `Prelude.Nil` to `Prelude.Basics.Nil`. +export +resolveNamesUniquely : NamesInfoInTypes => (freeNames : SortedSet Name) -> TTImp -> Either (Name, SortedSet Name) TTImp +resolveNamesUniquely @{tyi} freeNames = do + let allConsideredNames = keySet tyi.types `union` keySet tyi.cons + let reverseNamesMap = concatMap (uncurry SortedMap.singleton) $ allConsideredNames.asList >>= \n => allNameSuffixes n <&> (, SortedSet.singleton n) + mapATTImp' $ \case + v@(IVar fc n) => if contains n freeNames then id else do + let Just resolvedAlts = lookup n reverseNamesMap | Nothing => id + let [resolved] = SortedSet.toList resolvedAlts + | _ => const $ Left (n, resolvedAlts) + const $ pure $ IVar fc resolved + _ => id + +Semigroup NamesInfoInTypes where + Names ts cs nit <+> Names ts' cs' nit' = Names (ts `mergeLeft` ts') (cs `mergeLeft` cs') (nit <+> nit') + +Monoid NamesInfoInTypes where + neutral = Names empty empty empty where + Eq TypeInfo where (==) = (==) `on` name + Ord TypeInfo where compare = comparing name + +export +hasNameInsideDeep : NamesInfoInTypes => Name -> TTImp -> Bool +hasNameInsideDeep @{tyi} nm = hasInside empty . allVarNames where + + hasInside : (visited : SortedSet Name) -> (toLook : List Name) -> Bool + hasInside visited [] = False + hasInside visited (curr::rest) = if curr == nm then True else do + let new = if contains curr visited then [] else maybe [] SortedSet.toList $ lookupByType curr + -- visited is limited and either growing or `new` is empty, thus `toLook` is strictly less + assert_total $ hasInside (insert curr visited) (new ++ rest) + +export +isRecursive : NamesInfoInTypes => (con : Con) -> {default Nothing containingType : Maybe TypeInfo} -> Bool +isRecursive con = case the (Maybe TypeInfo) $ containingType <|> typeByCon con of + Just containingType => any (hasNameInsideDeep containingType.name) $ conSubexprs con + Nothing => False + +-- returns `Nothing` if given name is not a constructor +export +isRecursiveConstructor : NamesInfoInTypes => Name -> Maybe Bool +isRecursiveConstructor @{tyi} n = lookup' tyi.cons n <&> \(ty, con) => isRecursive {containingType=Just ty} con + +export +getNamesInfoInTypes : Elaboration m => TypeInfo -> m NamesInfoInTypes +getNamesInfoInTypes ty = go neutral [ty] + where + + subexprs : TypeInfo -> List TTImp + subexprs ty = map type ty.args ++ (ty.cons >>= conSubexprs) + + go : NamesInfoInTypes -> List TypeInfo -> m NamesInfoInTypes + go tyi [] = pure tyi + go tyi (ti::rest) = do + ti <- normaliseCons ti + let subes = concatMap allVarNames' $ subexprs ti + new <- map join $ for (SortedSet.toList subes) $ \n => + if isNothing $ lookupByType n + then map toList $ catch $ getInfo' n + else pure [] + let next = { types $= insert ti.name ti + , namesInTypes $= insert ti subes + , cons $= mergeLeft $ fromList $ ti.cons <&> \con => (con.name, ti, con) + } tyi + assert_total $ go next (new ++ rest) + +export +getNamesInfoInTypes' : Elaboration m => TTImp -> m NamesInfoInTypes +getNamesInfoInTypes' expr = do + let varsFirstOrder = allVarNames expr + varsSecondOrder <- map concat $ Prelude.for varsFirstOrder $ \n => do + ns <- getType n + pure $ SortedSet.insert n $ flip concatMap ns $ \(n', ty) => insert n' $ allVarNames' ty + tys <- map (mapMaybe id) $ for (SortedSet.toList varsSecondOrder) $ catch . getInfo' + concat <$> Prelude.for tys getNamesInfoInTypes diff --git a/src/Language/Reflection/Compat.idr b/src/Language/Reflection/Compat.idr index e61b339e4..13aec7428 100644 --- a/src/Language/Reflection/Compat.idr +++ b/src/Language/Reflection/Compat.idr @@ -24,6 +24,11 @@ public export argName : Arg -> Name argName = stname . (.name) +cleanupNamedHoles : TTImp -> TTImp +cleanupNamedHoles = mapTTImp $ \case + IHole {} => implicitFalse + e => e + -------------------------------------------------------------------------------- -- General Types -------------------------------------------------------------------------------- @@ -40,7 +45,7 @@ record Con where export getCon : Elaboration m => Name -> m Con getCon n = do (n', tt) <- lookupName n - let (args, tpe) = unPi tt + let (args, tpe) = unPi $ cleanupNamedHoles tt pure $ MkCon n' args tpe ||| Information about a data type @@ -64,7 +69,7 @@ export getInfo' : Elaboration m => Name -> m TypeInfo getInfo' n = do (n',tt) <- lookupName n - let (args,IType _) = unPi tt + let (args,IType _) = unPi $ cleanupNamedHoles tt | (_,_) => fail "Type declaration does not end in IType" conNames <- getCons n' cons <- traverse getCon conNames diff --git a/src/Test/DepTyCheck/Gen.idr b/src/Test/DepTyCheck/Gen.idr index 56e8a5d50..ecc05d295 100644 --- a/src/Test/DepTyCheck/Gen.idr +++ b/src/Test/DepTyCheck/Gen.idr @@ -8,11 +8,12 @@ import Control.Monad.State import public Control.Monad.State.Interface import Data.Bool +import public Data.CheckedEmpty.List.Lazy import Data.Fuel import public Data.Nat1 import Data.List import Data.List.Lazy -import public Data.CheckedEmpty.List.Lazy +import Data.List.Lazy.Extra import Data.Singleton import Data.SnocList import Data.Stream @@ -22,6 +23,8 @@ import Decidable.Equality import public Language.Implicits.IfUnsolved +import Syntax.WithProof + import public Test.DepTyCheck.Gen.Emptiness import public Test.DepTyCheck.Gen.Labels @@ -242,6 +245,11 @@ export unGenAll : RandomGen g => (seed : g) -> Gen1 a -> Stream a unGenAll = map snd .: unGenAll' +||| Picks one random value from a generator +export +pick1 : CanInitSeed g m => Functor m => Gen1 a -> m a +pick1 gen = initSeed <&> \s => evalRandom s $ unGen1 gen + --- Possibly empty generators --- export @@ -271,6 +279,16 @@ export unGenTryN : RandomGen g => (n : Nat) -> g -> Gen em a -> LazyList a unGenTryN n = mapMaybe id .: take (limit n) .: unGenTryAll +||| Tries once to pick a random value from a generator +export +pick : CanInitSeed g m => Functor m => Gen em a -> m $ Maybe a +pick gen = initSeed <&> \s => evalRandom s $ unGen' gen + +||| Tries to pick a random value from a generator, returning the number of unsuccessful attempts, if generated successfully +export +pickTryN : CanInitSeed g m => Functor m => (n : Nat) -> Gen em a -> m $ Maybe (Fin n, a) +pickTryN n g = initSeed <&> \s => head' (withIndex $ unGenTryN n s g) >>= \(i, x) => natToFin i n <&> (,x) + -- TODO To add config and Reader for that. -- This config should contain attempts count for each `unGen` (including those in combinators) -- Current `unGen` should be renamed to `unGen1` and not be exported. @@ -507,6 +525,15 @@ elements' xs = elements $ relaxF $ fromList $ toList xs --- Analysis of generators --- ------------------------------ +||| Shallow alternatives of a generator. +||| +||| If the given generator is made by one of `oneOf`, `frequency` or `elements`, +||| this function returns alternatives which this generators contains. +||| Otherwise it retuns a single-element alternative list containing given generator. +||| +||| In a sense, this function is a reverse function of `oneOf`, i.g. +||| `oneOf $ alternativesOf g` must be equivalent to `g` and +||| `alternativesof $ oneOf gs` must be equivalent to `gs`. export alternativesOf : {em : _} -> Gen em a -> GenAlternatives True em a alternativesOf $ OneOf oo = MkGenAlts $ unGenAlts $ mapOneOf oo relax @@ -585,6 +612,48 @@ export {em : _} -> Monad (GenAlternatives True em) where xs >>= f = flip processAlternatives' xs $ alternativesOf . (>>= oneOf . f) +---------------------------------------- +--- Additional composition functions --- +---------------------------------------- + +||| Associative composition of two generators, merging shallow alternatives of given two generators +||| +||| This operation being applied to arguments `a` and `b` is *not* the same as `oneOf [a, b]`. +||| Generator ``a `withAlts` b`` has equal probabilities of all shallow alternatives of generators `a` and `b`. +||| For example, when there are generators +||| ```idris +||| g1 = oneOf [elems [0, 1, 2, 3], elems [4, 5]] +||| g2 = oneOf elemts [10, 11, 12, 13, 14, 15] +||| ``` +||| generator ``g1 `withAlts` g2`` would be equivalent to +||| `oneOf [elems [0, 1, 2, 3], elems [4, 5], pure 10, pure 11, pure 12, pure 13, pure 14, pure 15]`. +||| +||| In other words, ``a `withAlts` b`` must be equivalent to `oneOf $ alternativesOf a ++ alternativesOf b`. +export %inline +withAlts : {em : _} -> Gen em a -> Gen em a -> Gen em a +a `withAlts` b = oneOf $ alternativesOf a ++ alternativesOf b + +-- As of `<|>` +export +infixr 2 `withAlts` + +||| Associative composition of two generators, merging deep alternatives of given two generators +||| +||| This operation being applied to arguments `a` and `b` is *not* the same as `oneOf [a, b]`. +||| Generator ``a `withDeepAlts` b`` has equal probabilities of all deep alternatives of generators `a` and `b`. +||| For example, when there are generators +||| ```idris +||| g1 = oneOf [elems [0, 1, 2, 3], elems [4, 5]] +||| g2 = oneOf elemts [10, 11, 12, 13, 14, 15] +||| ``` +||| generator ``withDeepAlts n g1 g2`` with `n >= 2` would be equivalent to +||| `oneOf elements [0, 1, 2, 3, 4, 5, 10, 11, 12, 13, 14, 15]`. +||| +||| In other words, ``withDeepAlts d a b`` must be equivalent to `oneOf $ deepAlternativesOf d a ++ deepAlternativesOf d b`. +export %inline +withDeepAlts : {em : _} -> (depth : Nat) -> Gen em a -> Gen em a -> Gen em a +withDeepAlts depth a b = oneOf $ deepAlternativesOf depth a ++ deepAlternativesOf depth b + ----------------- --- Filtering --- ----------------- @@ -620,6 +689,37 @@ export suchThat_invertedEq : DecEq b => Gen em a -> (y : b) -> (f : a -> b) -> Gen0 $ Subset a $ \x => y = f x suchThat_invertedEq g y f = g `suchThat_dec` \x => y `decEq` f x +||| More elegant version of `suchThat_withPrf` for fuelled generators. +||| +||| Tries to repeat generation until there is some fuel, and fallback to `suchThat_withPrf` in case there isn't. +export +retryUntil_withPrf : (p : a -> Bool) -> (Fuel -> Gen em a) -> Fuel -> Gen0 $ a `Subset` So . p +retryUntil_withPrf p f Dry = f Dry `suchThat_withPrf` p +retryUntil_withPrf p f fl'@(More fl) = do + x <- relax $ f fl' + case @@ p x of + (True ** prf) => pure $ Element x $ eqToSo prf + (False ** _) => retryUntil_withPrf p f fl + +||| More elegant version of `suchThat` for fuelled generators. +||| +||| Tries to repeat generation until there is some fuel, and fallback to `suchThat` in case there isn't. +public export %inline +retryUntil : (p : a -> Bool) -> (Fuel -> Gen em a) -> Fuel -> Gen0 a +retryUntil p f = map fst . retryUntil_withPrf p f + +||| More elegant version of `suchThat_dec` for fuelled generators. +||| +||| Tries to repeat generation until there is some fuel, and fallback to `suchThat_dec` in case there isn't. +export +retryUntil_dec : (p : (x : a) -> Dec (prop x)) -> (Fuel -> Gen em a) -> Fuel -> Gen0 $ Subset a prop +retryUntil_dec p f Dry = f Dry `suchThat_dec` p +retryUntil_dec p f fl'@(More fl) = do + x <- relax $ f fl' + case p x of + Yes p => pure $ Element x p + No _ => retryUntil_dec p f fl + ------------------------------- --- Variation in generation --- ------------------------------- diff --git a/src/Test/DepTyCheck/Gen/Coverage.idr b/src/Test/DepTyCheck/Gen/Coverage.idr index 148d0bdff..f4661d966 100644 --- a/src/Test/DepTyCheck/Gen/Coverage.idr +++ b/src/Test/DepTyCheck/Gen/Coverage.idr @@ -41,10 +41,22 @@ MonadWriter ModelCoverage m => CanManageLabels m where manageLabel l x = tell (MkModelCoverage $ singleton l 1) >> x export -unGenTryAllD : RandomGen g => (seed : g) -> Gen em a -> Stream $ Maybe (ModelCoverage, a) -unGenTryAllD seed gen = do +unGenD : MonadRandom m => MonadError () m => Gen em a -> m (ModelCoverage, a) +unGenD = map swap . runWriterT . unGen {m = WriterT ModelCoverage $ m} + +export %inline +unGenD' : MonadRandom m => Gen em a -> m $ Maybe (ModelCoverage, a) +unGenD' = runMaybeT . unGenD {m = MaybeT m} + +export +unGenTryAllD' : RandomGen g => (seed : g) -> Gen em a -> Stream (g, Maybe (ModelCoverage, a)) +unGenTryAllD' seed gen = do let (seed, sv) = runRandom seed $ runMaybeT $ runWriterT $ unGen {m=WriterT ModelCoverage $ MaybeT Rand} gen - map swap sv :: unGenTryAllD seed gen + (seed, map swap sv) :: unGenTryAllD' seed gen + +export +unGenTryAllD : RandomGen g => (seed : g) -> Gen em a -> Stream $ Maybe (ModelCoverage, a) +unGenTryAllD = map snd .: unGenTryAllD' export unGenTryND : RandomGen g => (n : Nat) -> g -> Gen em a -> LazyList (ModelCoverage, a) diff --git a/tests/Tests.idr b/tests/Tests.idr index e1bc7268d..bc01d0848 100644 --- a/tests/Tests.idr +++ b/tests/Tests.idr @@ -7,11 +7,15 @@ main = goldenRunner $ [ "The `Gen` monad" `atDir` "lib/gen-monad" , "Distribution of generators" `atDir` "lib/distribution" , "Model coverage" `atDir` "lib/coverage" + , "John Hughes-style tests" `atDir` "lib/john-hughes" , "The library documentation" `atDir` "docs" , "Derivation utils: TTImp equality up to renaming" `atDir` "derivation/utils/up-to-renaming-ttimp-eq" , "Derivation utils: canonic signature" `atDir` "derivation/utils/canonicsig" , "Derivation utils: constructors analysis" `atDir` "derivation/utils/cons-analysis" , "Derivation utils: argument dependencies" `atDir` "derivation/utils/arg-deps" + , [ "Derivation utils: \{p} fusion \{w}" `atDir` "derivation/utils/fusion/\{p}/\{w}" + | p <- ["print", "run"], w <- ["merger", "splitter", "depsolver", "generator"] + ] , "Reflection utils: involved types" `atDir` "derivation/utils/involved-types" , "Derivation: input validation" `atDir` "derivation/inputvalidation" , "Derivation: running harness" `atDir` "derivation/infra" diff --git a/tests/derivation/_common/PrintDerivation.idr b/tests/derivation/_common/PrintDerivation.idr deleted file mode 100644 index 75974dca9..000000000 --- a/tests/derivation/_common/PrintDerivation.idr +++ /dev/null @@ -1,20 +0,0 @@ -module PrintDerivation - -import public Deriving.DepTyCheck.Gen.Entry - -%language ElabReflection - -export covering -printDerived : DerivatorCore => Type -> Elab Unit -printDerived ty = do - ty <- quote ty - logSugaredTerm "gen.auto.derive.infra" 0 "type" ty - expr <- deriveGenExpr ty - expr <- quote expr - declare `[ - main : IO Unit - main = do - putStrLn "LOG gen.auto.derive.infra:0: " -- mimic the original logging behaviour - putStr $ interpolate ~(expr) - putStrLn "" - ] diff --git a/tests/derivation/_common/RunDerivedGen.idr b/tests/derivation/_common/RunDerivedGen.idr index 612d88713..c7578e388 100644 --- a/tests/derivation/_common/RunDerivedGen.idr +++ b/tests/derivation/_common/RunDerivedGen.idr @@ -39,7 +39,3 @@ runGs checkedGens = do let genedValues = checkedGens <&> \(G gen) => map show $ unGenTryN 10 someStdGen $ gen $ limit 20 let delim = (putStrLn "-----" >>) for_ genedValues $ delim . Lazy.traverse_ (delim . putStrLn) - -export %hint -UsedConstructorDerivator : ConstructorDerivator -UsedConstructorDerivator = LeastEffort diff --git a/tests/derivation/_common/run b/tests/derivation/_common/run index 2a6b6401c..dce1363e6 100755 --- a/tests/derivation/_common/run +++ b/tests/derivation/_common/run @@ -2,8 +2,10 @@ rm -rf build NAMES_CLEANER="$(dirname "$(dirname "$(realpath "$1")")")"/.clean-names +{ flock "$1" pack -q install-deps derive.ipkg && \ idris2 --check --no-color --console-width 0 --no-banner --find-ipkg DerivedGen.idr && \ -pack exec DerivedGen.idr | "$NAMES_CLEANER" +pack exec DerivedGen.idr +} | "$NAMES_CLEANER" rm -rf build diff --git a/tests/derivation/core/big record 11/DerivedGen.idr b/tests/derivation/core/big record 11/DerivedGen.idr new file mode 100644 index 000000000..5db00aa16 --- /dev/null +++ b/tests/derivation/core/big record 11/DerivedGen.idr @@ -0,0 +1,32 @@ +module DerivedGen + +import RunDerivedGen + +import Deriving.Show + +%default total + +%language ElabReflection + +record X where + constructor MkX + field0 : Nat + field1 : Nat + field2 : Nat + field3 : Nat + field4 : Nat + field5 : Nat + field6 : Nat + field7 : Nat + field8 : Nat + field9 : Nat + field10 : Nat + field11 : Nat + +%hint ShowX : Show X; ShowX = %runElab derive + +checkedGen : Fuel -> Gen MaybeEmpty X +checkedGen = deriveGen + +main : IO () +main = runGs [ G checkedGen ] diff --git a/tests/derivation/core/norec t-..->p. noext 001-shdw/RunDerivedGen.idr b/tests/derivation/core/big record 11/RunDerivedGen.idr similarity index 100% rename from tests/derivation/core/norec t-..->p. noext 001-shdw/RunDerivedGen.idr rename to tests/derivation/core/big record 11/RunDerivedGen.idr diff --git a/tests/derivation/core/norec t-..->p. noext 001-shdw/derive.ipkg b/tests/derivation/core/big record 11/derive.ipkg similarity index 100% rename from tests/derivation/core/norec t-..->p. noext 001-shdw/derive.ipkg rename to tests/derivation/core/big record 11/derive.ipkg diff --git a/tests/derivation/core/big record 11/expected b/tests/derivation/core/big record 11/expected new file mode 100644 index 000000000..7cb77e0d7 --- /dev/null +++ b/tests/derivation/core/big record 11/expected @@ -0,0 +1,24 @@ +1/2: Building RunDerivedGen (RunDerivedGen.idr) +2/2: Building DerivedGen (DerivedGen.idr) +Generated values: +----- +----- +MkX 16 4 17 10 10 17 5 4 12 11 8 15 +----- +MkX 4 14 7 4 10 1 15 20 0 17 13 17 +----- +MkX 17 12 2 18 13 10 14 16 16 11 1 3 +----- +MkX 3 10 12 17 19 7 3 16 6 12 18 2 +----- +MkX 8 1 18 15 1 7 0 5 15 19 3 19 +----- +MkX 9 6 4 0 3 13 19 5 20 3 1 13 +----- +MkX 9 5 0 7 4 7 6 16 3 6 4 5 +----- +MkX 10 11 2 11 12 13 19 15 5 7 10 18 +----- +MkX 2 14 9 7 20 13 3 10 17 7 6 20 +----- +MkX 19 13 5 1 20 12 19 17 2 12 20 14 diff --git a/tests/derivation/core/norec t-..->p. noext 001-shdw/run b/tests/derivation/core/big record 11/run similarity index 100% rename from tests/derivation/core/norec t-..->p. noext 001-shdw/run rename to tests/derivation/core/big record 11/run diff --git a/tests/derivation/core/big record 4/DerivedGen.idr b/tests/derivation/core/big record 4/DerivedGen.idr new file mode 100644 index 000000000..484a48c5a --- /dev/null +++ b/tests/derivation/core/big record 4/DerivedGen.idr @@ -0,0 +1,24 @@ +module DerivedGen + +import RunDerivedGen + +import Deriving.Show + +%default total + +%language ElabReflection + +record X where + constructor MkX + field1 : Nat + field2 : Nat + field3 : Nat + field4 : Nat + +%hint ShowX : Show X; ShowX = %runElab derive + +checkedGen : Fuel -> Gen MaybeEmpty X +checkedGen = deriveGen + +main : IO () +main = runGs [ G checkedGen ] diff --git a/tests/derivation/core/norec t-..->p. noext 001/RunDerivedGen.idr b/tests/derivation/core/big record 4/RunDerivedGen.idr similarity index 100% rename from tests/derivation/core/norec t-..->p. noext 001/RunDerivedGen.idr rename to tests/derivation/core/big record 4/RunDerivedGen.idr diff --git a/tests/derivation/core/norec t-..->p. noext 001/derive.ipkg b/tests/derivation/core/big record 4/derive.ipkg similarity index 100% rename from tests/derivation/core/norec t-..->p. noext 001/derive.ipkg rename to tests/derivation/core/big record 4/derive.ipkg diff --git a/tests/derivation/core/big record 4/expected b/tests/derivation/core/big record 4/expected new file mode 100644 index 000000000..d0b44bca1 --- /dev/null +++ b/tests/derivation/core/big record 4/expected @@ -0,0 +1,24 @@ +1/2: Building RunDerivedGen (RunDerivedGen.idr) +2/2: Building DerivedGen (DerivedGen.idr) +Generated values: +----- +----- +MkX 16 4 17 10 +----- +MkX 10 17 5 4 +----- +MkX 12 11 8 15 +----- +MkX 4 14 7 4 +----- +MkX 10 1 15 20 +----- +MkX 0 17 13 17 +----- +MkX 17 12 2 18 +----- +MkX 13 10 14 16 +----- +MkX 16 11 1 3 +----- +MkX 3 10 12 17 diff --git a/tests/derivation/core/norec t-..->p. noext 001/run b/tests/derivation/core/big record 4/run similarity index 100% rename from tests/derivation/core/norec t-..->p. noext 001/run rename to tests/derivation/core/big record 4/run diff --git a/tests/derivation/core/big record 5/DerivedGen.idr b/tests/derivation/core/big record 5/DerivedGen.idr new file mode 100644 index 000000000..9237888ce --- /dev/null +++ b/tests/derivation/core/big record 5/DerivedGen.idr @@ -0,0 +1,25 @@ +module DerivedGen + +import RunDerivedGen + +import Deriving.Show + +%default total + +%language ElabReflection + +record X where + constructor MkX + field1 : Nat + field2 : Nat + field3 : Nat + field4 : Nat + field5 : Nat + +%hint ShowX : Show X; ShowX = %runElab derive + +checkedGen : Fuel -> Gen MaybeEmpty X +checkedGen = deriveGen + +main : IO () +main = runGs [ G checkedGen ] diff --git a/tests/derivation/core/norec t-..->p. noext 002/RunDerivedGen.idr b/tests/derivation/core/big record 5/RunDerivedGen.idr similarity index 100% rename from tests/derivation/core/norec t-..->p. noext 002/RunDerivedGen.idr rename to tests/derivation/core/big record 5/RunDerivedGen.idr diff --git a/tests/derivation/core/norec t-..->p. noext 002/derive.ipkg b/tests/derivation/core/big record 5/derive.ipkg similarity index 100% rename from tests/derivation/core/norec t-..->p. noext 002/derive.ipkg rename to tests/derivation/core/big record 5/derive.ipkg diff --git a/tests/derivation/core/big record 5/expected b/tests/derivation/core/big record 5/expected new file mode 100644 index 000000000..284b16465 --- /dev/null +++ b/tests/derivation/core/big record 5/expected @@ -0,0 +1,24 @@ +1/2: Building RunDerivedGen (RunDerivedGen.idr) +2/2: Building DerivedGen (DerivedGen.idr) +Generated values: +----- +----- +MkX 16 4 17 10 10 +----- +MkX 17 5 4 12 11 +----- +MkX 8 15 4 14 7 +----- +MkX 4 10 1 15 20 +----- +MkX 0 17 13 17 17 +----- +MkX 12 2 18 13 10 +----- +MkX 14 16 16 11 1 +----- +MkX 3 3 10 12 17 +----- +MkX 19 7 3 16 6 +----- +MkX 12 18 2 8 1 diff --git a/tests/derivation/core/norec t-..->p. noext 002/run b/tests/derivation/core/big record 5/run similarity index 100% rename from tests/derivation/core/norec t-..->p. noext 002/run rename to tests/derivation/core/big record 5/run diff --git a/tests/derivation/core/big record 8/DerivedGen.idr b/tests/derivation/core/big record 8/DerivedGen.idr new file mode 100644 index 000000000..da85e783f --- /dev/null +++ b/tests/derivation/core/big record 8/DerivedGen.idr @@ -0,0 +1,28 @@ +module DerivedGen + +import RunDerivedGen + +import Deriving.Show + +%default total + +%language ElabReflection + +record X where + constructor MkX + field1 : Nat + field2 : Nat + field3 : Nat + field4 : Nat + field5 : Nat + field6 : Nat + field7 : Nat + field8 : Nat + +%hint ShowX : Show X; ShowX = %runElab derive + +checkedGen : Fuel -> Gen MaybeEmpty X +checkedGen = deriveGen + +main : IO () +main = runGs [ G checkedGen ] diff --git a/tests/derivation/core/norec t-p.->.. noext 001/RunDerivedGen.idr b/tests/derivation/core/big record 8/RunDerivedGen.idr similarity index 100% rename from tests/derivation/core/norec t-p.->.. noext 001/RunDerivedGen.idr rename to tests/derivation/core/big record 8/RunDerivedGen.idr diff --git a/tests/derivation/core/norec t-p.->.. noext 001/derive.ipkg b/tests/derivation/core/big record 8/derive.ipkg similarity index 100% rename from tests/derivation/core/norec t-p.->.. noext 001/derive.ipkg rename to tests/derivation/core/big record 8/derive.ipkg diff --git a/tests/derivation/core/big record 8/expected b/tests/derivation/core/big record 8/expected new file mode 100644 index 000000000..699cbef9a --- /dev/null +++ b/tests/derivation/core/big record 8/expected @@ -0,0 +1,24 @@ +1/2: Building RunDerivedGen (RunDerivedGen.idr) +2/2: Building DerivedGen (DerivedGen.idr) +Generated values: +----- +----- +MkX 16 4 17 10 10 17 5 4 +----- +MkX 12 11 8 15 4 14 7 4 +----- +MkX 10 1 15 20 0 17 13 17 +----- +MkX 17 12 2 18 13 10 14 16 +----- +MkX 16 11 1 3 3 10 12 17 +----- +MkX 19 7 3 16 6 12 18 2 +----- +MkX 8 1 18 15 1 7 0 5 +----- +MkX 15 19 3 19 9 6 4 0 +----- +MkX 3 13 19 5 20 3 1 13 +----- +MkX 9 5 0 7 4 7 6 16 diff --git a/tests/derivation/core/norec t-p.->.. noext 001/run b/tests/derivation/core/big record 8/run similarity index 100% rename from tests/derivation/core/norec t-p.->.. noext 001/run rename to tests/derivation/core/big record 8/run diff --git a/tests/derivation/core/defaulthint/DerivedGen.idr b/tests/derivation/core/defaulthint/DerivedGen.idr new file mode 100644 index 000000000..d2b53d1e8 --- /dev/null +++ b/tests/derivation/core/defaulthint/DerivedGen.idr @@ -0,0 +1,10 @@ +module DerivedGen + +import Deriving.DepTyCheck + +%default total + +%language ElabReflection + +g : Fuel -> Gen MaybeEmpty Unit +g = deriveGen diff --git a/tests/derivation/core/defaulthint/derive.ipkg b/tests/derivation/core/defaulthint/derive.ipkg new file mode 100644 index 000000000..6acb1cc70 --- /dev/null +++ b/tests/derivation/core/defaulthint/derive.ipkg @@ -0,0 +1,3 @@ +package derive-test + +depends = deptycheck diff --git a/tests/derivation/core/defaulthint/expected b/tests/derivation/core/defaulthint/expected new file mode 100644 index 000000000..12294872c --- /dev/null +++ b/tests/derivation/core/defaulthint/expected @@ -0,0 +1 @@ +1/1: Building DerivedGen (DerivedGen.idr) diff --git a/tests/derivation/core/defaulthint/run b/tests/derivation/core/defaulthint/run new file mode 100755 index 000000000..cdaff1933 --- /dev/null +++ b/tests/derivation/core/defaulthint/run @@ -0,0 +1,6 @@ +rm -rf build + +flock "$1" pack -q install-deps derive.ipkg && \ +idris2 --check --no-color --console-width 0 --no-banner --find-ipkg DerivedGen.idr + +rm -rf build diff --git a/tests/derivation/core/non-cons given match 001-neg/expected b/tests/derivation/core/non-cons given match 001-neg/expected index 6193a796d..400faaef1 100644 --- a/tests/derivation/core/non-cons given match 001-neg/expected +++ b/tests/derivation/core/non-cons given match 001-neg/expected @@ -2,7 +2,7 @@ 2/2: Building DerivedGen (DerivedGen.idr) Error: While processing right hand side of checkedGen. Error during reflection: Argument #0 is not supported yet, argument expression: DerivedGen.boolToNat x, reason: name `DerivedGen.boolToNat` is not a constructor -DerivedGen:16:22--16:37 +DerivedGen:1 12 | 13 | data X : Nat -> Type where 14 | X0 : X 0 diff --git a/tests/derivation/core/norec nodep noext 003-neg/expected b/tests/derivation/core/norec nodep noext 003-neg/expected index 438c2f507..007035d5a 100644 --- a/tests/derivation/core/norec nodep noext 003-neg/expected +++ b/tests/derivation/core/norec nodep noext 003-neg/expected @@ -2,7 +2,7 @@ 2/2: Building DerivedGen (DerivedGen.idr) Error: While processing right hand side of checkedGen. Error during reflection: No constructors found for the type `Builtin.Void` -DerivedGen:16:14--16:23 +DerivedGen:1 12 | XShow : Show X 13 | XShow = %runElab derive 14 | diff --git a/tests/derivation/core/norec nodep noext 004-neg/expected b/tests/derivation/core/norec nodep noext 004-neg/expected index 438c2f507..007035d5a 100644 --- a/tests/derivation/core/norec nodep noext 004-neg/expected +++ b/tests/derivation/core/norec nodep noext 004-neg/expected @@ -2,7 +2,7 @@ 2/2: Building DerivedGen (DerivedGen.idr) Error: While processing right hand side of checkedGen. Error during reflection: No constructors found for the type `Builtin.Void` -DerivedGen:16:14--16:23 +DerivedGen:1 12 | XShow : Show X 13 | XShow = %runElab derive 14 | diff --git a/tests/derivation/core/norec nodep noext 005-neg/expected b/tests/derivation/core/norec nodep noext 005-neg/expected index 438c2f507..007035d5a 100644 --- a/tests/derivation/core/norec nodep noext 005-neg/expected +++ b/tests/derivation/core/norec nodep noext 005-neg/expected @@ -2,7 +2,7 @@ 2/2: Building DerivedGen (DerivedGen.idr) Error: While processing right hand side of checkedGen. Error during reflection: No constructors found for the type `Builtin.Void` -DerivedGen:16:14--16:23 +DerivedGen:1 12 | XShow : Show X 13 | XShow = %runElab derive 14 | diff --git a/tests/derivation/core/norec part noext 001-neg/expected b/tests/derivation/core/norec part noext 001-neg/expected index 0aa1333b3..020a98a89 100644 --- a/tests/derivation/core/norec part noext 001-neg/expected +++ b/tests/derivation/core/norec part noext 001-neg/expected @@ -2,7 +2,7 @@ 2/2: Building DerivedGen (DerivedGen.idr) Error: While processing right hand side of checkedGen. Error during reflection: Target type's argument must be a variable name -DerivedGen:9:44--9:48 +DerivedGen:1 5 | %default total 6 | 7 | %language ElabReflection diff --git a/tests/derivation/core/norec part noext 002-neg/expected b/tests/derivation/core/norec part noext 002-neg/expected index 66b800526..e206a685d 100644 --- a/tests/derivation/core/norec part noext 002-neg/expected +++ b/tests/derivation/core/norec part noext 002-neg/expected @@ -2,7 +2,7 @@ 2/2: Building DerivedGen (DerivedGen.idr) Error: While processing right hand side of checkedGen. Error during reflection: Target type's argument must be a variable name -DerivedGen:9:38--9:42 +DerivedGen:1 5 | %default total 6 | 7 | %language ElabReflection diff --git a/tests/derivation/core/norec part noext 003/expected b/tests/derivation/core/norec part noext 003/expected index efb21c56e..057ed2b9f 100644 --- a/tests/derivation/core/norec part noext 003/expected +++ b/tests/derivation/core/norec part noext 003/expected @@ -1,8 +1,8 @@ 1/2: Building RunDerivedGen (RunDerivedGen.idr) 2/2: Building DerivedGen (DerivedGen.idr) -Error: While processing right hand side of checkedGen. Error during reflection: Only applications to non-polymorphic type constructors are supported at the moment, we found `ty` +Error: While processing right hand side of checkedGen. Error during reflection: Usupported applications to a non-concrete type `ty` -DerivedGen:16:14--16:23 +DerivedGen:1 12 | XShow : Show X 13 | XShow = %runElab derive 14 | diff --git a/tests/derivation/core/norec part noext 004/expected b/tests/derivation/core/norec part noext 004/expected index 8f35a0ac4..21a81b3ab 100644 --- a/tests/derivation/core/norec part noext 004/expected +++ b/tests/derivation/core/norec part noext 004/expected @@ -1,8 +1,8 @@ 1/2: Building RunDerivedGen (RunDerivedGen.idr) 2/2: Building DerivedGen (DerivedGen.idr) -Error: While processing right hand side of checkedGen. Error during reflection: Only applications to non-polymorphic type constructors are supported at the moment, we found `a` +Error: While processing right hand side of checkedGen. Error during reflection: Usupported applications to a non-concrete type `a` -DerivedGen:17:14--17:23 +DerivedGen:1 13 | XShow = %runElab derive 14 | 15 | export diff --git a/tests/derivation/core/norec part noext 005/expected b/tests/derivation/core/norec part noext 005/expected index 8f35a0ac4..21a81b3ab 100644 --- a/tests/derivation/core/norec part noext 005/expected +++ b/tests/derivation/core/norec part noext 005/expected @@ -1,8 +1,8 @@ 1/2: Building RunDerivedGen (RunDerivedGen.idr) 2/2: Building DerivedGen (DerivedGen.idr) -Error: While processing right hand side of checkedGen. Error during reflection: Only applications to non-polymorphic type constructors are supported at the moment, we found `a` +Error: While processing right hand side of checkedGen. Error during reflection: Usupported applications to a non-concrete type `a` -DerivedGen:17:14--17:23 +DerivedGen:1 13 | XShow = %runElab derive 14 | 15 | export diff --git a/tests/derivation/core/norec part w_ext 001/expected b/tests/derivation/core/norec part w_ext 001/expected index 72ccc77a2..53895c73d 100644 --- a/tests/derivation/core/norec part w_ext 001/expected +++ b/tests/derivation/core/norec part w_ext 001/expected @@ -1,8 +1,8 @@ 1/2: Building RunDerivedGen (RunDerivedGen.idr) 2/2: Building DerivedGen (DerivedGen.idr) -Error: While processing right hand side of checkedGen. Error during reflection: Only applications to non-polymorphic type constructors are supported at the moment, we found `ty` +Error: While processing right hand side of checkedGen. Error during reflection: Usupported applications to a non-concrete type `ty` -DerivedGen:17:14--17:23 +DerivedGen:1 13 | XShow = %runElab derive 14 | 15 | export diff --git a/tests/derivation/core/norec part w_ext 002/expected b/tests/derivation/core/norec part w_ext 002/expected index 8f7835b38..7ed07ef1e 100644 --- a/tests/derivation/core/norec part w_ext 002/expected +++ b/tests/derivation/core/norec part w_ext 002/expected @@ -1,8 +1,8 @@ 1/2: Building RunDerivedGen (RunDerivedGen.idr) 2/2: Building DerivedGen (DerivedGen.idr) -Error: While processing right hand side of checkedGen. Error during reflection: Only applications to non-polymorphic type constructors are supported at the moment, we found `a` +Error: While processing right hand side of checkedGen. Error during reflection: Usupported applications to a non-concrete type `a` -DerivedGen:17:14--17:23 +DerivedGen:1 13 | XShow = %runElab derive 14 | 15 | export diff --git a/tests/derivation/core/norec part w_ext 003/expected b/tests/derivation/core/norec part w_ext 003/expected index 8f7835b38..7ed07ef1e 100644 --- a/tests/derivation/core/norec part w_ext 003/expected +++ b/tests/derivation/core/norec part w_ext 003/expected @@ -1,8 +1,8 @@ 1/2: Building RunDerivedGen (RunDerivedGen.idr) 2/2: Building DerivedGen (DerivedGen.idr) -Error: While processing right hand side of checkedGen. Error during reflection: Only applications to non-polymorphic type constructors are supported at the moment, we found `a` +Error: While processing right hand side of checkedGen. Error during reflection: Usupported applications to a non-concrete type `a` -DerivedGen:17:14--17:23 +DerivedGen:1 13 | XShow = %runElab derive 14 | 15 | export diff --git a/tests/derivation/core/norec part w_ext 004-neg/expected b/tests/derivation/core/norec part w_ext 004-neg/expected index 62cdeaa9e..6cfc3bb28 100644 --- a/tests/derivation/core/norec part w_ext 004-neg/expected +++ b/tests/derivation/core/norec part w_ext 004-neg/expected @@ -2,7 +2,7 @@ 2/2: Building DerivedGen (DerivedGen.idr) Error: While processing right hand side of checkedGen. Error during reflection: Target type's argument must be a variable name -DerivedGen:10:79--10:85 +DerivedGen:1 06 | 07 | %language ElabReflection 08 | diff --git a/tests/derivation/core/norec part w_ext 005-neg/expected b/tests/derivation/core/norec part w_ext 005-neg/expected index 89f451814..69a049e97 100644 --- a/tests/derivation/core/norec part w_ext 005-neg/expected +++ b/tests/derivation/core/norec part w_ext 005-neg/expected @@ -2,7 +2,7 @@ 2/2: Building DerivedGen (DerivedGen.idr) Error: While processing right hand side of checkedGen. Error during reflection: Target type's argument must be a variable name -DerivedGen:10:105--10:111 +DerivedGen:1 06 | 07 | %language ElabReflection 08 | diff --git a/tests/derivation/core/norec part w_ext 006-neg/expected b/tests/derivation/core/norec part w_ext 006-neg/expected index d68ed6986..3a34363f9 100644 --- a/tests/derivation/core/norec part w_ext 006-neg/expected +++ b/tests/derivation/core/norec part w_ext 006-neg/expected @@ -2,7 +2,7 @@ 2/2: Building DerivedGen (DerivedGen.idr) Error: While processing right hand side of checkedGen. Error during reflection: Target type's argument must be a variable name -DerivedGen:10:105--10:111 +DerivedGen:1 06 | 07 | %language ElabReflection 08 | diff --git a/tests/derivation/core/norec t-..->p. noext 001-shdw/DerivedGen.idr b/tests/derivation/core/norec t-..--p. noext 001-shdw/DerivedGen.idr similarity index 100% rename from tests/derivation/core/norec t-..->p. noext 001-shdw/DerivedGen.idr rename to tests/derivation/core/norec t-..--p. noext 001-shdw/DerivedGen.idr diff --git a/tests/derivation/core/norec t-p.->.. noext 002/RunDerivedGen.idr b/tests/derivation/core/norec t-..--p. noext 001-shdw/RunDerivedGen.idr similarity index 100% rename from tests/derivation/core/norec t-p.->.. noext 002/RunDerivedGen.idr rename to tests/derivation/core/norec t-..--p. noext 001-shdw/RunDerivedGen.idr diff --git a/tests/derivation/core/norec t-p.->.. noext 002/derive.ipkg b/tests/derivation/core/norec t-..--p. noext 001-shdw/derive.ipkg similarity index 100% rename from tests/derivation/core/norec t-p.->.. noext 002/derive.ipkg rename to tests/derivation/core/norec t-..--p. noext 001-shdw/derive.ipkg diff --git a/tests/derivation/core/norec t-..->p. noext 001-shdw/expected b/tests/derivation/core/norec t-..--p. noext 001-shdw/expected similarity index 100% rename from tests/derivation/core/norec t-..->p. noext 001-shdw/expected rename to tests/derivation/core/norec t-..--p. noext 001-shdw/expected diff --git a/tests/derivation/core/norec t-p.->.. noext 002/run b/tests/derivation/core/norec t-..--p. noext 001-shdw/run similarity index 100% rename from tests/derivation/core/norec t-p.->.. noext 002/run rename to tests/derivation/core/norec t-..--p. noext 001-shdw/run diff --git a/tests/derivation/core/norec t-..->p. noext 001/DerivedGen.idr b/tests/derivation/core/norec t-..--p. noext 001/DerivedGen.idr similarity index 100% rename from tests/derivation/core/norec t-..->p. noext 001/DerivedGen.idr rename to tests/derivation/core/norec t-..--p. noext 001/DerivedGen.idr diff --git a/tests/derivation/core/norec t-p.->.. noext 003/RunDerivedGen.idr b/tests/derivation/core/norec t-..--p. noext 001/RunDerivedGen.idr similarity index 100% rename from tests/derivation/core/norec t-p.->.. noext 003/RunDerivedGen.idr rename to tests/derivation/core/norec t-..--p. noext 001/RunDerivedGen.idr diff --git a/tests/derivation/core/norec t-p.->.. noext 003/derive.ipkg b/tests/derivation/core/norec t-..--p. noext 001/derive.ipkg similarity index 100% rename from tests/derivation/core/norec t-p.->.. noext 003/derive.ipkg rename to tests/derivation/core/norec t-..--p. noext 001/derive.ipkg diff --git a/tests/derivation/core/norec t-..->p. noext 001/expected b/tests/derivation/core/norec t-..--p. noext 001/expected similarity index 100% rename from tests/derivation/core/norec t-..->p. noext 001/expected rename to tests/derivation/core/norec t-..--p. noext 001/expected diff --git a/tests/derivation/core/norec t-p.->.. noext 003/run b/tests/derivation/core/norec t-..--p. noext 001/run similarity index 100% rename from tests/derivation/core/norec t-p.->.. noext 003/run rename to tests/derivation/core/norec t-..--p. noext 001/run diff --git a/tests/derivation/core/norec t-..->p. noext 002/DerivedGen.idr b/tests/derivation/core/norec t-..--p. noext 002/DerivedGen.idr similarity index 100% rename from tests/derivation/core/norec t-..->p. noext 002/DerivedGen.idr rename to tests/derivation/core/norec t-..--p. noext 002/DerivedGen.idr diff --git a/tests/derivation/core/norec t-p.->.. w_ext 001/RunDerivedGen.idr b/tests/derivation/core/norec t-..--p. noext 002/RunDerivedGen.idr similarity index 100% rename from tests/derivation/core/norec t-p.->.. w_ext 001/RunDerivedGen.idr rename to tests/derivation/core/norec t-..--p. noext 002/RunDerivedGen.idr diff --git a/tests/derivation/core/norec t-p.->.. w_ext 001/derive.ipkg b/tests/derivation/core/norec t-..--p. noext 002/derive.ipkg similarity index 100% rename from tests/derivation/core/norec t-p.->.. w_ext 001/derive.ipkg rename to tests/derivation/core/norec t-..--p. noext 002/derive.ipkg diff --git a/tests/derivation/core/norec t-..->p. noext 002/expected b/tests/derivation/core/norec t-..--p. noext 002/expected similarity index 100% rename from tests/derivation/core/norec t-..->p. noext 002/expected rename to tests/derivation/core/norec t-..--p. noext 002/expected diff --git a/tests/derivation/core/norec t-p.->.. w_ext 001/run b/tests/derivation/core/norec t-..--p. noext 002/run similarity index 100% rename from tests/derivation/core/norec t-p.->.. w_ext 001/run rename to tests/derivation/core/norec t-..--p. noext 002/run diff --git a/tests/derivation/core/norec t-p.->.. noext 001/DerivedGen.idr b/tests/derivation/core/norec t-p.--.. noext 001/DerivedGen.idr similarity index 100% rename from tests/derivation/core/norec t-p.->.. noext 001/DerivedGen.idr rename to tests/derivation/core/norec t-p.--.. noext 001/DerivedGen.idr diff --git a/tests/derivation/core/norec t-p.->.. w_ext 002/RunDerivedGen.idr b/tests/derivation/core/norec t-p.--.. noext 001/RunDerivedGen.idr similarity index 100% rename from tests/derivation/core/norec t-p.->.. w_ext 002/RunDerivedGen.idr rename to tests/derivation/core/norec t-p.--.. noext 001/RunDerivedGen.idr diff --git a/tests/derivation/core/norec t-p.->.. w_ext 002/derive.ipkg b/tests/derivation/core/norec t-p.--.. noext 001/derive.ipkg similarity index 100% rename from tests/derivation/core/norec t-p.->.. w_ext 002/derive.ipkg rename to tests/derivation/core/norec t-p.--.. noext 001/derive.ipkg diff --git a/tests/derivation/core/norec t-p.->.. noext 001/expected b/tests/derivation/core/norec t-p.--.. noext 001/expected similarity index 100% rename from tests/derivation/core/norec t-p.->.. noext 001/expected rename to tests/derivation/core/norec t-p.--.. noext 001/expected diff --git a/tests/derivation/core/norec t-p.->.. w_ext 002/run b/tests/derivation/core/norec t-p.--.. noext 001/run similarity index 100% rename from tests/derivation/core/norec t-p.->.. w_ext 002/run rename to tests/derivation/core/norec t-p.--.. noext 001/run diff --git a/tests/derivation/core/norec t-p.->.. noext 002/DerivedGen.idr b/tests/derivation/core/norec t-p.--.. noext 002/DerivedGen.idr similarity index 100% rename from tests/derivation/core/norec t-p.->.. noext 002/DerivedGen.idr rename to tests/derivation/core/norec t-p.--.. noext 002/DerivedGen.idr diff --git a/tests/derivation/core/norec t-p.->.. w_ext 003-neg/RunDerivedGen.idr b/tests/derivation/core/norec t-p.--.. noext 002/RunDerivedGen.idr similarity index 100% rename from tests/derivation/core/norec t-p.->.. w_ext 003-neg/RunDerivedGen.idr rename to tests/derivation/core/norec t-p.--.. noext 002/RunDerivedGen.idr diff --git a/tests/derivation/core/norec t-p.->.. w_ext 003-neg/derive.ipkg b/tests/derivation/core/norec t-p.--.. noext 002/derive.ipkg similarity index 100% rename from tests/derivation/core/norec t-p.->.. w_ext 003-neg/derive.ipkg rename to tests/derivation/core/norec t-p.--.. noext 002/derive.ipkg diff --git a/tests/derivation/core/norec t-p.->.. noext 002/expected b/tests/derivation/core/norec t-p.--.. noext 002/expected similarity index 100% rename from tests/derivation/core/norec t-p.->.. noext 002/expected rename to tests/derivation/core/norec t-p.--.. noext 002/expected diff --git a/tests/derivation/core/norec t-p.->.. w_ext 003-neg/run b/tests/derivation/core/norec t-p.--.. noext 002/run similarity index 100% rename from tests/derivation/core/norec t-p.->.. w_ext 003-neg/run rename to tests/derivation/core/norec t-p.--.. noext 002/run diff --git a/tests/derivation/core/norec t-p.->.. noext 003/DerivedGen.idr b/tests/derivation/core/norec t-p.--.. noext 003/DerivedGen.idr similarity index 100% rename from tests/derivation/core/norec t-p.->.. noext 003/DerivedGen.idr rename to tests/derivation/core/norec t-p.--.. noext 003/DerivedGen.idr diff --git a/tests/derivation/core/norec t-p.->.. w_ext 004-neg/RunDerivedGen.idr b/tests/derivation/core/norec t-p.--.. noext 003/RunDerivedGen.idr similarity index 100% rename from tests/derivation/core/norec t-p.->.. w_ext 004-neg/RunDerivedGen.idr rename to tests/derivation/core/norec t-p.--.. noext 003/RunDerivedGen.idr diff --git a/tests/derivation/core/norec t-p.->.. w_ext 004-neg/derive.ipkg b/tests/derivation/core/norec t-p.--.. noext 003/derive.ipkg similarity index 100% rename from tests/derivation/core/norec t-p.->.. w_ext 004-neg/derive.ipkg rename to tests/derivation/core/norec t-p.--.. noext 003/derive.ipkg diff --git a/tests/derivation/core/norec t-p.->.. noext 003/expected b/tests/derivation/core/norec t-p.--.. noext 003/expected similarity index 100% rename from tests/derivation/core/norec t-p.->.. noext 003/expected rename to tests/derivation/core/norec t-p.--.. noext 003/expected diff --git a/tests/derivation/core/norec t-p.->.. w_ext 004-neg/run b/tests/derivation/core/norec t-p.--.. noext 003/run similarity index 100% rename from tests/derivation/core/norec t-p.->.. w_ext 004-neg/run rename to tests/derivation/core/norec t-p.--.. noext 003/run diff --git a/tests/derivation/core/norec t-p.->.. w_ext 001/DerivedGen.idr b/tests/derivation/core/norec t-p.--.. w_ext 001/DerivedGen.idr similarity index 100% rename from tests/derivation/core/norec t-p.->.. w_ext 001/DerivedGen.idr rename to tests/derivation/core/norec t-p.--.. w_ext 001/DerivedGen.idr diff --git a/tests/derivation/core/norec t-p.->.. w_ext 005/RunDerivedGen.idr b/tests/derivation/core/norec t-p.--.. w_ext 001/RunDerivedGen.idr similarity index 100% rename from tests/derivation/core/norec t-p.->.. w_ext 005/RunDerivedGen.idr rename to tests/derivation/core/norec t-p.--.. w_ext 001/RunDerivedGen.idr diff --git a/tests/derivation/core/norec t-p.->.. w_ext 005/derive.ipkg b/tests/derivation/core/norec t-p.--.. w_ext 001/derive.ipkg similarity index 100% rename from tests/derivation/core/norec t-p.->.. w_ext 005/derive.ipkg rename to tests/derivation/core/norec t-p.--.. w_ext 001/derive.ipkg diff --git a/tests/derivation/core/norec t-p.->.. w_ext 001/expected b/tests/derivation/core/norec t-p.--.. w_ext 001/expected similarity index 94% rename from tests/derivation/core/norec t-p.->.. w_ext 001/expected rename to tests/derivation/core/norec t-p.--.. w_ext 001/expected index 0e5699003..154569e26 100644 --- a/tests/derivation/core/norec t-p.->.. w_ext 001/expected +++ b/tests/derivation/core/norec t-p.--.. w_ext 001/expected @@ -2,7 +2,7 @@ 2/2: Building DerivedGen (DerivedGen.idr) Error: While processing right hand side of checkedGen. Error during reflection: Target type `a` is not a top-level data definition -DerivedGen:9:31--9:34 +DerivedGen:1 5 | %default total 6 | 7 | %language ElabReflection diff --git a/tests/derivation/core/norec t-p.->.. w_ext 005/run b/tests/derivation/core/norec t-p.--.. w_ext 001/run similarity index 100% rename from tests/derivation/core/norec t-p.->.. w_ext 005/run rename to tests/derivation/core/norec t-p.--.. w_ext 001/run diff --git a/tests/derivation/core/norec t-p.->.. w_ext 002/DerivedGen.idr b/tests/derivation/core/norec t-p.--.. w_ext 002/DerivedGen.idr similarity index 100% rename from tests/derivation/core/norec t-p.->.. w_ext 002/DerivedGen.idr rename to tests/derivation/core/norec t-p.--.. w_ext 002/DerivedGen.idr diff --git a/tests/derivation/core/norec t-p.->.. w_ext 006/RunDerivedGen.idr b/tests/derivation/core/norec t-p.--.. w_ext 002/RunDerivedGen.idr similarity index 100% rename from tests/derivation/core/norec t-p.->.. w_ext 006/RunDerivedGen.idr rename to tests/derivation/core/norec t-p.--.. w_ext 002/RunDerivedGen.idr diff --git a/tests/derivation/core/norec t-p.->.. w_ext 006/derive.ipkg b/tests/derivation/core/norec t-p.--.. w_ext 002/derive.ipkg similarity index 100% rename from tests/derivation/core/norec t-p.->.. w_ext 006/derive.ipkg rename to tests/derivation/core/norec t-p.--.. w_ext 002/derive.ipkg diff --git a/tests/derivation/core/norec t-p.->.. w_ext 002/expected b/tests/derivation/core/norec t-p.--.. w_ext 002/expected similarity index 95% rename from tests/derivation/core/norec t-p.->.. w_ext 002/expected rename to tests/derivation/core/norec t-p.--.. w_ext 002/expected index df32a565b..cd7f60e18 100644 --- a/tests/derivation/core/norec t-p.->.. w_ext 002/expected +++ b/tests/derivation/core/norec t-p.--.. w_ext 002/expected @@ -2,7 +2,7 @@ 2/2: Building DerivedGen (DerivedGen.idr) Error: While processing right hand side of checkedGen. Error during reflection: Target type `b` is not a top-level data definition -DerivedGen:9:31--9:34 +DerivedGen:1 5 | %default total 6 | 7 | %language ElabReflection diff --git a/tests/derivation/core/norec t-p.->.. w_ext 006/run b/tests/derivation/core/norec t-p.--.. w_ext 002/run similarity index 100% rename from tests/derivation/core/norec t-p.->.. w_ext 006/run rename to tests/derivation/core/norec t-p.--.. w_ext 002/run diff --git a/tests/derivation/core/norec t-p.->.. w_ext 003-neg/DerivedGen.idr b/tests/derivation/core/norec t-p.--.. w_ext 003-neg/DerivedGen.idr similarity index 100% rename from tests/derivation/core/norec t-p.->.. w_ext 003-neg/DerivedGen.idr rename to tests/derivation/core/norec t-p.--.. w_ext 003-neg/DerivedGen.idr diff --git a/tests/derivation/core/norec t-pi->.. noext 001/RunDerivedGen.idr b/tests/derivation/core/norec t-p.--.. w_ext 003-neg/RunDerivedGen.idr similarity index 100% rename from tests/derivation/core/norec t-pi->.. noext 001/RunDerivedGen.idr rename to tests/derivation/core/norec t-p.--.. w_ext 003-neg/RunDerivedGen.idr diff --git a/tests/derivation/core/norec t-pi->.. noext 001/derive.ipkg b/tests/derivation/core/norec t-p.--.. w_ext 003-neg/derive.ipkg similarity index 100% rename from tests/derivation/core/norec t-pi->.. noext 001/derive.ipkg rename to tests/derivation/core/norec t-p.--.. w_ext 003-neg/derive.ipkg diff --git a/tests/derivation/core/norec t-p.->.. w_ext 003-neg/expected b/tests/derivation/core/norec t-p.--.. w_ext 003-neg/expected similarity index 95% rename from tests/derivation/core/norec t-p.->.. w_ext 003-neg/expected rename to tests/derivation/core/norec t-p.--.. w_ext 003-neg/expected index 173ec346d..8380c3efe 100644 --- a/tests/derivation/core/norec t-p.->.. w_ext 003-neg/expected +++ b/tests/derivation/core/norec t-p.--.. w_ext 003-neg/expected @@ -2,7 +2,7 @@ 2/2: Building DerivedGen (DerivedGen.idr) Error: While processing right hand side of checkedGen. Error during reflection: All arguments of the target type must be different -DerivedGen:9:68--9:70 +DerivedGen:1 5 | %default total 6 | 7 | %language ElabReflection diff --git a/tests/derivation/core/norec t-pi->.. noext 001/run b/tests/derivation/core/norec t-p.--.. w_ext 003-neg/run similarity index 100% rename from tests/derivation/core/norec t-pi->.. noext 001/run rename to tests/derivation/core/norec t-p.--.. w_ext 003-neg/run diff --git a/tests/derivation/core/norec t-p.->.. w_ext 004-neg/DerivedGen.idr b/tests/derivation/core/norec t-p.--.. w_ext 004-neg/DerivedGen.idr similarity index 100% rename from tests/derivation/core/norec t-p.->.. w_ext 004-neg/DerivedGen.idr rename to tests/derivation/core/norec t-p.--.. w_ext 004-neg/DerivedGen.idr diff --git a/tests/derivation/core/norec t-pi->.. noext 002/RunDerivedGen.idr b/tests/derivation/core/norec t-p.--.. w_ext 004-neg/RunDerivedGen.idr similarity index 100% rename from tests/derivation/core/norec t-pi->.. noext 002/RunDerivedGen.idr rename to tests/derivation/core/norec t-p.--.. w_ext 004-neg/RunDerivedGen.idr diff --git a/tests/derivation/core/norec t-pi->.. noext 002/derive.ipkg b/tests/derivation/core/norec t-p.--.. w_ext 004-neg/derive.ipkg similarity index 100% rename from tests/derivation/core/norec t-pi->.. noext 002/derive.ipkg rename to tests/derivation/core/norec t-p.--.. w_ext 004-neg/derive.ipkg diff --git a/tests/derivation/core/norec t-p.->.. w_ext 004-neg/expected b/tests/derivation/core/norec t-p.--.. w_ext 004-neg/expected similarity index 95% rename from tests/derivation/core/norec t-p.->.. w_ext 004-neg/expected rename to tests/derivation/core/norec t-p.--.. w_ext 004-neg/expected index 30d8c3fc7..84bc89dd3 100644 --- a/tests/derivation/core/norec t-p.->.. w_ext 004-neg/expected +++ b/tests/derivation/core/norec t-p.--.. w_ext 004-neg/expected @@ -2,7 +2,7 @@ 2/2: Building DerivedGen (DerivedGen.idr) Error: While processing right hand side of checkedGen. Error during reflection: Target type's argument must be a variable name -DerivedGen:9:101--9:103 +DerivedGen:1 5 | %default total 6 | 7 | %language ElabReflection diff --git a/tests/derivation/core/norec t-pi->.. noext 002/run b/tests/derivation/core/norec t-p.--.. w_ext 004-neg/run similarity index 100% rename from tests/derivation/core/norec t-pi->.. noext 002/run rename to tests/derivation/core/norec t-p.--.. w_ext 004-neg/run diff --git a/tests/derivation/core/norec t-p.->.. w_ext 005/DerivedGen.idr b/tests/derivation/core/norec t-p.--.. w_ext 005/DerivedGen.idr similarity index 100% rename from tests/derivation/core/norec t-p.->.. w_ext 005/DerivedGen.idr rename to tests/derivation/core/norec t-p.--.. w_ext 005/DerivedGen.idr diff --git a/tests/derivation/core/norec t-pi->.. noext 003/RunDerivedGen.idr b/tests/derivation/core/norec t-p.--.. w_ext 005/RunDerivedGen.idr similarity index 100% rename from tests/derivation/core/norec t-pi->.. noext 003/RunDerivedGen.idr rename to tests/derivation/core/norec t-p.--.. w_ext 005/RunDerivedGen.idr diff --git a/tests/derivation/core/norec t-pi->.. noext 003/derive.ipkg b/tests/derivation/core/norec t-p.--.. w_ext 005/derive.ipkg similarity index 100% rename from tests/derivation/core/norec t-pi->.. noext 003/derive.ipkg rename to tests/derivation/core/norec t-p.--.. w_ext 005/derive.ipkg diff --git a/tests/derivation/core/norec t-p.->.. w_ext 005/expected b/tests/derivation/core/norec t-p.--.. w_ext 005/expected similarity index 94% rename from tests/derivation/core/norec t-p.->.. w_ext 005/expected rename to tests/derivation/core/norec t-p.--.. w_ext 005/expected index 4cd89e9c3..1455dba74 100644 --- a/tests/derivation/core/norec t-p.->.. w_ext 005/expected +++ b/tests/derivation/core/norec t-p.--.. w_ext 005/expected @@ -2,7 +2,7 @@ 2/2: Building DerivedGen (DerivedGen.idr) Error: While processing right hand side of checkedGen. Error during reflection: Target type `a` is not a top-level data definition -DerivedGen:14:31--14:34 +DerivedGen:1 10 | 11 | Show a => Show (X a) where 12 | show (MkX m) = "MkX \{show m}" diff --git a/tests/derivation/core/norec t-pi->.. noext 003/run b/tests/derivation/core/norec t-p.--.. w_ext 005/run similarity index 100% rename from tests/derivation/core/norec t-pi->.. noext 003/run rename to tests/derivation/core/norec t-p.--.. w_ext 005/run diff --git a/tests/derivation/core/norec t-p.->.. w_ext 006/DerivedGen.idr b/tests/derivation/core/norec t-p.--.. w_ext 006/DerivedGen.idr similarity index 100% rename from tests/derivation/core/norec t-p.->.. w_ext 006/DerivedGen.idr rename to tests/derivation/core/norec t-p.--.. w_ext 006/DerivedGen.idr diff --git a/tests/derivation/core/norec t-pi->.. noext 004/RunDerivedGen.idr b/tests/derivation/core/norec t-p.--.. w_ext 006/RunDerivedGen.idr similarity index 100% rename from tests/derivation/core/norec t-pi->.. noext 004/RunDerivedGen.idr rename to tests/derivation/core/norec t-p.--.. w_ext 006/RunDerivedGen.idr diff --git a/tests/derivation/core/norec t-pi->.. noext 004/derive.ipkg b/tests/derivation/core/norec t-p.--.. w_ext 006/derive.ipkg similarity index 100% rename from tests/derivation/core/norec t-pi->.. noext 004/derive.ipkg rename to tests/derivation/core/norec t-p.--.. w_ext 006/derive.ipkg diff --git a/tests/derivation/core/norec t-p.->.. w_ext 006/expected b/tests/derivation/core/norec t-p.--.. w_ext 006/expected similarity index 95% rename from tests/derivation/core/norec t-p.->.. w_ext 006/expected rename to tests/derivation/core/norec t-p.--.. w_ext 006/expected index bc1569e89..8df6a2362 100644 --- a/tests/derivation/core/norec t-p.->.. w_ext 006/expected +++ b/tests/derivation/core/norec t-p.--.. w_ext 006/expected @@ -2,7 +2,7 @@ 2/2: Building DerivedGen (DerivedGen.idr) Error: While processing right hand side of checkedGen. Error during reflection: Target type `a` is not a top-level data definition -DerivedGen:14:31--14:34 +DerivedGen:1 10 | 11 | Show a => Show b => Show (X a b) where 12 | show (MkX m) = "MkX \{show m}" diff --git a/tests/derivation/core/norec t-pi->.. noext 004/run b/tests/derivation/core/norec t-p.--.. w_ext 006/run similarity index 100% rename from tests/derivation/core/norec t-pi->.. noext 004/run rename to tests/derivation/core/norec t-p.--.. w_ext 006/run diff --git a/tests/derivation/core/norec t-pi->.. noext 001/DerivedGen.idr b/tests/derivation/core/norec t-pi--.. noext 001/DerivedGen.idr similarity index 100% rename from tests/derivation/core/norec t-pi->.. noext 001/DerivedGen.idr rename to tests/derivation/core/norec t-pi--.. noext 001/DerivedGen.idr diff --git a/tests/derivation/core/norec t-pi->.. w_ext 001-shdw/RunDerivedGen.idr b/tests/derivation/core/norec t-pi--.. noext 001/RunDerivedGen.idr similarity index 100% rename from tests/derivation/core/norec t-pi->.. w_ext 001-shdw/RunDerivedGen.idr rename to tests/derivation/core/norec t-pi--.. noext 001/RunDerivedGen.idr diff --git a/tests/derivation/core/norec t-pi->.. w_ext 001-shdw/derive.ipkg b/tests/derivation/core/norec t-pi--.. noext 001/derive.ipkg similarity index 100% rename from tests/derivation/core/norec t-pi->.. w_ext 001-shdw/derive.ipkg rename to tests/derivation/core/norec t-pi--.. noext 001/derive.ipkg diff --git a/tests/derivation/core/norec t-pi->.. noext 001/expected b/tests/derivation/core/norec t-pi--.. noext 001/expected similarity index 62% rename from tests/derivation/core/norec t-pi->.. noext 001/expected rename to tests/derivation/core/norec t-pi--.. noext 001/expected index c8ef1caae..6a22c94d4 100644 --- a/tests/derivation/core/norec t-pi->.. noext 001/expected +++ b/tests/derivation/core/norec t-pi--.. noext 001/expected @@ -1,12 +1,12 @@ 1/2: Building RunDerivedGen (RunDerivedGen.idr) 2/2: Building DerivedGen (DerivedGen.idr) -Error: While processing right hand side of checkedGen. Error during reflection: Target types with implicit type parameters are not supported yet +Error: While processing right hand side of checkedGen. Error during reflection: Target type `Builtin.(===)` is not a top-level data definition -DerivedGen:9:55--9:60 +DerivedGen:1 5 | %default total 6 | 7 | %language ElabReflection 8 | 9 | checkedGen : Fuel -> (a, b : Bool) -> Gen MaybeEmpty (a = b) - ^^^^^ + ^^^ diff --git a/tests/derivation/core/norec t-pi->.. w_ext 002/run b/tests/derivation/core/norec t-pi--.. noext 001/run similarity index 100% rename from tests/derivation/core/norec t-pi->.. w_ext 002/run rename to tests/derivation/core/norec t-pi--.. noext 001/run diff --git a/tests/derivation/core/norec t-pi->.. noext 002/DerivedGen.idr b/tests/derivation/core/norec t-pi--.. noext 002/DerivedGen.idr similarity index 100% rename from tests/derivation/core/norec t-pi->.. noext 002/DerivedGen.idr rename to tests/derivation/core/norec t-pi--.. noext 002/DerivedGen.idr diff --git a/tests/derivation/core/norec t-pi->.. w_ext 001/RunDerivedGen.idr b/tests/derivation/core/norec t-pi--.. noext 002/RunDerivedGen.idr similarity index 100% rename from tests/derivation/core/norec t-pi->.. w_ext 001/RunDerivedGen.idr rename to tests/derivation/core/norec t-pi--.. noext 002/RunDerivedGen.idr diff --git a/tests/derivation/core/norec t-pi->.. w_ext 001/derive.ipkg b/tests/derivation/core/norec t-pi--.. noext 002/derive.ipkg similarity index 100% rename from tests/derivation/core/norec t-pi->.. w_ext 001/derive.ipkg rename to tests/derivation/core/norec t-pi--.. noext 002/derive.ipkg diff --git a/tests/derivation/core/norec t-pi->.. noext 002/expected b/tests/derivation/core/norec t-pi--.. noext 002/expected similarity index 62% rename from tests/derivation/core/norec t-pi->.. noext 002/expected rename to tests/derivation/core/norec t-pi--.. noext 002/expected index 52d4b1d12..1f97edd49 100644 --- a/tests/derivation/core/norec t-pi->.. noext 002/expected +++ b/tests/derivation/core/norec t-pi--.. noext 002/expected @@ -1,12 +1,12 @@ 1/2: Building RunDerivedGen (RunDerivedGen.idr) 2/2: Building DerivedGen (DerivedGen.idr) -Error: While processing right hand side of checkedGen. Error during reflection: Target types with implicit type parameters are not supported yet +Error: While processing right hand side of checkedGen. Error during reflection: Target type `Builtin.(===)` is not a top-level data definition -DerivedGen:10:54--10:59 +DerivedGen:1 06 | 07 | %language ElabReflection 08 | 09 | export 10 | checkedGen : Fuel -> (a, b : Nat) -> Gen MaybeEmpty (a = b) - ^^^^^ + ^^^ diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-big/run b/tests/derivation/core/norec t-pi--.. noext 002/run similarity index 100% rename from tests/derivation/least-effort/print/regression/dependent-givens-big/run rename to tests/derivation/core/norec t-pi--.. noext 002/run diff --git a/tests/derivation/core/norec t-pi->.. noext 003/DerivedGen.idr b/tests/derivation/core/norec t-pi--.. noext 003/DerivedGen.idr similarity index 100% rename from tests/derivation/core/norec t-pi->.. noext 003/DerivedGen.idr rename to tests/derivation/core/norec t-pi--.. noext 003/DerivedGen.idr diff --git a/tests/derivation/core/norec t-pi->.. w_ext 002/RunDerivedGen.idr b/tests/derivation/core/norec t-pi--.. noext 003/RunDerivedGen.idr similarity index 100% rename from tests/derivation/core/norec t-pi->.. w_ext 002/RunDerivedGen.idr rename to tests/derivation/core/norec t-pi--.. noext 003/RunDerivedGen.idr diff --git a/tests/derivation/core/norec t-pi->.. w_ext 002/derive.ipkg b/tests/derivation/core/norec t-pi--.. noext 003/derive.ipkg similarity index 100% rename from tests/derivation/core/norec t-pi->.. w_ext 002/derive.ipkg rename to tests/derivation/core/norec t-pi--.. noext 003/derive.ipkg diff --git a/tests/derivation/core/norec t-pi->.. noext 003/expected b/tests/derivation/core/norec t-pi--.. noext 003/expected similarity index 77% rename from tests/derivation/core/norec t-pi->.. noext 003/expected rename to tests/derivation/core/norec t-pi--.. noext 003/expected index 5319be912..3eed7426d 100644 --- a/tests/derivation/core/norec t-pi->.. noext 003/expected +++ b/tests/derivation/core/norec t-pi--.. noext 003/expected @@ -1,8 +1,8 @@ 1/2: Building RunDerivedGen (RunDerivedGen.idr) 2/2: Building DerivedGen (DerivedGen.idr) -Error: While processing right hand side of checkedGen. Error during reflection: Named implicit applications (like to `Builtin.Equal`) are not supported yet +Error: While processing right hand side of checkedGen. Error during reflection: Usupported applications to a non-concrete type `a` -DerivedGen:17:14--17:23 +DerivedGen:1 13 | Show (X b1 b2) where 14 | show (MkX b1 b2 _) = "MkX \{show b1} \{show b2} Refl" 15 | diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-small-deep/run b/tests/derivation/core/norec t-pi--.. noext 003/run similarity index 100% rename from tests/derivation/least-effort/print/regression/dependent-givens-small-deep/run rename to tests/derivation/core/norec t-pi--.. noext 003/run diff --git a/tests/derivation/core/norec t-pi->.. noext 004/DerivedGen.idr b/tests/derivation/core/norec t-pi--.. noext 004/DerivedGen.idr similarity index 100% rename from tests/derivation/core/norec t-pi->.. noext 004/DerivedGen.idr rename to tests/derivation/core/norec t-pi--.. noext 004/DerivedGen.idr diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-big/RunDerivedGen.idr b/tests/derivation/core/norec t-pi--.. noext 004/RunDerivedGen.idr similarity index 100% rename from tests/derivation/least-effort/print/regression/dependent-givens-big/RunDerivedGen.idr rename to tests/derivation/core/norec t-pi--.. noext 004/RunDerivedGen.idr diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-big/derive.ipkg b/tests/derivation/core/norec t-pi--.. noext 004/derive.ipkg similarity index 100% rename from tests/derivation/least-effort/print/regression/dependent-givens-big/derive.ipkg rename to tests/derivation/core/norec t-pi--.. noext 004/derive.ipkg diff --git a/tests/derivation/core/norec t-pi->.. noext 004/expected b/tests/derivation/core/norec t-pi--.. noext 004/expected similarity index 77% rename from tests/derivation/core/norec t-pi->.. noext 004/expected rename to tests/derivation/core/norec t-pi--.. noext 004/expected index a0d6f2d7a..6fa52e62e 100644 --- a/tests/derivation/core/norec t-pi->.. noext 004/expected +++ b/tests/derivation/core/norec t-pi--.. noext 004/expected @@ -1,8 +1,8 @@ 1/2: Building RunDerivedGen (RunDerivedGen.idr) 2/2: Building DerivedGen (DerivedGen.idr) -Error: While processing right hand side of checkedGen. Error during reflection: Named implicit applications (like to `Builtin.Equal`) are not supported yet +Error: While processing right hand side of checkedGen. Error during reflection: Usupported applications to a non-concrete type `a` -DerivedGen:19:14--19:23 +DerivedGen:1 15 | show (X0 b1 b2 _) = "X0 \{show b1} \{show b2} Refl" 16 | show X1 = "X1" 17 | diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-small-shallow/run b/tests/derivation/core/norec t-pi--.. noext 004/run similarity index 100% rename from tests/derivation/least-effort/print/regression/dependent-givens-small-shallow/run rename to tests/derivation/core/norec t-pi--.. noext 004/run diff --git a/tests/derivation/core/norec t-pi--.. noext 005/DerivedGen.idr b/tests/derivation/core/norec t-pi--.. noext 005/DerivedGen.idr new file mode 100644 index 000000000..a96eb11d7 --- /dev/null +++ b/tests/derivation/core/norec t-pi--.. noext 005/DerivedGen.idr @@ -0,0 +1,34 @@ +module DerivedGen + +import Data.Fin + +import Deriving.Show + +import RunDerivedGen + +%default total + +%language ElabReflection + +data FinEq : Fin n -> Fin n -> Type where + Here : FinEq FZ FZ + These : {n : Nat} -> {0 i, j : Fin n} -> FinEq i j -> FinEq (FS i) (FS j) + +data X : (n : Nat) -> Fin n -> Fin n -> Type where + MkX : (i1, i2 : Fin n) -> (i1 `FinEq` i2) -> X n i1 i2 + +%hint ShowFinEq : {0 a, b : Fin n} -> Show (FinEq a b); ShowFinEq = %runElab derive + +Show (X n i1 i2) where + show $ MkX i1 i2 prf = "MkX \{show i1} \{show i2} \{show prf}" + +checkedGen : Fuel -> (n : Nat) -> (i1 : Fin n) -> (i2 : Fin n) -> Gen MaybeEmpty (X n i1 i2) +checkedGen = deriveGen + +main : IO () +main = runGs + [ G $ \fl => checkedGen fl 3 0 1 + , G $ \fl => checkedGen fl 3 1 1 + , G $ \fl => checkedGen fl 3 2 1 + , G $ \fl => checkedGen fl 3 2 2 + ] diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-small-deep/RunDerivedGen.idr b/tests/derivation/core/norec t-pi--.. noext 005/RunDerivedGen.idr similarity index 100% rename from tests/derivation/least-effort/print/regression/dependent-givens-small-deep/RunDerivedGen.idr rename to tests/derivation/core/norec t-pi--.. noext 005/RunDerivedGen.idr diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-small-deep/derive.ipkg b/tests/derivation/core/norec t-pi--.. noext 005/derive.ipkg similarity index 100% rename from tests/derivation/least-effort/print/regression/dependent-givens-small-deep/derive.ipkg rename to tests/derivation/core/norec t-pi--.. noext 005/derive.ipkg diff --git a/tests/derivation/core/norec t-pi--.. noext 005/expected b/tests/derivation/core/norec t-pi--.. noext 005/expected new file mode 100644 index 000000000..bde9b1876 --- /dev/null +++ b/tests/derivation/core/norec t-pi--.. noext 005/expected @@ -0,0 +1,47 @@ +1/2: Building RunDerivedGen (RunDerivedGen.idr) +2/2: Building DerivedGen (DerivedGen.idr) +Generated values: +----- +----- +----- +MkX 1 1 These Here +----- +MkX 1 1 These Here +----- +MkX 1 1 These Here +----- +MkX 1 1 These Here +----- +MkX 1 1 These Here +----- +MkX 1 1 These Here +----- +MkX 1 1 These Here +----- +MkX 1 1 These Here +----- +MkX 1 1 These Here +----- +MkX 1 1 These Here +----- +----- +----- +MkX 2 2 These (These Here) +----- +MkX 2 2 These (These Here) +----- +MkX 2 2 These (These Here) +----- +MkX 2 2 These (These Here) +----- +MkX 2 2 These (These Here) +----- +MkX 2 2 These (These Here) +----- +MkX 2 2 These (These Here) +----- +MkX 2 2 These (These Here) +----- +MkX 2 2 These (These Here) +----- +MkX 2 2 These (These Here) diff --git a/tests/derivation/least-effort/run/regression/dependent-givens-big/run b/tests/derivation/core/norec t-pi--.. noext 005/run similarity index 100% rename from tests/derivation/least-effort/run/regression/dependent-givens-big/run rename to tests/derivation/core/norec t-pi--.. noext 005/run diff --git a/tests/derivation/core/norec t-pi->.. w_ext 001-shdw/DerivedGen.idr b/tests/derivation/core/norec t-pi--.. w_ext 001-shdw/DerivedGen.idr similarity index 100% rename from tests/derivation/core/norec t-pi->.. w_ext 001-shdw/DerivedGen.idr rename to tests/derivation/core/norec t-pi--.. w_ext 001-shdw/DerivedGen.idr diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-small-shallow/RunDerivedGen.idr b/tests/derivation/core/norec t-pi--.. w_ext 001-shdw/RunDerivedGen.idr similarity index 100% rename from tests/derivation/least-effort/print/regression/dependent-givens-small-shallow/RunDerivedGen.idr rename to tests/derivation/core/norec t-pi--.. w_ext 001-shdw/RunDerivedGen.idr diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-small-shallow/derive.ipkg b/tests/derivation/core/norec t-pi--.. w_ext 001-shdw/derive.ipkg similarity index 100% rename from tests/derivation/least-effort/print/regression/dependent-givens-small-shallow/derive.ipkg rename to tests/derivation/core/norec t-pi--.. w_ext 001-shdw/derive.ipkg diff --git a/tests/derivation/core/norec t-pi->.. w_ext 001-shdw/dont-run b/tests/derivation/core/norec t-pi--.. w_ext 001-shdw/dont-run similarity index 100% rename from tests/derivation/core/norec t-pi->.. w_ext 001-shdw/dont-run rename to tests/derivation/core/norec t-pi--.. w_ext 001-shdw/dont-run diff --git a/tests/derivation/core/norec t-pi->.. w_ext 001-shdw/expected b/tests/derivation/core/norec t-pi--.. w_ext 001-shdw/expected similarity index 100% rename from tests/derivation/core/norec t-pi->.. w_ext 001-shdw/expected rename to tests/derivation/core/norec t-pi--.. w_ext 001-shdw/expected diff --git a/tests/derivation/core/norec t-pi->.. w_ext 001/DerivedGen.idr b/tests/derivation/core/norec t-pi--.. w_ext 001/DerivedGen.idr similarity index 100% rename from tests/derivation/core/norec t-pi->.. w_ext 001/DerivedGen.idr rename to tests/derivation/core/norec t-pi--.. w_ext 001/DerivedGen.idr diff --git a/tests/derivation/least-effort/run/regression/dependent-givens-big/RunDerivedGen.idr b/tests/derivation/core/norec t-pi--.. w_ext 001/RunDerivedGen.idr similarity index 100% rename from tests/derivation/least-effort/run/regression/dependent-givens-big/RunDerivedGen.idr rename to tests/derivation/core/norec t-pi--.. w_ext 001/RunDerivedGen.idr diff --git a/tests/derivation/least-effort/run/regression/dependent-givens-big/derive.ipkg b/tests/derivation/core/norec t-pi--.. w_ext 001/derive.ipkg similarity index 100% rename from tests/derivation/least-effort/run/regression/dependent-givens-big/derive.ipkg rename to tests/derivation/core/norec t-pi--.. w_ext 001/derive.ipkg diff --git a/tests/derivation/core/norec t-pi->.. w_ext 001/dont-run b/tests/derivation/core/norec t-pi--.. w_ext 001/dont-run similarity index 100% rename from tests/derivation/core/norec t-pi->.. w_ext 001/dont-run rename to tests/derivation/core/norec t-pi--.. w_ext 001/dont-run diff --git a/tests/derivation/core/norec t-pi->.. w_ext 001/expected b/tests/derivation/core/norec t-pi--.. w_ext 001/expected similarity index 100% rename from tests/derivation/core/norec t-pi->.. w_ext 001/expected rename to tests/derivation/core/norec t-pi--.. w_ext 001/expected diff --git a/tests/derivation/core/norec t-pi->.. w_ext 002/DerivedGen.idr b/tests/derivation/core/norec t-pi--.. w_ext 002/DerivedGen.idr similarity index 100% rename from tests/derivation/core/norec t-pi->.. w_ext 002/DerivedGen.idr rename to tests/derivation/core/norec t-pi--.. w_ext 002/DerivedGen.idr diff --git a/tests/derivation/least-effort/run/regression/dependent-givens-small-deep/RunDerivedGen.idr b/tests/derivation/core/norec t-pi--.. w_ext 002/RunDerivedGen.idr similarity index 100% rename from tests/derivation/least-effort/run/regression/dependent-givens-small-deep/RunDerivedGen.idr rename to tests/derivation/core/norec t-pi--.. w_ext 002/RunDerivedGen.idr diff --git a/tests/derivation/least-effort/run/regression/dependent-givens-small-deep/derive.ipkg b/tests/derivation/core/norec t-pi--.. w_ext 002/derive.ipkg similarity index 100% rename from tests/derivation/least-effort/run/regression/dependent-givens-small-deep/derive.ipkg rename to tests/derivation/core/norec t-pi--.. w_ext 002/derive.ipkg diff --git a/tests/derivation/core/norec t-pi->.. w_ext 002/expected b/tests/derivation/core/norec t-pi--.. w_ext 002/expected similarity index 62% rename from tests/derivation/core/norec t-pi->.. w_ext 002/expected rename to tests/derivation/core/norec t-pi--.. w_ext 002/expected index 9be5757c4..1e6b93fa5 100644 --- a/tests/derivation/core/norec t-pi->.. w_ext 002/expected +++ b/tests/derivation/core/norec t-pi--.. w_ext 002/expected @@ -1,12 +1,12 @@ 1/2: Building RunDerivedGen (RunDerivedGen.idr) 2/2: Building DerivedGen (DerivedGen.idr) -Error: While processing right hand side of checkedGen. Error during reflection: Target types with implicit type parameters are not supported yet +Error: While processing right hand side of checkedGen. Error during reflection: Target type `Builtin.(===)` is not a top-level data definition -DerivedGen:9:63--9:68 +DerivedGen:1 5 | %default total 6 | 7 | %language ElabReflection 8 | 9 | checkedGen : DecEq a => Fuel -> (x, y : a) -> Gen MaybeEmpty (x = y) - ^^^^^ + ^^^ diff --git a/tests/derivation/least-effort/run/regression/dependent-givens-small-deep/run b/tests/derivation/core/norec t-pi--.. w_ext 002/run similarity index 100% rename from tests/derivation/least-effort/run/regression/dependent-givens-small-deep/run rename to tests/derivation/core/norec t-pi--.. w_ext 002/run diff --git a/tests/derivation/core/norec t-pi--.. w_ext 003/DerivedGen.idr b/tests/derivation/core/norec t-pi--.. w_ext 003/DerivedGen.idr new file mode 100644 index 000000000..292c17f63 --- /dev/null +++ b/tests/derivation/core/norec t-pi--.. w_ext 003/DerivedGen.idr @@ -0,0 +1,41 @@ +module DerivedGen + +import Data.Fin + +import Deriving.Show + +import RunDerivedGen + +%default total + +%language ElabReflection + +data FinEq : Fin n -> Fin n -> Type where + Here : FinEq FZ FZ + These : FinEq n m -> FinEq (FS n) (FS m) + +data X : (n : Nat) -> Fin n -> Fin n -> Type where + MkX : (i1, i2 : Fin n) -> (i1 `FinEq` i2) -> X n i1 i2 + +%hint ShowFinEq : {0 a, b : Fin n} -> Show (FinEq a b); ShowFinEq = %runElab derive + +Show (X n i1 i2) where + show $ MkX i1 i2 prf = "MkX \{show i1} \{show i2} \{show prf}" + +checkedGen : Fuel -> (Fuel -> {n : Nat} -> (i1, i2 : Fin n) -> Gen MaybeEmpty $ FinEq i1 i2) => + (n : Nat) -> (i1 : Fin n) -> (i2 : Fin n) -> Gen MaybeEmpty (X n i1 i2) +checkedGen = deriveGen + +genFinEq : Fuel -> {n : Nat} -> (i1, i2 : Fin n) -> Gen MaybeEmpty $ FinEq i1 i2 +genFinEq _ FZ FZ = pure Here +genFinEq fl (FS y) (FS z) = These <$> genFinEq fl y z +genFinEq _ FZ (FS _) = empty +genFinEq _ (FS _) FZ = empty + +main : IO () +main = runGs + [ G $ \fl => checkedGen @{genFinEq} fl 3 0 1 + , G $ \fl => checkedGen @{genFinEq} fl 3 1 1 + , G $ \fl => checkedGen @{genFinEq} fl 3 2 1 + , G $ \fl => checkedGen @{genFinEq} fl 3 2 2 + ] diff --git a/tests/derivation/least-effort/run/regression/dependent-givens-small-shallow/RunDerivedGen.idr b/tests/derivation/core/norec t-pi--.. w_ext 003/RunDerivedGen.idr similarity index 100% rename from tests/derivation/least-effort/run/regression/dependent-givens-small-shallow/RunDerivedGen.idr rename to tests/derivation/core/norec t-pi--.. w_ext 003/RunDerivedGen.idr diff --git a/tests/derivation/least-effort/run/regression/dependent-givens-small-shallow/derive.ipkg b/tests/derivation/core/norec t-pi--.. w_ext 003/derive.ipkg similarity index 100% rename from tests/derivation/least-effort/run/regression/dependent-givens-small-shallow/derive.ipkg rename to tests/derivation/core/norec t-pi--.. w_ext 003/derive.ipkg diff --git a/tests/derivation/core/norec t-pi--.. w_ext 003/expected b/tests/derivation/core/norec t-pi--.. w_ext 003/expected new file mode 100644 index 000000000..bde9b1876 --- /dev/null +++ b/tests/derivation/core/norec t-pi--.. w_ext 003/expected @@ -0,0 +1,47 @@ +1/2: Building RunDerivedGen (RunDerivedGen.idr) +2/2: Building DerivedGen (DerivedGen.idr) +Generated values: +----- +----- +----- +MkX 1 1 These Here +----- +MkX 1 1 These Here +----- +MkX 1 1 These Here +----- +MkX 1 1 These Here +----- +MkX 1 1 These Here +----- +MkX 1 1 These Here +----- +MkX 1 1 These Here +----- +MkX 1 1 These Here +----- +MkX 1 1 These Here +----- +MkX 1 1 These Here +----- +----- +----- +MkX 2 2 These (These Here) +----- +MkX 2 2 These (These Here) +----- +MkX 2 2 These (These Here) +----- +MkX 2 2 These (These Here) +----- +MkX 2 2 These (These Here) +----- +MkX 2 2 These (These Here) +----- +MkX 2 2 These (These Here) +----- +MkX 2 2 These (These Here) +----- +MkX 2 2 These (These Here) +----- +MkX 2 2 These (These Here) diff --git a/tests/derivation/least-effort/run/regression/dependent-givens-small-shallow/run b/tests/derivation/core/norec t-pi--.. w_ext 003/run similarity index 100% rename from tests/derivation/least-effort/run/regression/dependent-givens-small-shallow/run rename to tests/derivation/core/norec t-pi--.. w_ext 003/run diff --git a/tests/derivation/core/tests-roadmap b/tests/derivation/core/tests-roadmap index 0365096d1..dbc926dd9 100644 --- a/tests/derivation/core/tests-roadmap +++ b/tests/derivation/core/tests-roadmap @@ -17,6 +17,8 @@ Independent metrics: - type indices (GADTs) (i) - use of external generators (noext, ext) +`->` is replaced by `--` for compatibility with Windows file naming rules. + ------------------------ --- Particular cases --- ------------------------ diff --git a/tests/derivation/core/trivial 002-neg/expected b/tests/derivation/core/trivial 002-neg/expected index 10448de01..d92bf5e1c 100644 --- a/tests/derivation/core/trivial 002-neg/expected +++ b/tests/derivation/core/trivial 002-neg/expected @@ -2,7 +2,7 @@ 2/2: Building DerivedGen (DerivedGen.idr) Error: While processing right hand side of checkedGen. Error during reflection: No constructors found for the type `Builtin.Void` -DerivedGen:10:14--10:23 +DerivedGen:1 06 | 07 | %language ElabReflection 08 | diff --git a/tests/derivation/core/trivial 003-neg/expected b/tests/derivation/core/trivial 003-neg/expected index c1cbf2086..5b0bf9df8 100644 --- a/tests/derivation/core/trivial 003-neg/expected +++ b/tests/derivation/core/trivial 003-neg/expected @@ -2,7 +2,7 @@ 2/2: Building DerivedGen (DerivedGen.idr) Error: While processing right hand side of checkedGen. Error during reflection: Target type of a derived `Gen` cannot be a `Gen` -DerivedGen:13:14--13:23 +DerivedGen:1 09 | Show (x ** Gen MaybeEmpty x) where 10 | show _ = "a generator" 11 | diff --git a/tests/derivation/core/trivial 004-neg/expected b/tests/derivation/core/trivial 004-neg/expected index cbcf2bcba..a50e131d3 100644 --- a/tests/derivation/core/trivial 004-neg/expected +++ b/tests/derivation/core/trivial 004-neg/expected @@ -2,7 +2,7 @@ 2/2: Building DerivedGen (DerivedGen.idr) Error: While processing right hand side of checkedGen. Error during reflection: Target type of a derived `Gen` cannot be a `Gen` -DerivedGen:13:14--13:23 +DerivedGen:1 09 | Show (Gen em x) where 10 | show _ = "a generator" 11 | diff --git a/tests/derivation/core/typealias con 003-neg/expected b/tests/derivation/core/typealias con 003-neg/expected index 98eba5a17..425e0a9b5 100644 --- a/tests/derivation/core/typealias con 003-neg/expected +++ b/tests/derivation/core/typealias con 003-neg/expected @@ -1,8 +1,8 @@ 1/2: Building RunDerivedGen (RunDerivedGen.idr) 2/2: Building DerivedGen (DerivedGen.idr) -Error: While processing right hand side of checkedGen. Error during reflection: Only applications to non-polymorphic type constructors are supported at the moment, we found `DerivedGen.NonReducibleUseTypeAlias` +Error: While processing right hand side of checkedGen. Error during reflection: Data type `DerivedGen.NonReducibleUseTypeAlias` is unavailable at the site of derivation (forgotten import?) -DerivedGen:16:22--16:46 +DerivedGen:1 12 | 13 | data X : Type where 14 | X0 : X diff --git a/tests/derivation/distribution/dependent-rec-001/CheckDistribution.idr b/tests/derivation/distribution/dependent-rec-001/CheckDistribution.idr index 73c0034c0..37e9de804 100644 --- a/tests/derivation/distribution/dependent-rec-001/CheckDistribution.idr +++ b/tests/derivation/distribution/dependent-rec-001/CheckDistribution.idr @@ -6,8 +6,6 @@ import DistrCheckCommon %default total -%hint DA : ConstructorDerivator; DA = LeastEffort - data ListNat : Type data Constraint : ListNat -> Type diff --git a/tests/derivation/distribution/dependent-rec-002/CheckDistribution.idr b/tests/derivation/distribution/dependent-rec-002/CheckDistribution.idr index 9e6d20b9e..e9e899319 100644 --- a/tests/derivation/distribution/dependent-rec-002/CheckDistribution.idr +++ b/tests/derivation/distribution/dependent-rec-002/CheckDistribution.idr @@ -6,8 +6,6 @@ import DistrCheckCommon %default total -%hint DA : ConstructorDerivator; DA = LeastEffort - data ListNat : Type data Constraint : Nat -> ListNat -> Type diff --git a/tests/derivation/distribution/list-nat-001/CheckDistribution.idr b/tests/derivation/distribution/list-nat-001/CheckDistribution.idr index 0035f502a..44b09fec5 100644 --- a/tests/derivation/distribution/list-nat-001/CheckDistribution.idr +++ b/tests/derivation/distribution/list-nat-001/CheckDistribution.idr @@ -8,8 +8,6 @@ import DistrCheckCommon %language ElabReflection -%hint DA : ConstructorDerivator; DA = LeastEffort - data ListNat : Type where Nil : ListNat (::) : Nat -> ListNat -> ListNat diff --git a/tests/derivation/distribution/list-nat-002/CheckDistribution.idr b/tests/derivation/distribution/list-nat-002/CheckDistribution.idr index f2a62104c..802d10a1a 100644 --- a/tests/derivation/distribution/list-nat-002/CheckDistribution.idr +++ b/tests/derivation/distribution/list-nat-002/CheckDistribution.idr @@ -8,8 +8,6 @@ import DistrCheckCommon %language ElabReflection -%hint DA : ConstructorDerivator; DA = LeastEffort - data ListNat : Type where Nil : ListNat (::) : Nat -> ListNat -> ListNat diff --git a/tests/derivation/distribution/nats-001/CheckDistribution.idr b/tests/derivation/distribution/nats-001/CheckDistribution.idr index 268ab2b5a..53f7da95a 100644 --- a/tests/derivation/distribution/nats-001/CheckDistribution.idr +++ b/tests/derivation/distribution/nats-001/CheckDistribution.idr @@ -8,8 +8,6 @@ import DistrCheckCommon %language ElabReflection -%hint DA : ConstructorDerivator; DA = LeastEffort - nats : Fuel -> Gen MaybeEmpty Nat nats = deriveGen diff --git a/tests/derivation/distribution/vect-nat-001/CheckDistribution.idr b/tests/derivation/distribution/vect-nat-001/CheckDistribution.idr index fd2293465..1910d9140 100644 --- a/tests/derivation/distribution/vect-nat-001/CheckDistribution.idr +++ b/tests/derivation/distribution/vect-nat-001/CheckDistribution.idr @@ -8,8 +8,6 @@ import DistrCheckCommon %language ElabReflection -%hint DA : ConstructorDerivator; DA = LeastEffort - data VectNat : Nat -> Type where Nil : VectNat Z (::) : Nat -> VectNat n -> VectNat (S n) diff --git a/tests/derivation/infra/empty-body print 001/DerivedGen.idr b/tests/derivation/infra/empty-body print 001/DerivedGen.idr index 707762202..4a128870f 100644 --- a/tests/derivation/infra/empty-body print 001/DerivedGen.idr +++ b/tests/derivation/infra/empty-body print 001/DerivedGen.idr @@ -1,10 +1,12 @@ module DerivedGen import AlternativeCore -import PrintDerivation + +import Deriving.DepTyCheck.Gen %default total %language ElabReflection -%runElab printDerived @{EmptyBody} $ Fuel -> Gen MaybeEmpty Unit +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{EmptyBody} $ Fuel -> Gen MaybeEmpty Unit diff --git a/tests/derivation/infra/empty-body print 001/PrintDerivation.idr b/tests/derivation/infra/empty-body print 001/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/infra/empty-body print 001/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/infra/empty-body print 001/expected b/tests/derivation/infra/empty-body print 001/expected index c81b9d826..71e4419a3 100644 --- a/tests/derivation/infra/empty-body print 001/expected +++ b/tests/derivation/infra/empty-body print 001/expected @@ -1,8 +1,6 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> Gen MaybeEmpty () -LOG gen.auto.derive.infra:0: +1/2: Building AlternativeCore (AlternativeCore.idr) +2/2: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> Gen MaybeEmpty () MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> local { decls = diff --git a/tests/derivation/infra/empty-body print 002/DerivedGen.idr b/tests/derivation/infra/empty-body print 002/DerivedGen.idr index 6ccb1ca49..608697535 100644 --- a/tests/derivation/infra/empty-body print 002/DerivedGen.idr +++ b/tests/derivation/infra/empty-body print 002/DerivedGen.idr @@ -1,7 +1,8 @@ module DerivedGen import AlternativeCore -import PrintDerivation + +import Deriving.DepTyCheck.Gen import Data.Vect @@ -9,4 +10,5 @@ import Data.Vect %language ElabReflection -%runElab printDerived @{EmptyBody} $ Fuel -> (n : Nat) -> (a : Type) -> Gen MaybeEmpty (Vect n a) +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{EmptyBody} $ Fuel -> (n : Nat) -> (a : Type) -> Gen MaybeEmpty (Vect n a) diff --git a/tests/derivation/infra/empty-body print 002/PrintDerivation.idr b/tests/derivation/infra/empty-body print 002/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/infra/empty-body print 002/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/infra/empty-body print 002/expected b/tests/derivation/infra/empty-body print 002/expected index 8f69d0170..1fcb35f76 100644 --- a/tests/derivation/infra/empty-body print 002/expected +++ b/tests/derivation/infra/empty-body print 002/expected @@ -1,8 +1,6 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> (n : Nat) -> (a : Type) -> Gen MaybeEmpty (Vect n a) -LOG gen.auto.derive.infra:0: +1/2: Building AlternativeCore (AlternativeCore.idr) +2/2: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> (n : Nat) -> (a : Type) -> Gen MaybeEmpty (Vect n a) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue diff --git a/tests/derivation/infra/empty-body print 003/DerivedGen.idr b/tests/derivation/infra/empty-body print 003/DerivedGen.idr index 338a29b65..4736fff83 100644 --- a/tests/derivation/infra/empty-body print 003/DerivedGen.idr +++ b/tests/derivation/infra/empty-body print 003/DerivedGen.idr @@ -1,7 +1,8 @@ module DerivedGen import AlternativeCore -import PrintDerivation + +import Deriving.DepTyCheck.Gen import Data.Vect @@ -9,4 +10,5 @@ import Data.Vect %language ElabReflection -%runElab printDerived @{EmptyBody} $ Fuel -> (Fuel -> Gen MaybeEmpty Nat) => Gen MaybeEmpty Bool +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{EmptyBody} $ Fuel -> (Fuel -> Gen MaybeEmpty Nat) => Gen MaybeEmpty Bool diff --git a/tests/derivation/infra/empty-body print 003/PrintDerivation.idr b/tests/derivation/infra/empty-body print 003/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/infra/empty-body print 003/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/infra/empty-body print 003/expected b/tests/derivation/infra/empty-body print 003/expected index 53dd5fcfe..bc50b25ec 100644 --- a/tests/derivation/infra/empty-body print 003/expected +++ b/tests/derivation/infra/empty-body print 003/expected @@ -1,8 +1,6 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> {auto conArg : ((arg : Fuel) -> Gen MaybeEmpty Nat)} -> Gen MaybeEmpty Bool -LOG gen.auto.derive.infra:0: +1/2: Building AlternativeCore (AlternativeCore.idr) +2/2: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> {auto conArg : ((arg : Fuel) -> Gen MaybeEmpty Nat)} -> Gen MaybeEmpty Bool MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW diff --git a/tests/derivation/infra/empty-body print 004/DerivedGen.idr b/tests/derivation/infra/empty-body print 004/DerivedGen.idr index 00548c40b..6c981ad1d 100644 --- a/tests/derivation/infra/empty-body print 004/DerivedGen.idr +++ b/tests/derivation/infra/empty-body print 004/DerivedGen.idr @@ -1,7 +1,8 @@ module DerivedGen import AlternativeCore -import PrintDerivation + +import Deriving.DepTyCheck.Gen %default total @@ -10,4 +11,5 @@ import PrintDerivation data X : Nat -> Type where MkX : X n -%runElab printDerived @{EmptyBody} $ Fuel -> (n : Nat) -> Gen MaybeEmpty (X n) +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{EmptyBody} $ Fuel -> (n : Nat) -> Gen MaybeEmpty (X n) diff --git a/tests/derivation/infra/empty-body print 004/PrintDerivation.idr b/tests/derivation/infra/empty-body print 004/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/infra/empty-body print 004/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/infra/empty-body print 004/expected b/tests/derivation/infra/empty-body print 004/expected index 6998286dc..3656c1094 100644 --- a/tests/derivation/infra/empty-body print 004/expected +++ b/tests/derivation/infra/empty-body print 004/expected @@ -1,8 +1,6 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> (n : Nat) -> Gen MaybeEmpty (X n) -LOG gen.auto.derive.infra:0: +1/2: Building AlternativeCore (AlternativeCore.idr) +2/2: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> (n : Nat) -> Gen MaybeEmpty (X n) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue .=> local diff --git a/tests/derivation/infra/empty-body print 005/DerivedGen.idr b/tests/derivation/infra/empty-body print 005/DerivedGen.idr index 697beb796..3ee2ecbd5 100644 --- a/tests/derivation/infra/empty-body print 005/DerivedGen.idr +++ b/tests/derivation/infra/empty-body print 005/DerivedGen.idr @@ -1,7 +1,8 @@ module DerivedGen import AlternativeCore -import PrintDerivation + +import Deriving.DepTyCheck.Gen %default total @@ -10,4 +11,5 @@ import PrintDerivation data X : Nat -> Type where MkX : X n -%runElab printDerived @{EmptyBody} $ Fuel -> Gen MaybeEmpty (n : Nat ** X n) +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{EmptyBody} $ Fuel -> Gen MaybeEmpty (n : Nat ** X n) diff --git a/tests/derivation/infra/empty-body print 005/PrintDerivation.idr b/tests/derivation/infra/empty-body print 005/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/infra/empty-body print 005/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/infra/empty-body print 005/expected b/tests/derivation/infra/empty-body print 005/expected index 899db2799..7bc0c78ca 100644 --- a/tests/derivation/infra/empty-body print 005/expected +++ b/tests/derivation/infra/empty-body print 005/expected @@ -1,8 +1,6 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> Gen MaybeEmpty (n : Nat ** X n) -LOG gen.auto.derive.infra:0: +1/2: Building AlternativeCore (AlternativeCore.idr) +2/2: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> Gen MaybeEmpty (n : Nat ** X n) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> local { decls = diff --git a/tests/derivation/infra/empty-body print 006/DerivedGen.idr b/tests/derivation/infra/empty-body print 006/DerivedGen.idr index 000763bd5..3cc007dfe 100644 --- a/tests/derivation/infra/empty-body print 006/DerivedGen.idr +++ b/tests/derivation/infra/empty-body print 006/DerivedGen.idr @@ -1,7 +1,8 @@ module DerivedGen import AlternativeCore -import PrintDerivation + +import Deriving.DepTyCheck.Gen import Data.Vect @@ -9,4 +10,5 @@ import Data.Vect %language ElabReflection -%runElab printDerived @{EmptyBody} $ Fuel -> (a : Type) -> Gen MaybeEmpty (n : Nat ** Vect n a) +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{EmptyBody} $ Fuel -> (a : Type) -> Gen MaybeEmpty (n : Nat ** Vect n a) diff --git a/tests/derivation/infra/empty-body print 006/PrintDerivation.idr b/tests/derivation/infra/empty-body print 006/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/infra/empty-body print 006/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/infra/empty-body print 006/expected b/tests/derivation/infra/empty-body print 006/expected index 04ad08858..e5c8b0818 100644 --- a/tests/derivation/infra/empty-body print 006/expected +++ b/tests/derivation/infra/empty-body print 006/expected @@ -1,8 +1,6 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> (a : Type) -> Gen MaybeEmpty (n : Nat ** Vect n a) -LOG gen.auto.derive.infra:0: +1/2: Building AlternativeCore (AlternativeCore.idr) +2/2: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> (a : Type) -> Gen MaybeEmpty (n : Nat ** Vect n a) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue .=> local diff --git a/tests/derivation/infra/empty-body print 007/DerivedGen.idr b/tests/derivation/infra/empty-body print 007/DerivedGen.idr index 5e89f1f16..e331d8454 100644 --- a/tests/derivation/infra/empty-body print 007/DerivedGen.idr +++ b/tests/derivation/infra/empty-body print 007/DerivedGen.idr @@ -1,7 +1,8 @@ module DerivedGen import AlternativeCore -import PrintDerivation + +import Deriving.DepTyCheck.Gen %default total @@ -11,4 +12,5 @@ data X : Nat -> Bool -> Type where X0 : X 0 True X1 : X 1 False -%runElab printDerived @{EmptyBody} $ Fuel -> Gen MaybeEmpty (n : Nat ** b : Bool ** X n b) +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{EmptyBody} $ Fuel -> Gen MaybeEmpty (n : Nat ** b : Bool ** X n b) diff --git a/tests/derivation/infra/empty-body print 007/PrintDerivation.idr b/tests/derivation/infra/empty-body print 007/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/infra/empty-body print 007/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/infra/empty-body print 007/expected b/tests/derivation/infra/empty-body print 007/expected index 964edff1e..6414736b2 100644 --- a/tests/derivation/infra/empty-body print 007/expected +++ b/tests/derivation/infra/empty-body print 007/expected @@ -1,8 +1,6 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> Gen MaybeEmpty (n : Nat ** (b : Bool ** X n b)) -LOG gen.auto.derive.infra:0: +1/2: Building AlternativeCore (AlternativeCore.idr) +2/2: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> Gen MaybeEmpty (n : Nat ** (b : Bool ** X n b)) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> local { decls = diff --git a/tests/derivation/infra/empty-body print 008/DerivedGen.idr b/tests/derivation/infra/empty-body print 008/DerivedGen.idr index ffc8df140..7a5dc3b10 100644 --- a/tests/derivation/infra/empty-body print 008/DerivedGen.idr +++ b/tests/derivation/infra/empty-body print 008/DerivedGen.idr @@ -1,7 +1,8 @@ module DerivedGen import AlternativeCore -import PrintDerivation + +import Deriving.DepTyCheck.Gen import Data.Vect @@ -9,4 +10,5 @@ import Data.Vect %language ElabReflection -%runElab printDerived @{EmptyBody} $ Fuel -> Gen MaybeEmpty (n : Nat ** a : Type ** Vect n a) +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{EmptyBody} $ Fuel -> Gen MaybeEmpty (n : Nat ** a : Type ** Vect n a) diff --git a/tests/derivation/infra/empty-body print 008/PrintDerivation.idr b/tests/derivation/infra/empty-body print 008/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/infra/empty-body print 008/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/infra/empty-body print 008/expected b/tests/derivation/infra/empty-body print 008/expected index ad829c609..6aa83e147 100644 --- a/tests/derivation/infra/empty-body print 008/expected +++ b/tests/derivation/infra/empty-body print 008/expected @@ -1,8 +1,6 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> Gen MaybeEmpty (n : Nat ** (a : Type ** Vect n a)) -LOG gen.auto.derive.infra:0: +1/2: Building AlternativeCore (AlternativeCore.idr) +2/2: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> Gen MaybeEmpty (n : Nat ** (a : Type ** Vect n a)) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> local { decls = diff --git a/tests/derivation/infra/empty-body run 001/DerivedGen.idr b/tests/derivation/infra/empty-body run 001/DerivedGen.idr index 179fb5889..11601bc34 100644 --- a/tests/derivation/infra/empty-body run 001/DerivedGen.idr +++ b/tests/derivation/infra/empty-body run 001/DerivedGen.idr @@ -1,6 +1,8 @@ module DerivedGen import AlternativeCore + +import Deriving.DepTyCheck.Gen import RunDerivedGen %default total diff --git a/tests/derivation/infra/empty-body run 002/DerivedGen.idr b/tests/derivation/infra/empty-body run 002/DerivedGen.idr index a183f8a1d..aa30d7074 100644 --- a/tests/derivation/infra/empty-body run 002/DerivedGen.idr +++ b/tests/derivation/infra/empty-body run 002/DerivedGen.idr @@ -1,6 +1,8 @@ module DerivedGen import AlternativeCore + +import Deriving.DepTyCheck.Gen import RunDerivedGen %default total diff --git a/tests/derivation/infra/empty-body run 003/DerivedGen.idr b/tests/derivation/infra/empty-body run 003/DerivedGen.idr index ec915a6e1..31454d85f 100644 --- a/tests/derivation/infra/empty-body run 003/DerivedGen.idr +++ b/tests/derivation/infra/empty-body run 003/DerivedGen.idr @@ -1,6 +1,8 @@ module DerivedGen import AlternativeCore + +import Deriving.DepTyCheck.Gen import RunDerivedGen %default total diff --git a/tests/derivation/infra/empty-body run 004/DerivedGen.idr b/tests/derivation/infra/empty-body run 004/DerivedGen.idr index 08d11cf91..7b0724d27 100644 --- a/tests/derivation/infra/empty-body run 004/DerivedGen.idr +++ b/tests/derivation/infra/empty-body run 004/DerivedGen.idr @@ -1,6 +1,8 @@ module DerivedGen import AlternativeCore + +import Deriving.DepTyCheck.Gen import RunDerivedGen %default total diff --git a/tests/derivation/infra/empty-body run 005/DerivedGen.idr b/tests/derivation/infra/empty-body run 005/DerivedGen.idr index 4255d61e0..52b09c0ec 100644 --- a/tests/derivation/infra/empty-body run 005/DerivedGen.idr +++ b/tests/derivation/infra/empty-body run 005/DerivedGen.idr @@ -1,6 +1,8 @@ module DerivedGen import AlternativeCore + +import Deriving.DepTyCheck.Gen import RunDerivedGen %default total diff --git a/tests/derivation/infra/empty-body run 006/DerivedGen.idr b/tests/derivation/infra/empty-body run 006/DerivedGen.idr index 3bdc005f3..19feea850 100644 --- a/tests/derivation/infra/empty-body run 006/DerivedGen.idr +++ b/tests/derivation/infra/empty-body run 006/DerivedGen.idr @@ -1,6 +1,8 @@ module DerivedGen import AlternativeCore + +import Deriving.DepTyCheck.Gen import RunDerivedGen %default total diff --git a/tests/derivation/infra/empty-body run 007/DerivedGen.idr b/tests/derivation/infra/empty-body run 007/DerivedGen.idr index 2bf934cf6..39c78a5f5 100644 --- a/tests/derivation/infra/empty-body run 007/DerivedGen.idr +++ b/tests/derivation/infra/empty-body run 007/DerivedGen.idr @@ -1,6 +1,8 @@ module DerivedGen import AlternativeCore + +import Deriving.DepTyCheck.Gen import RunDerivedGen import Data.Vect diff --git a/tests/derivation/infra/empty-body run 008/DerivedGen.idr b/tests/derivation/infra/empty-body run 008/DerivedGen.idr index 223e89e4e..9794ffbdf 100644 --- a/tests/derivation/infra/empty-body run 008/DerivedGen.idr +++ b/tests/derivation/infra/empty-body run 008/DerivedGen.idr @@ -1,6 +1,8 @@ module DerivedGen import AlternativeCore + +import Deriving.DepTyCheck.Gen import RunDerivedGen import Data.Vect diff --git a/tests/derivation/infra/empty-body run 009/DerivedGen.idr b/tests/derivation/infra/empty-body run 009/DerivedGen.idr index 72970a807..7a4c97d2f 100644 --- a/tests/derivation/infra/empty-body run 009/DerivedGen.idr +++ b/tests/derivation/infra/empty-body run 009/DerivedGen.idr @@ -1,6 +1,8 @@ module DerivedGen import AlternativeCore + +import Deriving.DepTyCheck.Gen import RunDerivedGen import Data.Vect diff --git a/tests/derivation/infra/empty-body run 010/DerivedGen.idr b/tests/derivation/infra/empty-body run 010/DerivedGen.idr index 6ba0dafe0..03af4c547 100644 --- a/tests/derivation/infra/empty-body run 010/DerivedGen.idr +++ b/tests/derivation/infra/empty-body run 010/DerivedGen.idr @@ -1,6 +1,8 @@ module DerivedGen import AlternativeCore + +import Deriving.DepTyCheck.Gen import RunDerivedGen import Data.Vect diff --git a/tests/derivation/infra/empty-cons print 001/DerivedGen.idr b/tests/derivation/infra/empty-cons print 001/DerivedGen.idr index 174aa2f99..812400639 100644 --- a/tests/derivation/infra/empty-cons print 001/DerivedGen.idr +++ b/tests/derivation/infra/empty-cons print 001/DerivedGen.idr @@ -1,10 +1,12 @@ module DerivedGen import AlternativeCore -import PrintDerivation + +import Deriving.DepTyCheck.Gen %default total %language ElabReflection -%runElab printDerived @{EmptyCons} $ Fuel -> Gen MaybeEmpty Unit +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{EmptyCons} $ Fuel -> Gen MaybeEmpty Unit diff --git a/tests/derivation/infra/empty-cons print 001/PrintDerivation.idr b/tests/derivation/infra/empty-cons print 001/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/infra/empty-cons print 001/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/infra/empty-cons print 001/expected b/tests/derivation/infra/empty-cons print 001/expected index 5d0b89f05..780b1b949 100644 --- a/tests/derivation/infra/empty-cons print 001/expected +++ b/tests/derivation/infra/empty-cons print 001/expected @@ -1,8 +1,6 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> Gen MaybeEmpty () -LOG gen.auto.derive.infra:0: +1/2: Building AlternativeCore (AlternativeCore.idr) +2/2: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> Gen MaybeEmpty () MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> local { decls = diff --git a/tests/derivation/infra/empty-cons print 002/DerivedGen.idr b/tests/derivation/infra/empty-cons print 002/DerivedGen.idr index ec8ff714d..48a020982 100644 --- a/tests/derivation/infra/empty-cons print 002/DerivedGen.idr +++ b/tests/derivation/infra/empty-cons print 002/DerivedGen.idr @@ -1,7 +1,8 @@ module DerivedGen import AlternativeCore -import PrintDerivation + +import Deriving.DepTyCheck.Gen import Data.Vect @@ -9,4 +10,5 @@ import Data.Vect %language ElabReflection -%runElab printDerived @{EmptyCons} $ Fuel -> (n : Nat) -> (a : Type) -> Gen MaybeEmpty (Vect n a) +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{EmptyCons} $ Fuel -> (n : Nat) -> (a : Type) -> Gen MaybeEmpty (Vect n a) diff --git a/tests/derivation/infra/empty-cons print 002/PrintDerivation.idr b/tests/derivation/infra/empty-cons print 002/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/infra/empty-cons print 002/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/infra/empty-cons print 002/expected b/tests/derivation/infra/empty-cons print 002/expected index 0d83db953..5af4ddcc8 100644 --- a/tests/derivation/infra/empty-cons print 002/expected +++ b/tests/derivation/infra/empty-cons print 002/expected @@ -1,8 +1,6 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> (n : Nat) -> (a : Type) -> Gen MaybeEmpty (Vect n a) -LOG gen.auto.derive.infra:0: +1/2: Building AlternativeCore (AlternativeCore.idr) +2/2: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> (n : Nat) -> (a : Type) -> Gen MaybeEmpty (Vect n a) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue diff --git a/tests/derivation/infra/empty-cons print 003/DerivedGen.idr b/tests/derivation/infra/empty-cons print 003/DerivedGen.idr index 8ffcbb66b..9394df3e2 100644 --- a/tests/derivation/infra/empty-cons print 003/DerivedGen.idr +++ b/tests/derivation/infra/empty-cons print 003/DerivedGen.idr @@ -1,7 +1,8 @@ module DerivedGen import AlternativeCore -import PrintDerivation + +import Deriving.DepTyCheck.Gen import Data.Vect @@ -9,4 +10,5 @@ import Data.Vect %language ElabReflection -%runElab printDerived @{EmptyCons} $ Fuel -> (Fuel -> Gen MaybeEmpty Nat) => Gen MaybeEmpty Bool +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{EmptyCons} $ Fuel -> (Fuel -> Gen MaybeEmpty Nat) => Gen MaybeEmpty Bool diff --git a/tests/derivation/infra/empty-cons print 003/PrintDerivation.idr b/tests/derivation/infra/empty-cons print 003/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/infra/empty-cons print 003/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/infra/empty-cons print 003/expected b/tests/derivation/infra/empty-cons print 003/expected index 77bfb10c5..63fdc9f12 100644 --- a/tests/derivation/infra/empty-cons print 003/expected +++ b/tests/derivation/infra/empty-cons print 003/expected @@ -1,8 +1,6 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> {auto conArg : ((arg : Fuel) -> Gen MaybeEmpty Nat)} -> Gen MaybeEmpty Bool -LOG gen.auto.derive.infra:0: +1/2: Building AlternativeCore (AlternativeCore.idr) +2/2: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> {auto conArg : ((arg : Fuel) -> Gen MaybeEmpty Nat)} -> Gen MaybeEmpty Bool MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW diff --git a/tests/derivation/infra/empty-cons print 004/DerivedGen.idr b/tests/derivation/infra/empty-cons print 004/DerivedGen.idr index 666594b7d..60695cfbc 100644 --- a/tests/derivation/infra/empty-cons print 004/DerivedGen.idr +++ b/tests/derivation/infra/empty-cons print 004/DerivedGen.idr @@ -1,7 +1,8 @@ module DerivedGen import AlternativeCore -import PrintDerivation + +import Deriving.DepTyCheck.Gen %default total @@ -10,4 +11,5 @@ import PrintDerivation data X : Nat -> Type where MkX : X n -%runElab printDerived @{EmptyCons} $ Fuel -> (n : Nat) -> Gen MaybeEmpty (X n) +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{EmptyCons} $ Fuel -> (n : Nat) -> Gen MaybeEmpty (X n) diff --git a/tests/derivation/infra/empty-cons print 004/PrintDerivation.idr b/tests/derivation/infra/empty-cons print 004/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/infra/empty-cons print 004/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/infra/empty-cons print 004/expected b/tests/derivation/infra/empty-cons print 004/expected index fc8338a92..564735447 100644 --- a/tests/derivation/infra/empty-cons print 004/expected +++ b/tests/derivation/infra/empty-cons print 004/expected @@ -1,8 +1,6 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> (n : Nat) -> Gen MaybeEmpty (X n) -LOG gen.auto.derive.infra:0: +1/2: Building AlternativeCore (AlternativeCore.idr) +2/2: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> (n : Nat) -> Gen MaybeEmpty (X n) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue .=> local diff --git a/tests/derivation/infra/empty-cons print 005/DerivedGen.idr b/tests/derivation/infra/empty-cons print 005/DerivedGen.idr index de81a51cf..d65e5bb8f 100644 --- a/tests/derivation/infra/empty-cons print 005/DerivedGen.idr +++ b/tests/derivation/infra/empty-cons print 005/DerivedGen.idr @@ -1,7 +1,8 @@ module DerivedGen import AlternativeCore -import PrintDerivation + +import Deriving.DepTyCheck.Gen %default total @@ -10,4 +11,5 @@ import PrintDerivation data X : Nat -> Type where MkX : X n -%runElab printDerived @{EmptyCons} $ Fuel -> Gen MaybeEmpty (n : Nat ** X n) +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{EmptyCons} $ Fuel -> Gen MaybeEmpty (n : Nat ** X n) diff --git a/tests/derivation/infra/empty-cons print 005/PrintDerivation.idr b/tests/derivation/infra/empty-cons print 005/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/infra/empty-cons print 005/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/infra/empty-cons print 005/expected b/tests/derivation/infra/empty-cons print 005/expected index 38f31f476..ac6ef9ca3 100644 --- a/tests/derivation/infra/empty-cons print 005/expected +++ b/tests/derivation/infra/empty-cons print 005/expected @@ -1,8 +1,6 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> Gen MaybeEmpty (n : Nat ** X n) -LOG gen.auto.derive.infra:0: +1/2: Building AlternativeCore (AlternativeCore.idr) +2/2: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> Gen MaybeEmpty (n : Nat ** X n) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> local { decls = diff --git a/tests/derivation/infra/empty-cons print 006/DerivedGen.idr b/tests/derivation/infra/empty-cons print 006/DerivedGen.idr index 5d9757ed5..04ab501ae 100644 --- a/tests/derivation/infra/empty-cons print 006/DerivedGen.idr +++ b/tests/derivation/infra/empty-cons print 006/DerivedGen.idr @@ -1,7 +1,8 @@ module DerivedGen import AlternativeCore -import PrintDerivation + +import Deriving.DepTyCheck.Gen import Data.Vect @@ -9,4 +10,5 @@ import Data.Vect %language ElabReflection -%runElab printDerived @{EmptyCons} $ Fuel -> (a : Type) -> Gen MaybeEmpty (n : Nat ** Vect n a) +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{EmptyCons} $ Fuel -> (a : Type) -> Gen MaybeEmpty (n : Nat ** Vect n a) diff --git a/tests/derivation/infra/empty-cons print 006/PrintDerivation.idr b/tests/derivation/infra/empty-cons print 006/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/infra/empty-cons print 006/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/infra/empty-cons print 006/expected b/tests/derivation/infra/empty-cons print 006/expected index eb3025a1d..9456e8d53 100644 --- a/tests/derivation/infra/empty-cons print 006/expected +++ b/tests/derivation/infra/empty-cons print 006/expected @@ -1,8 +1,6 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> (a : Type) -> Gen MaybeEmpty (n : Nat ** Vect n a) -LOG gen.auto.derive.infra:0: +1/2: Building AlternativeCore (AlternativeCore.idr) +2/2: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> (a : Type) -> Gen MaybeEmpty (n : Nat ** Vect n a) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue .=> local diff --git a/tests/derivation/infra/empty-cons print 007/DerivedGen.idr b/tests/derivation/infra/empty-cons print 007/DerivedGen.idr index 3354fc041..3c6534967 100644 --- a/tests/derivation/infra/empty-cons print 007/DerivedGen.idr +++ b/tests/derivation/infra/empty-cons print 007/DerivedGen.idr @@ -1,7 +1,8 @@ module DerivedGen import AlternativeCore -import PrintDerivation + +import Deriving.DepTyCheck.Gen %default total @@ -11,4 +12,5 @@ data X : Nat -> Bool -> Type where X0 : X 0 True X1 : X 1 False -%runElab printDerived @{EmptyCons} $ Fuel -> Gen MaybeEmpty (n : Nat ** b : Bool ** X n b) +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{EmptyCons} $ Fuel -> Gen MaybeEmpty (n : Nat ** b : Bool ** X n b) diff --git a/tests/derivation/infra/empty-cons print 007/PrintDerivation.idr b/tests/derivation/infra/empty-cons print 007/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/infra/empty-cons print 007/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/infra/empty-cons print 007/expected b/tests/derivation/infra/empty-cons print 007/expected index 0640fcd26..713ce0aeb 100644 --- a/tests/derivation/infra/empty-cons print 007/expected +++ b/tests/derivation/infra/empty-cons print 007/expected @@ -1,8 +1,6 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> Gen MaybeEmpty (n : Nat ** (b : Bool ** X n b)) -LOG gen.auto.derive.infra:0: +1/2: Building AlternativeCore (AlternativeCore.idr) +2/2: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> Gen MaybeEmpty (n : Nat ** (b : Bool ** X n b)) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> local { decls = diff --git a/tests/derivation/infra/empty-cons print 008/DerivedGen.idr b/tests/derivation/infra/empty-cons print 008/DerivedGen.idr index a0d9d1cea..408c71149 100644 --- a/tests/derivation/infra/empty-cons print 008/DerivedGen.idr +++ b/tests/derivation/infra/empty-cons print 008/DerivedGen.idr @@ -1,7 +1,8 @@ module DerivedGen import AlternativeCore -import PrintDerivation + +import Deriving.DepTyCheck.Gen import Data.Vect @@ -9,4 +10,5 @@ import Data.Vect %language ElabReflection -%runElab printDerived @{EmptyCons} $ Fuel -> Gen MaybeEmpty (n : Nat ** a : Type ** Vect n a) +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{EmptyCons} $ Fuel -> Gen MaybeEmpty (n : Nat ** a : Type ** Vect n a) diff --git a/tests/derivation/infra/empty-cons print 008/PrintDerivation.idr b/tests/derivation/infra/empty-cons print 008/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/infra/empty-cons print 008/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/infra/empty-cons print 008/expected b/tests/derivation/infra/empty-cons print 008/expected index af637b8de..83cf584f3 100644 --- a/tests/derivation/infra/empty-cons print 008/expected +++ b/tests/derivation/infra/empty-cons print 008/expected @@ -1,8 +1,6 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> Gen MaybeEmpty (n : Nat ** (a : Type ** Vect n a)) -LOG gen.auto.derive.infra:0: +1/2: Building AlternativeCore (AlternativeCore.idr) +2/2: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> Gen MaybeEmpty (n : Nat ** (a : Type ** Vect n a)) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> local { decls = diff --git a/tests/derivation/infra/empty-cons print 009/DerivedGen.idr b/tests/derivation/infra/empty-cons print 009/DerivedGen.idr index a5fa391bd..b93385a0e 100644 --- a/tests/derivation/infra/empty-cons print 009/DerivedGen.idr +++ b/tests/derivation/infra/empty-cons print 009/DerivedGen.idr @@ -1,7 +1,8 @@ module DerivedGen import AlternativeCore -import PrintDerivation + +import Deriving.DepTyCheck.Gen import Data.Vect @@ -13,4 +14,5 @@ data Y = Y0 | Y1 data X = X0 | X1 | X2 Y -%runElab printDerived @{EmptyCons} $ Fuel -> Gen MaybeEmpty X +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{EmptyCons} $ Fuel -> Gen MaybeEmpty X diff --git a/tests/derivation/infra/empty-cons print 009/PrintDerivation.idr b/tests/derivation/infra/empty-cons print 009/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/infra/empty-cons print 009/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/infra/empty-cons print 009/expected b/tests/derivation/infra/empty-cons print 009/expected index 10ca690a7..4ad564f4f 100644 --- a/tests/derivation/infra/empty-cons print 009/expected +++ b/tests/derivation/infra/empty-cons print 009/expected @@ -1,8 +1,6 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> Gen MaybeEmpty X -LOG gen.auto.derive.infra:0: +1/2: Building AlternativeCore (AlternativeCore.idr) +2/2: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> Gen MaybeEmpty X MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> local { decls = diff --git a/tests/derivation/infra/empty-cons print 010/DerivedGen.idr b/tests/derivation/infra/empty-cons print 010/DerivedGen.idr index f95bc7f39..6f3e5abce 100644 --- a/tests/derivation/infra/empty-cons print 010/DerivedGen.idr +++ b/tests/derivation/infra/empty-cons print 010/DerivedGen.idr @@ -1,7 +1,8 @@ module DerivedGen import AlternativeCore -import PrintDerivation + +import Deriving.DepTyCheck.Gen import Data.Vect @@ -15,4 +16,5 @@ mutual data Y = Y0 | Y1 X -%runElab printDerived @{EmptyCons} $ Fuel -> Gen MaybeEmpty X +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{EmptyCons} $ Fuel -> Gen MaybeEmpty X diff --git a/tests/derivation/infra/empty-cons print 010/PrintDerivation.idr b/tests/derivation/infra/empty-cons print 010/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/infra/empty-cons print 010/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/infra/empty-cons print 010/expected b/tests/derivation/infra/empty-cons print 010/expected index 53d5ba91e..d25471a4e 100644 --- a/tests/derivation/infra/empty-cons print 010/expected +++ b/tests/derivation/infra/empty-cons print 010/expected @@ -1,8 +1,6 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> Gen MaybeEmpty X -LOG gen.auto.derive.infra:0: +1/2: Building AlternativeCore (AlternativeCore.idr) +2/2: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> Gen MaybeEmpty X MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> local { decls = diff --git a/tests/derivation/infra/empty-cons print 011/DerivedGen.idr b/tests/derivation/infra/empty-cons print 011/DerivedGen.idr index aa9edc64f..4418873e6 100644 --- a/tests/derivation/infra/empty-cons print 011/DerivedGen.idr +++ b/tests/derivation/infra/empty-cons print 011/DerivedGen.idr @@ -1,7 +1,8 @@ module DerivedGen import AlternativeCore -import PrintDerivation + +import Deriving.DepTyCheck.Gen import Data.Vect @@ -18,4 +19,5 @@ mutual data Y = Y0 | Y1 (X Nat) -%runElab printDerived @{EmptyCons} $ Fuel -> Gen MaybeEmpty (a ** X a) +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{EmptyCons} $ Fuel -> Gen MaybeEmpty (a ** X a) diff --git a/tests/derivation/infra/empty-cons print 011/PrintDerivation.idr b/tests/derivation/infra/empty-cons print 011/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/infra/empty-cons print 011/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/infra/empty-cons print 011/expected b/tests/derivation/infra/empty-cons print 011/expected index 0dc0775c7..48adcc7a6 100644 --- a/tests/derivation/infra/empty-cons print 011/expected +++ b/tests/derivation/infra/empty-cons print 011/expected @@ -1,8 +1,6 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> Gen MaybeEmpty (a : Type ** X a) -LOG gen.auto.derive.infra:0: +1/2: Building AlternativeCore (AlternativeCore.idr) +2/2: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> Gen MaybeEmpty (a : Type ** X a) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> local { decls = diff --git a/tests/derivation/infra/empty-cons print 012/DerivedGen.idr b/tests/derivation/infra/empty-cons print 012/DerivedGen.idr index 7616b9251..f8ed69365 100644 --- a/tests/derivation/infra/empty-cons print 012/DerivedGen.idr +++ b/tests/derivation/infra/empty-cons print 012/DerivedGen.idr @@ -1,7 +1,8 @@ module DerivedGen import AlternativeCore -import PrintDerivation + +import Deriving.DepTyCheck.Gen %default total @@ -11,4 +12,5 @@ data X : Nat -> Nat -> Type where XE : X n n XS : X n (S n) -%runElab printDerived @{EmptyCons} $ Fuel -> (n, m : Nat) -> Gen MaybeEmpty (X n m) +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{EmptyCons} $ Fuel -> (n, m : Nat) -> Gen MaybeEmpty (X n m) diff --git a/tests/derivation/infra/empty-cons print 012/PrintDerivation.idr b/tests/derivation/infra/empty-cons print 012/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/infra/empty-cons print 012/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/infra/empty-cons print 012/expected b/tests/derivation/infra/empty-cons print 012/expected index 695f6dec0..4a6e4b0dd 100644 --- a/tests/derivation/infra/empty-cons print 012/expected +++ b/tests/derivation/infra/empty-cons print 012/expected @@ -1,8 +1,6 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> (n : Nat) -> (m : Nat) -> Gen MaybeEmpty (X n m) -LOG gen.auto.derive.infra:0: +1/2: Building AlternativeCore (AlternativeCore.idr) +2/2: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> (n : Nat) -> (m : Nat) -> Gen MaybeEmpty (X n m) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue diff --git a/tests/derivation/infra/empty-cons print 013/DerivedGen.idr b/tests/derivation/infra/empty-cons print 013/DerivedGen.idr index 0122e9482..c5e5b144b 100644 --- a/tests/derivation/infra/empty-cons print 013/DerivedGen.idr +++ b/tests/derivation/infra/empty-cons print 013/DerivedGen.idr @@ -1,7 +1,8 @@ module DerivedGen import AlternativeCore -import PrintDerivation + +import Deriving.DepTyCheck.Gen %default total @@ -11,4 +12,5 @@ data X : Nat -> Nat -> Nat -> Nat -> Type where XE : X n (S n) m n XS : X n n m m -%runElab printDerived @{EmptyCons} $ Fuel -> (n, m, p, k : Nat) -> Gen MaybeEmpty (X n m p k) +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{EmptyCons} $ Fuel -> (n, m, p, k : Nat) -> Gen MaybeEmpty (X n m p k) diff --git a/tests/derivation/infra/empty-cons print 013/PrintDerivation.idr b/tests/derivation/infra/empty-cons print 013/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/infra/empty-cons print 013/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/infra/empty-cons print 013/expected b/tests/derivation/infra/empty-cons print 013/expected index 45c47dae3..1d56384a4 100644 --- a/tests/derivation/infra/empty-cons print 013/expected +++ b/tests/derivation/infra/empty-cons print 013/expected @@ -1,8 +1,6 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> (n : Nat) -> (m : Nat) -> (p : Nat) -> (k : Nat) -> Gen MaybeEmpty (X n m p k) -LOG gen.auto.derive.infra:0: +1/2: Building AlternativeCore (AlternativeCore.idr) +2/2: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> (n : Nat) -> (m : Nat) -> (p : Nat) -> (k : Nat) -> Gen MaybeEmpty (X n m p k) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue diff --git a/tests/derivation/infra/empty-cons print 014/DerivedGen.idr b/tests/derivation/infra/empty-cons print 014/DerivedGen.idr index a6956b7bf..ca50589d1 100644 --- a/tests/derivation/infra/empty-cons print 014/DerivedGen.idr +++ b/tests/derivation/infra/empty-cons print 014/DerivedGen.idr @@ -1,7 +1,8 @@ module DerivedGen import AlternativeCore -import PrintDerivation + +import Deriving.DepTyCheck.Gen %default total @@ -11,4 +12,5 @@ data X : Nat -> Nat -> Nat -> Nat -> Type where XE : X n (S n) m n XS : X n n m m -%runElab printDerived @{EmptyCons} $ Fuel -> (n, m, p, k : Nat) -> (Fuel -> Gen MaybeEmpty String) => Gen MaybeEmpty (X n m p k) +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{EmptyCons} $ Fuel -> (n, m, p, k : Nat) -> (Fuel -> Gen MaybeEmpty String) => Gen MaybeEmpty (X n m p k) diff --git a/tests/derivation/infra/empty-cons print 014/PrintDerivation.idr b/tests/derivation/infra/empty-cons print 014/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/infra/empty-cons print 014/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/infra/empty-cons print 014/expected b/tests/derivation/infra/empty-cons print 014/expected index 2668f6c7e..51ab66a5d 100644 --- a/tests/derivation/infra/empty-cons print 014/expected +++ b/tests/derivation/infra/empty-cons print 014/expected @@ -1,8 +1,6 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> (n : Nat) -> (m : Nat) -> (p : Nat) -> (k : Nat) -> {auto conArg : ((arg : Fuel) -> Gen MaybeEmpty String)} -> Gen MaybeEmpty (X n m p k) -LOG gen.auto.derive.infra:0: +1/2: Building AlternativeCore (AlternativeCore.idr) +2/2: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> (n : Nat) -> (m : Nat) -> (p : Nat) -> (k : Nat) -> {auto conArg : ((arg : Fuel) -> Gen MaybeEmpty String)} -> Gen MaybeEmpty (X n m p k) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue diff --git a/tests/derivation/least-effort/print/adt/001 trivial/AlternativeCore.idr b/tests/derivation/infra/empty-cons print 015/AlternativeCore.idr similarity index 100% rename from tests/derivation/least-effort/print/adt/001 trivial/AlternativeCore.idr rename to tests/derivation/infra/empty-cons print 015/AlternativeCore.idr diff --git a/tests/derivation/infra/empty-cons print 015/DerivedGen.idr b/tests/derivation/infra/empty-cons print 015/DerivedGen.idr new file mode 100644 index 000000000..3527726f4 --- /dev/null +++ b/tests/derivation/infra/empty-cons print 015/DerivedGen.idr @@ -0,0 +1,18 @@ +module DerivedGen + +import AlternativeCore + +import Deriving.DepTyCheck.Gen + +import Data.Vect + +%default total + +%language ElabReflection + +data IsFS : (n : _) -> Fin n -> Type where + ItIsFS : IsFS _ (FS i) + +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{EmptyCons} $ + Fuel -> {n : Nat} -> (v : Fin n) -> Gen MaybeEmpty $ IsFS n v diff --git a/tests/derivation/infra/empty-cons print 015/RunDerivedGen.idr b/tests/derivation/infra/empty-cons print 015/RunDerivedGen.idr new file mode 120000 index 000000000..2b18cc56c --- /dev/null +++ b/tests/derivation/infra/empty-cons print 015/RunDerivedGen.idr @@ -0,0 +1 @@ +../_common/RunDerivedGen.idr \ No newline at end of file diff --git a/tests/derivation/infra/empty-cons print 015/derive.ipkg b/tests/derivation/infra/empty-cons print 015/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/infra/empty-cons print 015/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/infra/empty-cons print 015/expected b/tests/derivation/infra/empty-cons print 015/expected new file mode 100644 index 000000000..d298dc8d9 --- /dev/null +++ b/tests/derivation/infra/empty-cons print 015/expected @@ -0,0 +1,65 @@ +1/2: Building AlternativeCore (AlternativeCore.idr) +2/2: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> (v : Fin n) -> Gen MaybeEmpty (IsFS n v) + MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") +.=> MkArg MW ImplicitArg (Just "outer^") implicitTrue +.=> MkArg MW ExplicitArg (Just "outer^") implicitTrue +.=> local + { decls = + [ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "[0, 1]" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") + .-> MkArg MW ExplicitArg (Just "{arg:1}") (var "Data.Fin.Fin" .$ var "n") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ (var "DerivedGen.IsFS" .$ var "n" .$ var "{arg:1}") + }) + , IDef + emptyFC + "[0, 1]" + [ var "[0, 1]" .$ bindVar "^fuel_arg^" .$ bindVar "inter^" .$ bindVar "inter^<{arg:1}>" + .= local + { decls = + [ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "<>" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") + .-> MkArg MW ExplicitArg (Just "{arg:1}") (var "Data.Fin.Fin" .$ var "n") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ (var "DerivedGen.IsFS" .$ var "n" .$ var "{arg:1}") + }) + , IDef + emptyFC + "<>" + [ var "<>" + .$ bindVar "^cons_fuel^" + .$ (var "Prelude.Types.S" .$ bindVar "^bnd^{k:3643}") + .$ (var "Data.Fin.FS" .! ("k", implicitTrue) .$ bindVar "i") + .= var "empty" + , var "<>" .$ implicitTrue .$ implicitTrue .$ implicitTrue .= var "empty" + ] + ] + , scope = + var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "DerivedGen.IsFS[0, 1] (non-recursive)")) + .$ (var "<>" .$ var "^fuel_arg^" .$ var "inter^" .$ var "inter^<{arg:1}>") + } + ] + ] + , scope = var "[0, 1]" .$ var "^outmost-fuel^" .$ var "outer^" .$ var "outer^" + } + diff --git a/tests/derivation/infra/empty-cons print 015/run b/tests/derivation/infra/empty-cons print 015/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/infra/empty-cons print 015/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/infra/empty-cons run 001/DerivedGen.idr b/tests/derivation/infra/empty-cons run 001/DerivedGen.idr index 29ce2d122..cec0f366a 100644 --- a/tests/derivation/infra/empty-cons run 001/DerivedGen.idr +++ b/tests/derivation/infra/empty-cons run 001/DerivedGen.idr @@ -1,6 +1,8 @@ module DerivedGen import AlternativeCore + +import Deriving.DepTyCheck.Gen import RunDerivedGen %default total diff --git a/tests/derivation/infra/empty-cons run 002/DerivedGen.idr b/tests/derivation/infra/empty-cons run 002/DerivedGen.idr index fc3f2660e..11a7d4741 100644 --- a/tests/derivation/infra/empty-cons run 002/DerivedGen.idr +++ b/tests/derivation/infra/empty-cons run 002/DerivedGen.idr @@ -1,6 +1,8 @@ module DerivedGen import AlternativeCore + +import Deriving.DepTyCheck.Gen import RunDerivedGen %default total diff --git a/tests/derivation/infra/empty-cons run 003/DerivedGen.idr b/tests/derivation/infra/empty-cons run 003/DerivedGen.idr index 0525072a7..d22833d87 100644 --- a/tests/derivation/infra/empty-cons run 003/DerivedGen.idr +++ b/tests/derivation/infra/empty-cons run 003/DerivedGen.idr @@ -1,6 +1,8 @@ module DerivedGen import AlternativeCore + +import Deriving.DepTyCheck.Gen import RunDerivedGen %default total diff --git a/tests/derivation/infra/empty-cons run 004/DerivedGen.idr b/tests/derivation/infra/empty-cons run 004/DerivedGen.idr index ba95523fd..6afadba8b 100644 --- a/tests/derivation/infra/empty-cons run 004/DerivedGen.idr +++ b/tests/derivation/infra/empty-cons run 004/DerivedGen.idr @@ -1,6 +1,8 @@ module DerivedGen import AlternativeCore + +import Deriving.DepTyCheck.Gen import RunDerivedGen %default total diff --git a/tests/derivation/infra/empty-cons run 005/DerivedGen.idr b/tests/derivation/infra/empty-cons run 005/DerivedGen.idr index ba577e726..821495369 100644 --- a/tests/derivation/infra/empty-cons run 005/DerivedGen.idr +++ b/tests/derivation/infra/empty-cons run 005/DerivedGen.idr @@ -1,6 +1,8 @@ module DerivedGen import AlternativeCore + +import Deriving.DepTyCheck.Gen import RunDerivedGen %default total diff --git a/tests/derivation/infra/empty-cons run 006/DerivedGen.idr b/tests/derivation/infra/empty-cons run 006/DerivedGen.idr index 8fc0b01a8..ebe704a27 100644 --- a/tests/derivation/infra/empty-cons run 006/DerivedGen.idr +++ b/tests/derivation/infra/empty-cons run 006/DerivedGen.idr @@ -1,6 +1,8 @@ module DerivedGen import AlternativeCore + +import Deriving.DepTyCheck.Gen import RunDerivedGen %default total diff --git a/tests/derivation/infra/empty-cons run 007/DerivedGen.idr b/tests/derivation/infra/empty-cons run 007/DerivedGen.idr index 415b6dc20..767b352ec 100644 --- a/tests/derivation/infra/empty-cons run 007/DerivedGen.idr +++ b/tests/derivation/infra/empty-cons run 007/DerivedGen.idr @@ -1,6 +1,8 @@ module DerivedGen import AlternativeCore + +import Deriving.DepTyCheck.Gen import RunDerivedGen import Data.Vect diff --git a/tests/derivation/infra/empty-cons run 008/DerivedGen.idr b/tests/derivation/infra/empty-cons run 008/DerivedGen.idr index d58378f55..1db5cdd2a 100644 --- a/tests/derivation/infra/empty-cons run 008/DerivedGen.idr +++ b/tests/derivation/infra/empty-cons run 008/DerivedGen.idr @@ -1,6 +1,8 @@ module DerivedGen import AlternativeCore + +import Deriving.DepTyCheck.Gen import RunDerivedGen import Data.Vect diff --git a/tests/derivation/infra/empty-cons run 009/DerivedGen.idr b/tests/derivation/infra/empty-cons run 009/DerivedGen.idr index c61d42557..ff1c939c2 100644 --- a/tests/derivation/infra/empty-cons run 009/DerivedGen.idr +++ b/tests/derivation/infra/empty-cons run 009/DerivedGen.idr @@ -1,6 +1,8 @@ module DerivedGen import AlternativeCore + +import Deriving.DepTyCheck.Gen import RunDerivedGen import Data.Vect diff --git a/tests/derivation/infra/empty-cons run 010/DerivedGen.idr b/tests/derivation/infra/empty-cons run 010/DerivedGen.idr index daaa327de..79145adf2 100644 --- a/tests/derivation/infra/empty-cons run 010/DerivedGen.idr +++ b/tests/derivation/infra/empty-cons run 010/DerivedGen.idr @@ -1,6 +1,8 @@ module DerivedGen import AlternativeCore + +import Deriving.DepTyCheck.Gen import RunDerivedGen import Data.Vect diff --git a/tests/derivation/infra/empty-cons run 011/DerivedGen.idr b/tests/derivation/infra/empty-cons run 011/DerivedGen.idr index 4952a54d8..efac204d0 100644 --- a/tests/derivation/infra/empty-cons run 011/DerivedGen.idr +++ b/tests/derivation/infra/empty-cons run 011/DerivedGen.idr @@ -1,6 +1,8 @@ module DerivedGen import AlternativeCore + +import Deriving.DepTyCheck.Gen import RunDerivedGen import Data.Vect diff --git a/tests/derivation/infra/empty-cons run 012/DerivedGen.idr b/tests/derivation/infra/empty-cons run 012/DerivedGen.idr index 23326bcb9..03d41e6aa 100644 --- a/tests/derivation/infra/empty-cons run 012/DerivedGen.idr +++ b/tests/derivation/infra/empty-cons run 012/DerivedGen.idr @@ -1,6 +1,8 @@ module DerivedGen import AlternativeCore + +import Deriving.DepTyCheck.Gen import RunDerivedGen import Data.Vect diff --git a/tests/derivation/infra/empty-cons run 013/DerivedGen.idr b/tests/derivation/infra/empty-cons run 013/DerivedGen.idr index 13098ebf9..640b2de09 100644 --- a/tests/derivation/infra/empty-cons run 013/DerivedGen.idr +++ b/tests/derivation/infra/empty-cons run 013/DerivedGen.idr @@ -1,6 +1,8 @@ module DerivedGen import AlternativeCore + +import Deriving.DepTyCheck.Gen import RunDerivedGen import Data.Vect diff --git a/tests/derivation/infra/empty-cons run 014/DerivedGen.idr b/tests/derivation/infra/empty-cons run 014/DerivedGen.idr index e393d3b80..026b35903 100644 --- a/tests/derivation/infra/empty-cons run 014/DerivedGen.idr +++ b/tests/derivation/infra/empty-cons run 014/DerivedGen.idr @@ -1,6 +1,8 @@ module DerivedGen import AlternativeCore + +import Deriving.DepTyCheck.Gen import RunDerivedGen import Data.Vect diff --git a/tests/derivation/least-effort/print/adt/002 noparam/AlternativeCore.idr b/tests/derivation/infra/empty-cons run 015/AlternativeCore.idr similarity index 100% rename from tests/derivation/least-effort/print/adt/002 noparam/AlternativeCore.idr rename to tests/derivation/infra/empty-cons run 015/AlternativeCore.idr diff --git a/tests/derivation/infra/empty-cons run 015/DerivedGen.idr b/tests/derivation/infra/empty-cons run 015/DerivedGen.idr new file mode 100644 index 000000000..7cad4fcb0 --- /dev/null +++ b/tests/derivation/infra/empty-cons run 015/DerivedGen.idr @@ -0,0 +1,27 @@ +module DerivedGen + +import AlternativeCore + +import Deriving.DepTyCheck.Gen +import RunDerivedGen + +import Data.Vect + +%default total + +%language ElabReflection + +data IsFS : (n : _) -> Fin n -> Type where + ItIsFS : IsFS _ (FS i) + +checkedGen : Fuel -> {n : Nat} -> (v : Fin n) -> Gen MaybeEmpty $ IsFS n v +checkedGen = deriveGen @{EmptyCons} + +Show (IsFS n a) where + show ItIsFS = "ItisFS" + +main : IO Unit +main = runGs + [ G $ \fl => checkedGen fl {n=3} 2 + , G $ \fl => checkedGen fl {n=3} 0 + ] diff --git a/tests/derivation/infra/empty-cons run 015/RunDerivedGen.idr b/tests/derivation/infra/empty-cons run 015/RunDerivedGen.idr new file mode 120000 index 000000000..2b18cc56c --- /dev/null +++ b/tests/derivation/infra/empty-cons run 015/RunDerivedGen.idr @@ -0,0 +1 @@ +../_common/RunDerivedGen.idr \ No newline at end of file diff --git a/tests/derivation/infra/empty-cons run 015/derive.ipkg b/tests/derivation/infra/empty-cons run 015/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/infra/empty-cons run 015/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/infra/empty-cons run 015/expected b/tests/derivation/infra/empty-cons run 015/expected new file mode 100644 index 000000000..76f757b9a --- /dev/null +++ b/tests/derivation/infra/empty-cons run 015/expected @@ -0,0 +1,6 @@ +1/3: Building AlternativeCore (AlternativeCore.idr) +2/3: Building RunDerivedGen (RunDerivedGen.idr) +3/3: Building DerivedGen (DerivedGen.idr) +Generated values: +----- +----- diff --git a/tests/derivation/infra/empty-cons run 015/run b/tests/derivation/infra/empty-cons run 015/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/infra/empty-cons run 015/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/infra/ext print 001/DerivedGen.idr b/tests/derivation/infra/ext print 001/DerivedGen.idr index 46a527742..b5cbac9ea 100644 --- a/tests/derivation/infra/ext print 001/DerivedGen.idr +++ b/tests/derivation/infra/ext print 001/DerivedGen.idr @@ -1,10 +1,12 @@ module DerivedGen import AlternativeCore -import PrintDerivation + +import Deriving.DepTyCheck.Gen %default total %language ElabReflection -%runElab printDerived @{Ext_XS} $ Fuel -> (Fuel -> Gen MaybeEmpty String) => Gen MaybeEmpty XS +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{Ext_XS} $ Fuel -> (Fuel -> Gen MaybeEmpty String) => Gen MaybeEmpty XS diff --git a/tests/derivation/infra/ext print 001/PrintDerivation.idr b/tests/derivation/infra/ext print 001/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/infra/ext print 001/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/infra/ext print 001/expected b/tests/derivation/infra/ext print 001/expected index 498f02751..645037a72 100644 --- a/tests/derivation/infra/ext print 001/expected +++ b/tests/derivation/infra/ext print 001/expected @@ -1,8 +1,6 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> {auto conArg : ((arg : Fuel) -> Gen MaybeEmpty String)} -> Gen MaybeEmpty XS -LOG gen.auto.derive.infra:0: +1/2: Building AlternativeCore (AlternativeCore.idr) +2/2: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> {auto conArg : ((arg : Fuel) -> Gen MaybeEmpty String)} -> Gen MaybeEmpty XS MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW diff --git a/tests/derivation/infra/ext print 002/DerivedGen.idr b/tests/derivation/infra/ext print 002/DerivedGen.idr index c47dace79..148b3f55d 100644 --- a/tests/derivation/infra/ext print 002/DerivedGen.idr +++ b/tests/derivation/infra/ext print 002/DerivedGen.idr @@ -1,10 +1,12 @@ module DerivedGen import AlternativeCore -import PrintDerivation + +import Deriving.DepTyCheck.Gen %default total %language ElabReflection -%runElab printDerived @{Ext_XSS} $ Fuel -> (Fuel -> Gen MaybeEmpty String) => Gen MaybeEmpty XSS +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{Ext_XSS} $ Fuel -> (Fuel -> Gen MaybeEmpty String) => Gen MaybeEmpty XSS diff --git a/tests/derivation/infra/ext print 002/PrintDerivation.idr b/tests/derivation/infra/ext print 002/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/infra/ext print 002/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/infra/ext print 002/expected b/tests/derivation/infra/ext print 002/expected index f52a73ec8..a3a92d2fa 100644 --- a/tests/derivation/infra/ext print 002/expected +++ b/tests/derivation/infra/ext print 002/expected @@ -1,8 +1,6 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> {auto conArg : ((arg : Fuel) -> Gen MaybeEmpty String)} -> Gen MaybeEmpty XSS -LOG gen.auto.derive.infra:0: +1/2: Building AlternativeCore (AlternativeCore.idr) +2/2: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> {auto conArg : ((arg : Fuel) -> Gen MaybeEmpty String)} -> Gen MaybeEmpty XSS MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW diff --git a/tests/derivation/infra/ext print 003/DerivedGen.idr b/tests/derivation/infra/ext print 003/DerivedGen.idr index 01c6d254e..fda59fadd 100644 --- a/tests/derivation/infra/ext print 003/DerivedGen.idr +++ b/tests/derivation/infra/ext print 003/DerivedGen.idr @@ -1,10 +1,12 @@ module DerivedGen import AlternativeCore -import PrintDerivation + +import Deriving.DepTyCheck.Gen %default total %language ElabReflection -%runElab printDerived @{Ext_XSN} $ Fuel -> (Fuel -> Gen MaybeEmpty String) => (Fuel -> Gen MaybeEmpty Nat) => Gen MaybeEmpty XSN +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{Ext_XSN} $ Fuel -> (Fuel -> Gen MaybeEmpty String) => (Fuel -> Gen MaybeEmpty Nat) => Gen MaybeEmpty XSN diff --git a/tests/derivation/infra/ext print 003/PrintDerivation.idr b/tests/derivation/infra/ext print 003/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/infra/ext print 003/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/infra/ext print 003/expected b/tests/derivation/infra/ext print 003/expected index 3cdfcabcc..0baee2ef8 100644 --- a/tests/derivation/infra/ext print 003/expected +++ b/tests/derivation/infra/ext print 003/expected @@ -1,8 +1,6 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> {auto conArg : ((arg : Fuel) -> Gen MaybeEmpty String)} -> {auto conArg : ((arg : Fuel) -> Gen MaybeEmpty Nat)} -> Gen MaybeEmpty XSN -LOG gen.auto.derive.infra:0: +1/2: Building AlternativeCore (AlternativeCore.idr) +2/2: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> {auto conArg : ((arg : Fuel) -> Gen MaybeEmpty String)} -> {auto conArg : ((arg : Fuel) -> Gen MaybeEmpty Nat)} -> Gen MaybeEmpty XSN MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW diff --git a/tests/derivation/infra/ext print 004/DerivedGen.idr b/tests/derivation/infra/ext print 004/DerivedGen.idr index 22e1d897d..09a192c96 100644 --- a/tests/derivation/infra/ext print 004/DerivedGen.idr +++ b/tests/derivation/infra/ext print 004/DerivedGen.idr @@ -1,10 +1,12 @@ module DerivedGen import AlternativeCore -import PrintDerivation + +import Deriving.DepTyCheck.Gen %default total %language ElabReflection -%runElab printDerived @{Ext_XSN} $ Fuel -> (Fuel -> Gen MaybeEmpty String) => (n : Nat) -> Gen MaybeEmpty (X'S n) +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{Ext_XSN} $ Fuel -> (Fuel -> Gen MaybeEmpty String) => (n : Nat) -> Gen MaybeEmpty (X'S n) diff --git a/tests/derivation/infra/ext print 004/PrintDerivation.idr b/tests/derivation/infra/ext print 004/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/infra/ext print 004/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/infra/ext print 004/expected b/tests/derivation/infra/ext print 004/expected index e384a2bef..138a41b86 100644 --- a/tests/derivation/infra/ext print 004/expected +++ b/tests/derivation/infra/ext print 004/expected @@ -1,8 +1,6 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> {auto conArg : ((arg : Fuel) -> Gen MaybeEmpty String)} -> (n : Nat) -> Gen MaybeEmpty (X'S n) -LOG gen.auto.derive.infra:0: +1/2: Building AlternativeCore (AlternativeCore.idr) +2/2: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> {auto conArg : ((arg : Fuel) -> Gen MaybeEmpty String)} -> (n : Nat) -> Gen MaybeEmpty (X'S n) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW diff --git a/tests/derivation/infra/ext run 001/DerivedGen.idr b/tests/derivation/infra/ext run 001/DerivedGen.idr index ea7e76e15..cf18ef03d 100644 --- a/tests/derivation/infra/ext run 001/DerivedGen.idr +++ b/tests/derivation/infra/ext run 001/DerivedGen.idr @@ -1,6 +1,8 @@ module DerivedGen import AlternativeCore + +import Deriving.DepTyCheck.Gen import RunDerivedGen %default total diff --git a/tests/derivation/infra/ext run 002/DerivedGen.idr b/tests/derivation/infra/ext run 002/DerivedGen.idr index 96d26d729..a09ecae63 100644 --- a/tests/derivation/infra/ext run 002/DerivedGen.idr +++ b/tests/derivation/infra/ext run 002/DerivedGen.idr @@ -1,6 +1,8 @@ module DerivedGen import AlternativeCore + +import Deriving.DepTyCheck.Gen import RunDerivedGen %default total diff --git a/tests/derivation/infra/ext run 003/DerivedGen.idr b/tests/derivation/infra/ext run 003/DerivedGen.idr index 4e067ab1b..2be2eedd7 100644 --- a/tests/derivation/infra/ext run 003/DerivedGen.idr +++ b/tests/derivation/infra/ext run 003/DerivedGen.idr @@ -1,6 +1,8 @@ module DerivedGen import AlternativeCore + +import Deriving.DepTyCheck.Gen import RunDerivedGen %default total diff --git a/tests/derivation/infra/ext run 004/DerivedGen.idr b/tests/derivation/infra/ext run 004/DerivedGen.idr index 378e9fbb5..cb971e6f7 100644 --- a/tests/derivation/infra/ext run 004/DerivedGen.idr +++ b/tests/derivation/infra/ext run 004/DerivedGen.idr @@ -1,6 +1,8 @@ module DerivedGen import AlternativeCore + +import Deriving.DepTyCheck.Gen import RunDerivedGen %default total diff --git a/tests/derivation/infra/self print 001/DerivedGen.idr b/tests/derivation/infra/self print 001/DerivedGen.idr index 0c9baa697..74cfd4ccc 100644 --- a/tests/derivation/infra/self print 001/DerivedGen.idr +++ b/tests/derivation/infra/self print 001/DerivedGen.idr @@ -1,10 +1,12 @@ module DerivedGen import AlternativeCore -import PrintDerivation + +import Deriving.DepTyCheck.Gen %default total %language ElabReflection -%runElab printDerived @{CallSelf} $ Fuel -> Gen MaybeEmpty Unit +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{CallSelf} $ Fuel -> Gen MaybeEmpty Unit diff --git a/tests/derivation/infra/self print 001/PrintDerivation.idr b/tests/derivation/infra/self print 001/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/infra/self print 001/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/infra/self print 001/expected b/tests/derivation/infra/self print 001/expected index ec9969db1..e02a7a623 100644 --- a/tests/derivation/infra/self print 001/expected +++ b/tests/derivation/infra/self print 001/expected @@ -1,8 +1,6 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> Gen MaybeEmpty () -LOG gen.auto.derive.infra:0: +1/2: Building AlternativeCore (AlternativeCore.idr) +2/2: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> Gen MaybeEmpty () MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> local { decls = diff --git a/tests/derivation/infra/self print 002/DerivedGen.idr b/tests/derivation/infra/self print 002/DerivedGen.idr index 4fe3908a3..088a2f4ad 100644 --- a/tests/derivation/infra/self print 002/DerivedGen.idr +++ b/tests/derivation/infra/self print 002/DerivedGen.idr @@ -1,7 +1,8 @@ module DerivedGen import AlternativeCore -import PrintDerivation + +import Deriving.DepTyCheck.Gen import Data.Vect @@ -9,4 +10,5 @@ import Data.Vect %language ElabReflection -%runElab printDerived @{CallSelf} $ Fuel -> (n : Nat) -> (a : Type) -> Gen MaybeEmpty (Vect n a) +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{CallSelf} $ Fuel -> (n : Nat) -> (a : Type) -> Gen MaybeEmpty (Vect n a) diff --git a/tests/derivation/infra/self print 002/PrintDerivation.idr b/tests/derivation/infra/self print 002/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/infra/self print 002/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/infra/self print 002/expected b/tests/derivation/infra/self print 002/expected index 684ee508a..8345715d5 100644 --- a/tests/derivation/infra/self print 002/expected +++ b/tests/derivation/infra/self print 002/expected @@ -1,8 +1,6 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> (n : Nat) -> (a : Type) -> Gen MaybeEmpty (Vect n a) -LOG gen.auto.derive.infra:0: +1/2: Building AlternativeCore (AlternativeCore.idr) +2/2: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> (n : Nat) -> (a : Type) -> Gen MaybeEmpty (Vect n a) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue diff --git a/tests/derivation/infra/self print 003/DerivedGen.idr b/tests/derivation/infra/self print 003/DerivedGen.idr index 41333be59..56c2426f5 100644 --- a/tests/derivation/infra/self print 003/DerivedGen.idr +++ b/tests/derivation/infra/self print 003/DerivedGen.idr @@ -1,7 +1,8 @@ module DerivedGen import AlternativeCore -import PrintDerivation + +import Deriving.DepTyCheck.Gen import Data.Vect @@ -9,4 +10,5 @@ import Data.Vect %language ElabReflection -%runElab printDerived @{CallSelf} $ Fuel -> (Fuel -> Gen MaybeEmpty Nat) => Gen MaybeEmpty Bool +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{CallSelf} $ Fuel -> (Fuel -> Gen MaybeEmpty Nat) => Gen MaybeEmpty Bool diff --git a/tests/derivation/infra/self print 003/PrintDerivation.idr b/tests/derivation/infra/self print 003/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/infra/self print 003/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/infra/self print 003/expected b/tests/derivation/infra/self print 003/expected index 746ea7868..866795299 100644 --- a/tests/derivation/infra/self print 003/expected +++ b/tests/derivation/infra/self print 003/expected @@ -1,8 +1,6 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> {auto conArg : ((arg : Fuel) -> Gen MaybeEmpty Nat)} -> Gen MaybeEmpty Bool -LOG gen.auto.derive.infra:0: +1/2: Building AlternativeCore (AlternativeCore.idr) +2/2: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> {auto conArg : ((arg : Fuel) -> Gen MaybeEmpty Nat)} -> Gen MaybeEmpty Bool MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW diff --git a/tests/derivation/infra/self print 004/DerivedGen.idr b/tests/derivation/infra/self print 004/DerivedGen.idr index 9f091ccc6..4d6335d1a 100644 --- a/tests/derivation/infra/self print 004/DerivedGen.idr +++ b/tests/derivation/infra/self print 004/DerivedGen.idr @@ -1,7 +1,8 @@ module DerivedGen import AlternativeCore -import PrintDerivation + +import Deriving.DepTyCheck.Gen %default total @@ -10,4 +11,5 @@ import PrintDerivation data X : Nat -> Type where MkX : X n -%runElab printDerived @{CallSelf} $ Fuel -> (n : Nat) -> Gen MaybeEmpty (X n) +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{CallSelf} $ Fuel -> (n : Nat) -> Gen MaybeEmpty (X n) diff --git a/tests/derivation/infra/self print 004/PrintDerivation.idr b/tests/derivation/infra/self print 004/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/infra/self print 004/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/infra/self print 004/expected b/tests/derivation/infra/self print 004/expected index 94958397d..95197b39a 100644 --- a/tests/derivation/infra/self print 004/expected +++ b/tests/derivation/infra/self print 004/expected @@ -1,8 +1,6 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> (n : Nat) -> Gen MaybeEmpty (X n) -LOG gen.auto.derive.infra:0: +1/2: Building AlternativeCore (AlternativeCore.idr) +2/2: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> (n : Nat) -> Gen MaybeEmpty (X n) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue .=> local diff --git a/tests/derivation/infra/self print 005/DerivedGen.idr b/tests/derivation/infra/self print 005/DerivedGen.idr index 6a31b5345..290552a25 100644 --- a/tests/derivation/infra/self print 005/DerivedGen.idr +++ b/tests/derivation/infra/self print 005/DerivedGen.idr @@ -1,7 +1,8 @@ module DerivedGen import AlternativeCore -import PrintDerivation + +import Deriving.DepTyCheck.Gen %default total @@ -10,4 +11,5 @@ import PrintDerivation data X : Nat -> Type where MkX : X n -%runElab printDerived @{CallSelf} $ Fuel -> Gen MaybeEmpty (n : Nat ** X n) +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{CallSelf} $ Fuel -> Gen MaybeEmpty (n : Nat ** X n) diff --git a/tests/derivation/infra/self print 005/PrintDerivation.idr b/tests/derivation/infra/self print 005/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/infra/self print 005/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/infra/self print 005/expected b/tests/derivation/infra/self print 005/expected index 08f5edbab..499591456 100644 --- a/tests/derivation/infra/self print 005/expected +++ b/tests/derivation/infra/self print 005/expected @@ -1,8 +1,6 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> Gen MaybeEmpty (n : Nat ** X n) -LOG gen.auto.derive.infra:0: +1/2: Building AlternativeCore (AlternativeCore.idr) +2/2: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> Gen MaybeEmpty (n : Nat ** X n) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> local { decls = diff --git a/tests/derivation/infra/self print 006/DerivedGen.idr b/tests/derivation/infra/self print 006/DerivedGen.idr index e4952ed19..21a7db324 100644 --- a/tests/derivation/infra/self print 006/DerivedGen.idr +++ b/tests/derivation/infra/self print 006/DerivedGen.idr @@ -1,7 +1,8 @@ module DerivedGen import AlternativeCore -import PrintDerivation + +import Deriving.DepTyCheck.Gen import Data.Vect @@ -9,4 +10,5 @@ import Data.Vect %language ElabReflection -%runElab printDerived @{CallSelf} $ Fuel -> (a : Type) -> Gen MaybeEmpty (n : Nat ** Vect n a) +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{CallSelf} $ Fuel -> (a : Type) -> Gen MaybeEmpty (n : Nat ** Vect n a) diff --git a/tests/derivation/infra/self print 006/PrintDerivation.idr b/tests/derivation/infra/self print 006/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/infra/self print 006/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/infra/self print 006/expected b/tests/derivation/infra/self print 006/expected index be7aab0f6..99a721fa5 100644 --- a/tests/derivation/infra/self print 006/expected +++ b/tests/derivation/infra/self print 006/expected @@ -1,8 +1,6 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> (a : Type) -> Gen MaybeEmpty (n : Nat ** Vect n a) -LOG gen.auto.derive.infra:0: +1/2: Building AlternativeCore (AlternativeCore.idr) +2/2: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> (a : Type) -> Gen MaybeEmpty (n : Nat ** Vect n a) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue .=> local diff --git a/tests/derivation/infra/self print 007/DerivedGen.idr b/tests/derivation/infra/self print 007/DerivedGen.idr index 1a09914a4..1d14c2c68 100644 --- a/tests/derivation/infra/self print 007/DerivedGen.idr +++ b/tests/derivation/infra/self print 007/DerivedGen.idr @@ -1,7 +1,8 @@ module DerivedGen import AlternativeCore -import PrintDerivation + +import Deriving.DepTyCheck.Gen %default total @@ -11,4 +12,5 @@ data X : Nat -> Bool -> Type where X0 : X 0 True X1 : X 1 False -%runElab printDerived @{CallSelf} $ Fuel -> Gen MaybeEmpty (n : Nat ** b : Bool ** X n b) +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{CallSelf} $ Fuel -> Gen MaybeEmpty (n : Nat ** b : Bool ** X n b) diff --git a/tests/derivation/infra/self print 007/PrintDerivation.idr b/tests/derivation/infra/self print 007/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/infra/self print 007/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/infra/self print 007/expected b/tests/derivation/infra/self print 007/expected index b08bc1fa5..2db67de0a 100644 --- a/tests/derivation/infra/self print 007/expected +++ b/tests/derivation/infra/self print 007/expected @@ -1,8 +1,6 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> Gen MaybeEmpty (n : Nat ** (b : Bool ** X n b)) -LOG gen.auto.derive.infra:0: +1/2: Building AlternativeCore (AlternativeCore.idr) +2/2: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> Gen MaybeEmpty (n : Nat ** (b : Bool ** X n b)) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> local { decls = diff --git a/tests/derivation/infra/self print 008/DerivedGen.idr b/tests/derivation/infra/self print 008/DerivedGen.idr index 58cc37b76..aea37b3bd 100644 --- a/tests/derivation/infra/self print 008/DerivedGen.idr +++ b/tests/derivation/infra/self print 008/DerivedGen.idr @@ -1,7 +1,8 @@ module DerivedGen import AlternativeCore -import PrintDerivation + +import Deriving.DepTyCheck.Gen import Data.Vect @@ -9,4 +10,5 @@ import Data.Vect %language ElabReflection -%runElab printDerived @{CallSelf} $ Fuel -> Gen MaybeEmpty (n : Nat ** a : Type ** Vect n a) +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{CallSelf} $ Fuel -> Gen MaybeEmpty (n : Nat ** a : Type ** Vect n a) diff --git a/tests/derivation/infra/self print 008/PrintDerivation.idr b/tests/derivation/infra/self print 008/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/infra/self print 008/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/infra/self print 008/expected b/tests/derivation/infra/self print 008/expected index 4864ed647..632e63eed 100644 --- a/tests/derivation/infra/self print 008/expected +++ b/tests/derivation/infra/self print 008/expected @@ -1,8 +1,6 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> Gen MaybeEmpty (n : Nat ** (a : Type ** Vect n a)) -LOG gen.auto.derive.infra:0: +1/2: Building AlternativeCore (AlternativeCore.idr) +2/2: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> Gen MaybeEmpty (n : Nat ** (a : Type ** Vect n a)) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> local { decls = diff --git a/tests/derivation/infra/self run 001/DerivedGen.idr b/tests/derivation/infra/self run 001/DerivedGen.idr index f927ee5de..694a37387 100644 --- a/tests/derivation/infra/self run 001/DerivedGen.idr +++ b/tests/derivation/infra/self run 001/DerivedGen.idr @@ -1,6 +1,8 @@ module DerivedGen import AlternativeCore + +import Deriving.DepTyCheck.Gen import RunDerivedGen %default total diff --git a/tests/derivation/infra/self run 002/DerivedGen.idr b/tests/derivation/infra/self run 002/DerivedGen.idr index c306187fb..a8e0cac23 100644 --- a/tests/derivation/infra/self run 002/DerivedGen.idr +++ b/tests/derivation/infra/self run 002/DerivedGen.idr @@ -1,6 +1,8 @@ module DerivedGen import AlternativeCore + +import Deriving.DepTyCheck.Gen import RunDerivedGen %default total diff --git a/tests/derivation/infra/self run 003/DerivedGen.idr b/tests/derivation/infra/self run 003/DerivedGen.idr index 33bfa8535..471f180b5 100644 --- a/tests/derivation/infra/self run 003/DerivedGen.idr +++ b/tests/derivation/infra/self run 003/DerivedGen.idr @@ -1,6 +1,8 @@ module DerivedGen import AlternativeCore + +import Deriving.DepTyCheck.Gen import RunDerivedGen %default total diff --git a/tests/derivation/infra/self run 004/DerivedGen.idr b/tests/derivation/infra/self run 004/DerivedGen.idr index cdc0a73ef..ecb4649a2 100644 --- a/tests/derivation/infra/self run 004/DerivedGen.idr +++ b/tests/derivation/infra/self run 004/DerivedGen.idr @@ -1,6 +1,8 @@ module DerivedGen import AlternativeCore + +import Deriving.DepTyCheck.Gen import RunDerivedGen %default total diff --git a/tests/derivation/infra/self run 005/DerivedGen.idr b/tests/derivation/infra/self run 005/DerivedGen.idr index e0255dd82..483e69d51 100644 --- a/tests/derivation/infra/self run 005/DerivedGen.idr +++ b/tests/derivation/infra/self run 005/DerivedGen.idr @@ -1,6 +1,8 @@ module DerivedGen import AlternativeCore + +import Deriving.DepTyCheck.Gen import RunDerivedGen %default total diff --git a/tests/derivation/infra/self run 006/DerivedGen.idr b/tests/derivation/infra/self run 006/DerivedGen.idr index 0ec6ac988..abb29f24a 100644 --- a/tests/derivation/infra/self run 006/DerivedGen.idr +++ b/tests/derivation/infra/self run 006/DerivedGen.idr @@ -1,6 +1,8 @@ module DerivedGen import AlternativeCore + +import Deriving.DepTyCheck.Gen import RunDerivedGen %default total diff --git a/tests/derivation/infra/self run 007/DerivedGen.idr b/tests/derivation/infra/self run 007/DerivedGen.idr index 34780b198..ab9c7e2cc 100644 --- a/tests/derivation/infra/self run 007/DerivedGen.idr +++ b/tests/derivation/infra/self run 007/DerivedGen.idr @@ -1,6 +1,8 @@ module DerivedGen import AlternativeCore + +import Deriving.DepTyCheck.Gen import RunDerivedGen import Data.Vect diff --git a/tests/derivation/infra/self run 008/DerivedGen.idr b/tests/derivation/infra/self run 008/DerivedGen.idr index ae584810e..4bb3af350 100644 --- a/tests/derivation/infra/self run 008/DerivedGen.idr +++ b/tests/derivation/infra/self run 008/DerivedGen.idr @@ -1,6 +1,8 @@ module DerivedGen import AlternativeCore + +import Deriving.DepTyCheck.Gen import RunDerivedGen import Data.Vect diff --git a/tests/derivation/infra/self run 009/DerivedGen.idr b/tests/derivation/infra/self run 009/DerivedGen.idr index 9b93eb3df..4b91b4388 100644 --- a/tests/derivation/infra/self run 009/DerivedGen.idr +++ b/tests/derivation/infra/self run 009/DerivedGen.idr @@ -1,6 +1,8 @@ module DerivedGen import AlternativeCore + +import Deriving.DepTyCheck.Gen import RunDerivedGen import Data.Vect diff --git a/tests/derivation/infra/self run 010/DerivedGen.idr b/tests/derivation/infra/self run 010/DerivedGen.idr index 68cc8b0b2..eef405f0f 100644 --- a/tests/derivation/infra/self run 010/DerivedGen.idr +++ b/tests/derivation/infra/self run 010/DerivedGen.idr @@ -1,6 +1,8 @@ module DerivedGen import AlternativeCore + +import Deriving.DepTyCheck.Gen import RunDerivedGen import Data.Vect diff --git a/tests/derivation/inputvalidation/_common/run b/tests/derivation/inputvalidation/_common/run index 0eb8a358f..12cade9be 100755 --- a/tests/derivation/inputvalidation/_common/run +++ b/tests/derivation/inputvalidation/_common/run @@ -1,6 +1,10 @@ rm -rf build +NAMES_CLEANER="$(dirname "$(dirname "$(realpath "$1")")")"/.clean-names + +{ flock "$1" pack -q install-deps validate-input.ipkg && \ idris2 --check --no-color --console-width 0 --no-banner --find-ipkg ValidateInput.idr +} | "$NAMES_CLEANER" rm -rf build diff --git a/tests/derivation/inputvalidation/bad-args-in-target-type/expected b/tests/derivation/inputvalidation/bad-args-in-target-type/expected index d9d83dcca..0caef74a1 100644 --- a/tests/derivation/inputvalidation/bad-args-in-target-type/expected +++ b/tests/derivation/inputvalidation/bad-args-in-target-type/expected @@ -1,7 +1,7 @@ 1/1: Building ValidateInput (ValidateInput.idr) Error: While processing right hand side of genY_Int. Error during reflection: Target type's argument must be a variable name -ValidateInput:14:55--14:58 +ValidateInput:1 10 | MkY : Y Int String 11 | 12 | --- Non-variable arguments of the target type --- @@ -11,7 +11,7 @@ ValidateInput:14:55--14:58 Error: While processing right hand side of genY_same_param. Error during reflection: All arguments of the target type must be different -ValidateInput:17:58--17:63 +ValidateInput:2 13 | 14 | genY_Int : Fuel -> (a : Type) -> Gen MaybeEmpty $ Y a Int 15 | genY_Int = deriveGen diff --git a/tests/derivation/inputvalidation/bad-fuel/expected b/tests/derivation/inputvalidation/bad-fuel/expected index dcd2c608f..5841b01d3 100644 --- a/tests/derivation/inputvalidation/bad-fuel/expected +++ b/tests/derivation/inputvalidation/bad-fuel/expected @@ -1,7 +1,7 @@ 1/1: Building ValidateInput (ValidateInput.idr) Error: While processing right hand side of genY_noFuel_given. Error during reflection: The first argument must be explicit, unnamed, present at runtime and of type `Fuel` -ValidateInput:16:29--16:33 +ValidateInput:1 12 | MkY : Y Int String 13 | 14 | --- No fuel argument --- @@ -11,7 +11,7 @@ ValidateInput:16:29--16:33 Error: While processing right hand side of genY_noFuel_given'. Error during reflection: The first argument must be explicit, unnamed, present at runtime and of type `Fuel` -ValidateInput:19:22--19:25 +ValidateInput:2 15 | 16 | genY_noFuel_given : (a, b : Type) -> Gen MaybeEmpty $ Y a b 17 | genY_noFuel_given = deriveGen @@ -21,7 +21,7 @@ ValidateInput:19:22--19:25 Error: While processing right hand side of genY_noFuel_given''. Error during reflection: The first argument must be of type `Fuel` -ValidateInput:22:23--22:24 +ValidateInput:3 18 | 19 | genY_noFuel_given' : Int -> (a, b : Type) -> Gen MaybeEmpty $ Y a b 20 | genY_noFuel_given' = deriveGen @@ -31,7 +31,7 @@ ValidateInput:22:23--22:24 Error: While processing right hand side of genY_noFuel_mid. Error during reflection: The first argument must be explicit, unnamed, present at runtime and of type `Fuel` -ValidateInput:25:24--25:28 +ValidateInput:4 21 | 22 | genY_noFuel_given'' : X -> (a, b : Type) -> Gen MaybeEmpty $ Y a b 23 | genY_noFuel_given'' = deriveGen @@ -41,7 +41,7 @@ ValidateInput:25:24--25:28 Error: While processing right hand side of genY_noFuel_mid'. Error during reflection: The first argument must be explicit, unnamed, present at runtime and of type `Fuel` -ValidateInput:28:25--28:29 +ValidateInput:5 24 | 25 | genY_noFuel_mid : (b : Type) -> Gen MaybeEmpty (a ** Y a b) 26 | genY_noFuel_mid = deriveGen @@ -51,7 +51,7 @@ ValidateInput:28:25--28:29 Error: While processing right hand side of genY_noFuel_gened. Error during reflection: No arguments in the generator function signature, at least a fuel argument must be present -ValidateInput:31:21--31:53 +ValidateInput:6 27 | 28 | genY_noFuel_mid' : (b : Type) -> Gen MaybeEmpty $ DPair {a = Type, p = \a => Y a b} 29 | genY_noFuel_mid' = deriveGen @@ -61,7 +61,7 @@ ValidateInput:31:21--31:53 Error: While processing right hand side of genY_missplFuel_aft. Error during reflection: The first argument must be explicit, unnamed, present at runtime and of type `Fuel` -ValidateInput:36:31--36:35 +ValidateInput:7 32 | genY_noFuel_gened = deriveGen 33 | 34 | --- Misplaced fuel argument --- @@ -71,7 +71,7 @@ ValidateInput:36:31--36:35 Error: While processing right hand side of genY_missplFuel_mid. Error during reflection: The first argument must be explicit, unnamed, present at runtime and of type `Fuel` -ValidateInput:39:28--39:32 +ValidateInput:8 35 | 36 | genY_missplFuel_aft : (a, b : Type) -> Fuel -> Gen MaybeEmpty $ Y a b 37 | genY_missplFuel_aft = deriveGen @@ -81,7 +81,7 @@ ValidateInput:39:28--39:32 Error: While processing right hand side of genY_missplFuel_aft_imp. Error during reflection: The first argument must be explicit, unnamed, present at runtime and of type `Fuel` -ValidateInput:50:35--50:39 +ValidateInput:9 46 | -- because even explicit setting type argument of `deriveGen` makes two signatures incompatible. 47 | 48 | --- Misplaced + implicit fuel argument --- @@ -91,7 +91,7 @@ ValidateInput:50:35--50:39 Error: While processing right hand side of genY_missplFuel_mid_imp. Error during reflection: The first argument must be explicit, unnamed, present at runtime and of type `Fuel` -ValidateInput:53:32--53:36 +ValidateInput:10 49 | 50 | genY_missplFuel_aft_imp : (a, b : Type) -> {_ : Fuel} -> Gen MaybeEmpty $ Y a b 51 | genY_missplFuel_aft_imp = deriveGen @@ -101,7 +101,7 @@ ValidateInput:53:32--53:36 Error: While processing right hand side of genY_missplFuel_aft_autoimpl_imp. Error during reflection: The first argument must be explicit, unnamed, present at runtime and of type `Fuel` -ValidateInput:56:78--56:82 +ValidateInput:11 52 | 53 | genY_missplFuel_mid_imp : (a : Type) -> {_ : Fuel} -> (b : Type) -> Gen MaybeEmpty $ Y a b 54 | genY_missplFuel_mid_imp = deriveGen @@ -111,7 +111,7 @@ ValidateInput:56:78--56:82 Error: While processing right hand side of genY_unnamed_imp_fuel. Error during reflection: The first argument must be explicit, unnamed, present at runtime and of type `Fuel` -ValidateInput:61:47--61:51 +ValidateInput:12 57 | genY_missplFuel_aft_autoimpl_imp = deriveGen 58 | 59 | --- Implicit fuel argument --- @@ -121,7 +121,7 @@ ValidateInput:61:47--61:51 Error: While processing right hand side of genY_named_imp_fuel. Error during reflection: The first argument must be explicit, unnamed, present at runtime and of type `Fuel` -ValidateInput:64:45--64:49 +ValidateInput:13 60 | 61 | genY_unnamed_imp_fuel : {_ : Fuel} -> (a, b : Type) -> Gen MaybeEmpty $ Y a b 62 | genY_unnamed_imp_fuel = deriveGen @@ -131,7 +131,7 @@ ValidateInput:64:45--64:49 Error: While processing right hand side of genY_autoimp_fuel. Error during reflection: The first argument must be explicit, unnamed, present at runtime and of type `Fuel` -ValidateInput:67:37--67:41 +ValidateInput:14 63 | 64 | genY_named_imp_fuel : {f : Fuel} -> (a, b : Type) -> Gen MaybeEmpty $ Y a b 65 | genY_named_imp_fuel = deriveGen @@ -141,7 +141,7 @@ ValidateInput:67:37--67:41 Error: While processing right hand side of genY_defaulted_fuel. Error during reflection: The first argument must be explicit, unnamed, present at runtime and of type `Fuel` -ValidateInput:70:60--70:64 +ValidateInput:15 66 | 67 | genY_autoimp_fuel : Fuel => (a, b : Type) -> Gen MaybeEmpty $ Y a b 68 | genY_autoimp_fuel = deriveGen @@ -151,7 +151,7 @@ ValidateInput:70:60--70:64 Error: While processing right hand side of genY_defaulted_fuel'. Error during reflection: The first argument must be explicit, unnamed, present at runtime and of type `Fuel` -ValidateInput:73:69--73:73 +ValidateInput:16 69 | 70 | genY_defaulted_fuel : {default Dry fuel : Fuel} -> (a, b : Type) -> Gen MaybeEmpty $ Y a b 71 | genY_defaulted_fuel = deriveGen @@ -161,7 +161,7 @@ ValidateInput:73:69--73:73 Error: While processing right hand side of genY_exp_named_fuel. Error during reflection: The first argument must be explicit, unnamed, present at runtime and of type `Fuel` -ValidateInput:78:31--78:35 +ValidateInput:17 74 | genY_defaulted_fuel' = deriveGen 75 | 76 | --- Named explicit fuel --- diff --git a/tests/derivation/inputvalidation/bad-param-names/expected b/tests/derivation/inputvalidation/bad-param-names/expected index 694d834b3..982b55514 100644 --- a/tests/derivation/inputvalidation/bad-param-names/expected +++ b/tests/derivation/inputvalidation/bad-param-names/expected @@ -1,7 +1,7 @@ 1/1: Building ValidateInput (ValidateInput.idr) Error: While processing right hand side of genY_unnamed_argument. Error during reflection: Explicit argument must be named and must not shadow any other name -ValidateInput:14:50--14:53 +ValidateInput:1 10 | MkY : Y Int String 11 | 12 | --- Not all arguments are named --- @@ -11,7 +11,7 @@ ValidateInput:14:50--14:53 Error: While processing right hand side of genY_shadowed_by_auto_argument. Error during reflection: Explicit argument must be named and must not shadow any other name -ValidateInput:19:58--19:62 +ValidateInput:2 15 | genY_unnamed_argument = deriveGen 16 | 17 | --- Arguments shadowing --- @@ -21,7 +21,7 @@ ValidateInput:19:58--19:62 Error: While processing right hand side of genY_shadowed_by_other_argument. Error during reflection: Explicit argument must be named and must not shadow any other name -ValidateInput:22:76--22:80 +ValidateInput:3 18 | 19 | genY_shadowed_by_auto_argument : DecEq a => Fuel -> (a : Type) -> (b : Type) -> Gen MaybeEmpty $ Y a b 20 | genY_shadowed_by_auto_argument = deriveGen diff --git a/tests/derivation/inputvalidation/external-gens/expected b/tests/derivation/inputvalidation/external-gens/expected index 305dd8884..69c742442 100644 --- a/tests/derivation/inputvalidation/external-gens/expected +++ b/tests/derivation/inputvalidation/external-gens/expected @@ -1,7 +1,7 @@ 1/1: Building ValidateInput (ValidateInput.idr) Error: While processing right hand side of genY_repX_autoimpl. Error during reflection: Repetition of an auto-implicit external generator -ValidateInput:18:84--18:85 +ValidateInput:1 14 | MkY : Y Int String 15 | 16 | --- Repeating external gens --- @@ -11,7 +11,7 @@ ValidateInput:18:84--18:85 Error: While processing right hand side of genY_nongen_autoimpl_list. Error during reflection: The result type of the generator function must be of type "`Gen MaybeEmpty` of desired result" -ValidateInput:23:46--23:54 +ValidateInput:2 19 | genY_repX_autoimpl = deriveGen 20 | 21 | --- Non-gen externals --- @@ -21,7 +21,7 @@ ValidateInput:23:46--23:54 Error: While processing right hand side of genY_nongen_autoimpl_pair. Error during reflection: No arguments in the generator function signature, at least a fuel argument must be present -ValidateInput:26:38--26:63 +ValidateInput:3 22 | 23 | genY_nongen_autoimpl_list : Fuel -> (Fuel -> List Int) => (a, b : Type) -> Gen MaybeEmpty $ Y a b 24 | genY_nongen_autoimpl_list = deriveGen @@ -31,7 +31,7 @@ ValidateInput:26:38--26:63 Error: While processing right hand side of genY_nongen_autoimpl_dpair. Error during reflection: The result type of the generator function must be of type "`Gen MaybeEmpty` of desired result" -ValidateInput:29:50--29:52 +ValidateInput:4 25 | 26 | genY_nongen_autoimpl_pair : Fuel -> (Fuel -> Gen MaybeEmpty X, Fuel -> Gen MaybeEmpty X') => (a, b : Type) -> Gen MaybeEmpty $ Y a b 27 | genY_nongen_autoimpl_pair = deriveGen @@ -41,7 +41,7 @@ ValidateInput:29:50--29:52 Error: While processing right hand side of genY_nongen_autoimpl_list_nofuel. Error during reflection: No arguments in the generator function signature, at least a fuel argument must be present -ValidateInput:34:44--34:52 +ValidateInput:5 30 | genY_nongen_autoimpl_dpair = deriveGen 31 | 32 | --- Externals with no fuel --- @@ -51,7 +51,7 @@ ValidateInput:34:44--34:52 Error: While processing right hand side of genY_nongen_autoimpl_pair_nofuel. Error during reflection: No arguments in the generator function signature, at least a fuel argument must be present -ValidateInput:37:45--37:62 +ValidateInput:6 33 | 34 | genY_nongen_autoimpl_list_nofuel : Fuel -> List Int => (a, b : Type) -> Gen MaybeEmpty $ Y a b 35 | genY_nongen_autoimpl_list_nofuel = deriveGen @@ -61,7 +61,7 @@ ValidateInput:37:45--37:62 Error: While processing right hand side of genY_nongen_autoimpl_dpair_nofuel. Error during reflection: No arguments in the generator function signature, at least a fuel argument must be present -ValidateInput:40:48--40:50 +ValidateInput:7 36 | 37 | genY_nongen_autoimpl_pair_nofuel : Fuel -> (Gen MaybeEmpty X, Gen MaybeEmpty X') => (a, b : Type) -> Gen MaybeEmpty $ Y a b 38 | genY_nongen_autoimpl_pair_nofuel = deriveGen @@ -71,7 +71,7 @@ ValidateInput:40:48--40:50 Error: While processing right hand side of genY_require_self_autoimpl. Error during reflection: External generators contain the generator asked to be derived -ValidateInput:46:67--46:70 +ValidateInput:8 42 | 43 | --- Result is alteady in externals --- 44 | @@ -81,7 +81,7 @@ ValidateInput:46:67--46:70 Error: While processing right hand side of genY_autoimpl_in_autoimpl. Error during reflection: Auto-implicit argument should not contain its own auto-implicit arguments -ValidateInput:53:87--53:90 +ValidateInput:9 49 | 50 | --- Auto-implicits are present inside auto-implicits --- 51 | diff --git a/tests/derivation/inputvalidation/non-gen-target-type/expected b/tests/derivation/inputvalidation/non-gen-target-type/expected index 8f8d6dce5..5f4276e6c 100644 --- a/tests/derivation/inputvalidation/non-gen-target-type/expected +++ b/tests/derivation/inputvalidation/non-gen-target-type/expected @@ -1,7 +1,7 @@ 1/1: Building ValidateInput (ValidateInput.idr) Error: While processing right hand side of list. Error during reflection: No arguments in the generator function signature, at least a fuel argument must be present -ValidateInput:14:8--14:16 +ValidateInput:1 10 | MkY : Y Int String 11 | 12 | --- Non-Gen type --- @@ -11,7 +11,7 @@ ValidateInput:14:8--14:16 Error: While processing right hand side of list'. Error during reflection: The result type of the generator function must be of type "`Gen MaybeEmpty` of desired result" -ValidateInput:17:17--17:25 +ValidateInput:2 13 | 14 | list : List Int 15 | list = deriveGen @@ -21,7 +21,7 @@ ValidateInput:17:17--17:25 Error: While processing right hand side of y. Error during reflection: No arguments in the generator function signature, at least a fuel argument must be present -ValidateInput:20:5--20:17 +ValidateInput:3 16 | 17 | list' : Fuel -> List Int 18 | list' = deriveGen @@ -31,7 +31,7 @@ ValidateInput:20:5--20:17 Error: While processing right hand side of y'. Error during reflection: The result type of the generator function must be of type "`Gen MaybeEmpty` of desired result" -ValidateInput:23:14--23:26 +ValidateInput:4 19 | 20 | y : Y Int String 21 | y = deriveGen diff --git a/tests/derivation/inputvalidation/odd-or-lacking-gen-params/expected b/tests/derivation/inputvalidation/odd-or-lacking-gen-params/expected index 42aef19d7..9dbf8dc2c 100644 --- a/tests/derivation/inputvalidation/odd-or-lacking-gen-params/expected +++ b/tests/derivation/inputvalidation/odd-or-lacking-gen-params/expected @@ -1,7 +1,7 @@ 1/1: Building ValidateInput (ValidateInput.idr) Error: While processing right hand side of genY_with_unrelated. Error during reflection: Generated parameter is not used in the target type -ValidateInput:14:77--14:80 +ValidateInput:1 10 | MkY : Y Int String 11 | 12 | --- Unrelated stuff in the resulting dpair --- @@ -11,7 +11,7 @@ ValidateInput:14:77--14:80 Error: While processing right hand side of genY_with_repeating_name_equityped. Error during reflection: Argument of dependent pair under the resulting `Gen` must be named -ValidateInput:17:60--17:106 +ValidateInput:2 13 | 14 | genY_with_unrelated : Fuel -> (a : Type) -> Gen MaybeEmpty (b : Type ** n : Nat ** Y a b) 15 | genY_with_unrelated = deriveGen @@ -25,7 +25,7 @@ and: Type Mismatch between: Nat and Type. -ValidateInput:20:105--20:106 +ValidateInput:3 16 | 17 | genY_with_repeating_name_equityped : Fuel -> (a : Type) -> Gen MaybeEmpty (b : Type ** b : Type ** Y a b) 18 | genY_with_repeating_name_equityped = deriveGen @@ -35,7 +35,7 @@ ValidateInput:20:105--20:106 Error: No type declaration for ValidateInput.genY_with_repeating_name_difflytyped. -ValidateInput:21:1--21:49 +ValidateInput:4 17 | genY_with_repeating_name_equityped : Fuel -> (a : Type) -> Gen MaybeEmpty (b : Type ** b : Type ** Y a b) 18 | genY_with_repeating_name_equityped = deriveGen 19 | @@ -49,7 +49,7 @@ and: Type Mismatch between: Nat and Type. -ValidateInput:23:90--23:98 +ValidateInput:5 19 | 20 | genY_with_repeating_name_difflytyped : Fuel -> (a : Type) -> Gen MaybeEmpty (b : Type ** b : Nat ** Y a b) 21 | genY_with_repeating_name_difflytyped = deriveGen @@ -59,7 +59,7 @@ ValidateInput:23:90--23:98 Error: While processing right hand side of genY_unused_argument. Error during reflection: Given parameter is not used in the target type -ValidateInput:28:54--28:57 +ValidateInput:6 24 | genY_with_repeating_name_difflytyped' = deriveGen 25 | 26 | --- Not all arguments are used --- diff --git a/tests/derivation/inputvalidation/unexpected-gen-target/expected b/tests/derivation/inputvalidation/unexpected-gen-target/expected index 212b4804d..7fbb0aa18 100644 --- a/tests/derivation/inputvalidation/unexpected-gen-target/expected +++ b/tests/derivation/inputvalidation/unexpected-gen-target/expected @@ -1,7 +1,7 @@ 1/1: Building ValidateInput (ValidateInput.idr) Error: While processing right hand side of genOfConcreteGen. Error during reflection: Target type's argument must be a variable name -ValidateInput:16:49--16:59 +ValidateInput:1 12 | MkY : Y Int String 13 | 14 | --- Gen MaybeEmpty of strange things --- @@ -11,7 +11,7 @@ ValidateInput:16:49--16:59 Error: While processing right hand side of genOfLazies. Error during reflection: Target type is not a simple name -ValidateInput:19:40--19:46 +ValidateInput:2 15 | 16 | genOfConcreteGen : Fuel -> Gen MaybeEmpty $ Gen MaybeEmpty X 17 | genOfConcreteGen = deriveGen @@ -21,7 +21,7 @@ ValidateInput:19:40--19:46 Error: While processing right hand side of genOfInfs. Error during reflection: Target type is not a simple name -ValidateInput:22:38--22:43 +ValidateInput:3 18 | 19 | genOfLazies : Fuel -> Gen MaybeEmpty $ Lazy X 20 | genOfLazies = deriveGen @@ -31,7 +31,7 @@ ValidateInput:22:38--22:43 Error: While processing right hand side of genOfDPair. Error during reflection: The result type of the generator function must be of type "`Gen MaybeEmpty` of desired result" -ValidateInput:25:25--25:27 +ValidateInput:4 21 | 22 | genOfInfs : Fuel -> Gen MaybeEmpty $ Inf X 23 | genOfInfs = deriveGen @@ -41,7 +41,7 @@ ValidateInput:25:25--25:27 Error: While processing right hand side of genOfPair. Error during reflection: The result type of the generator function must be of type "`Gen MaybeEmpty` of desired result" -ValidateInput:28:39--28:62 +ValidateInput:5 24 | 25 | genOfDPair : Fuel -> (a ** b ** Gen MaybeEmpty $ Y a b) 26 | genOfDPair = deriveGen @@ -51,7 +51,7 @@ ValidateInput:28:39--28:62 Error: While processing right hand side of genOfPair'. Error during reflection: The result type of the generator function must be of type "`Gen MaybeEmpty` of desired result" -ValidateInput:31:40--31:63 +ValidateInput:6 27 | 28 | genOfPair : Fuel -> (a, b : Type) -> (Gen MaybeEmpty (Y a b), Gen MaybeEmpty (Y a b)) 29 | genOfPair = deriveGen @@ -61,7 +61,7 @@ ValidateInput:31:40--31:63 Error: While processing right hand side of genOfFuns_pur. Error during reflection: Target type is not a simple name -ValidateInput:34:43--34:44 +ValidateInput:7 30 | 31 | genOfPair' : Fuel -> (a, b : Type) -> (Gen MaybeEmpty (Y a b), Gen MaybeEmpty X) 32 | genOfPair' = deriveGen @@ -71,7 +71,7 @@ ValidateInput:34:43--34:44 Error: While processing right hand side of genOfFuns_pur0s. Error during reflection: Target type is not a simple name -ValidateInput:37:47--37:48 +ValidateInput:8 33 | 34 | genOfFuns_pur : Fuel -> Gen MaybeEmpty $ (a : Type) -> (b : Type) -> Y a b 35 | genOfFuns_pur = deriveGen @@ -81,7 +81,7 @@ ValidateInput:37:47--37:48 Error: While processing right hand side of genOfFuns_pur1s. Error during reflection: Target type is not a simple name -ValidateInput:40:47--40:48 +ValidateInput:9 36 | 37 | genOfFuns_pur0s : Fuel -> Gen MaybeEmpty $ (0 a : Type) -> (0 b : Type) -> Y a b 38 | genOfFuns_pur0s = deriveGen @@ -91,7 +91,7 @@ ValidateInput:40:47--40:48 Error: While processing right hand side of genOfFuns_ins_pair. Error during reflection: Target type is not a simple name -ValidateInput:43:53--43:54 +ValidateInput:10 39 | 40 | genOfFuns_pur1s : Fuel -> Gen MaybeEmpty $ (1 a : Type) -> (1 b : Type) -> Y a b 41 | genOfFuns_pur1s = deriveGen @@ -101,7 +101,7 @@ ValidateInput:43:53--43:54 Error: While processing right hand side of genOfFuns_ins_pair0. Error during reflection: Target type is not a simple name -ValidateInput:46:56--46:57 +ValidateInput:11 42 | 43 | genOfFuns_ins_pair : Fuel -> Gen MaybeEmpty (a ** ((b : Type) -> Y a b)) 44 | genOfFuns_ins_pair = deriveGen @@ -111,7 +111,7 @@ ValidateInput:46:56--46:57 Error: While processing right hand side of genOfFuns_ins_pair1. Error during reflection: Target type is not a simple name -ValidateInput:49:56--49:57 +ValidateInput:12 45 | 46 | genOfFuns_ins_pair0 : Fuel -> Gen MaybeEmpty (a ** ((0 b : Type) -> Y a b)) 47 | genOfFuns_ins_pair0 = deriveGen @@ -121,7 +121,7 @@ ValidateInput:49:56--49:57 Error: While processing right hand side of genOfFuns_out_pair. Error during reflection: Target type is not a simple name -ValidateInput:52:48--52:49 +ValidateInput:13 48 | 49 | genOfFuns_ins_pair1 : Fuel -> Gen MaybeEmpty (a ** ((1 b : Type) -> Y a b)) 50 | genOfFuns_ins_pair1 = deriveGen @@ -131,7 +131,7 @@ ValidateInput:52:48--52:49 Error: While processing right hand side of genOfFuns_out_pair0. Error during reflection: Target type is not a simple name -ValidateInput:55:51--55:52 +ValidateInput:14 51 | 52 | genOfFuns_out_pair : Fuel -> Gen MaybeEmpty $ (b : Type) -> (a ** Y a b) 53 | genOfFuns_out_pair = deriveGen @@ -141,7 +141,7 @@ ValidateInput:55:51--55:52 Error: While processing right hand side of genOfFuns_out_pair1. Error during reflection: Target type is not a simple name -ValidateInput:58:51--58:52 +ValidateInput:15 54 | 55 | genOfFuns_out_pair0 : Fuel -> Gen MaybeEmpty $ (0 b : Type) -> (a ** Y a b) 56 | genOfFuns_out_pair0 = deriveGen @@ -151,7 +151,7 @@ ValidateInput:58:51--58:52 Error: While processing right hand side of nonEmptyGen. Error during reflection: Only `GenBeEmptyStatic` variant of generator is supported, `Test.DepTyCheck.Gen.Emptiness.NonEmpty` is given -ValidateInput:61:23--61:26 +ValidateInput:16 57 | 58 | genOfFuns_out_pair1 : Fuel -> Gen MaybeEmpty $ (1 b : Type) -> (a ** Y a b) 59 | genOfFuns_out_pair1 = deriveGen diff --git a/tests/derivation/inputvalidation/unexpected-multiplicity/expected b/tests/derivation/inputvalidation/unexpected-multiplicity/expected index 136b90875..8cbad615b 100644 --- a/tests/derivation/inputvalidation/unexpected-multiplicity/expected +++ b/tests/derivation/inputvalidation/unexpected-multiplicity/expected @@ -1,7 +1,7 @@ 1/1: Building ValidateInput (ValidateInput.idr) Error: While processing right hand side of genY_given_zero_fuel. Error during reflection: The first argument must be explicit, unnamed, present at runtime and of type `Fuel` -ValidateInput:18:31--18:35 +ValidateInput:1 14 | MkY : Y Int String 15 | 16 | --- Unexpected zero and linear arguments --- @@ -11,7 +11,7 @@ ValidateInput:18:31--18:35 Error: While processing right hand side of genY_given_zero_arg1. Error during reflection: Erased arguments are not supported in generator function signatures -ValidateInput:21:39--21:43 +ValidateInput:2 17 | 18 | genY_given_zero_fuel : (0 _ : Fuel) -> (a, b : Type) -> Gen MaybeEmpty $ Y a b 19 | genY_given_zero_fuel = deriveGen @@ -21,7 +21,7 @@ ValidateInput:21:39--21:43 Error: While processing right hand side of genY_given_zero_args. Error during reflection: Erased arguments are not supported in generator function signatures -ValidateInput:24:42--24:46 +ValidateInput:3 20 | 21 | genY_given_zero_arg1 : Fuel -> (0 a : Type) -> (b : Type) -> Gen MaybeEmpty $ Y a b 22 | genY_given_zero_arg1 = deriveGen @@ -31,7 +31,7 @@ ValidateInput:24:42--24:46 Error: While processing right hand side of genY_given_lin_fuel. Error during reflection: The first argument must be explicit, unnamed, present at runtime and of type `Fuel` -ValidateInput:27:30--27:34 +ValidateInput:4 23 | 24 | genY_given_zero_args : Fuel -> (0 a, b : Type) -> Gen MaybeEmpty $ Y a b 25 | genY_given_zero_args = deriveGen @@ -41,7 +41,7 @@ ValidateInput:27:30--27:34 Error: While processing right hand side of genY_given_lin_arg1. Error during reflection: Linear arguments are not supported in generator function signatures -ValidateInput:30:38--30:42 +ValidateInput:5 26 | 27 | genY_given_lin_fuel : (1 _ : Fuel) -> (a, b : Type) -> Gen MaybeEmpty $ Y a b 28 | genY_given_lin_fuel = deriveGen @@ -51,7 +51,7 @@ ValidateInput:30:38--30:42 Error: While processing right hand side of genY_given_lin_args. Error during reflection: Linear arguments are not supported in generator function signatures -ValidateInput:33:41--33:45 +ValidateInput:6 29 | 30 | genY_given_lin_arg1 : Fuel -> (1 a : Type) -> (b : Type) -> Gen MaybeEmpty $ Y a b 31 | genY_given_lin_arg1 = deriveGen @@ -61,7 +61,7 @@ ValidateInput:33:41--33:45 Error: While processing right hand side of genY_given_zero_lin_args. Error during reflection: Erased arguments are not supported in generator function signatures -ValidateInput:36:43--36:47 +ValidateInput:7 32 | 33 | genY_given_lin_args : Fuel -> (1 a, b : Type) -> Gen MaybeEmpty $ Y a b 34 | genY_given_lin_args = deriveGen diff --git a/tests/derivation/inputvalidation/wrong-params-order/expected b/tests/derivation/inputvalidation/wrong-params-order/expected index 22efed62b..76369b571 100644 --- a/tests/derivation/inputvalidation/wrong-params-order/expected +++ b/tests/derivation/inputvalidation/wrong-params-order/expected @@ -1,7 +1,7 @@ 1/1: Building ValidateInput (ValidateInput.idr) Error: While processing right hand side of genY_wrong_giv_order. Error during reflection: Given arguments must go in the same order as in the target type -ValidateInput:20:40--20:44 +ValidateInput:1 16 | -- TODO to add if it is needed 17 | 18 | --- Wrong order of parameters --- @@ -11,7 +11,7 @@ ValidateInput:20:40--20:44 Error: While processing right hand side of genX_wrong_giv_order_autoimpl. Error during reflection: Given arguments must go in the same order as in the target type -ValidateInput:23:58--23:62 +ValidateInput:2 19 | 20 | genY_wrong_giv_order : Fuel -> (b, a : Type) -> Gen MaybeEmpty $ Y a b 21 | genY_wrong_giv_order = deriveGen @@ -21,7 +21,7 @@ ValidateInput:23:58--23:62 Error: While processing right hand side of genX_wrong_giv_order_autoimpl_rep. Error during reflection: Given arguments must go in the same order as in the target type -ValidateInput:27:28--27:32 +ValidateInput:3 23 | genX_wrong_giv_order_autoimpl : Fuel -> (Fuel -> (b, a : Type) -> Gen MaybeEmpty $ Y a b) => Gen MaybeEmpty X 24 | genX_wrong_giv_order_autoimpl = deriveGen 25 | @@ -31,7 +31,7 @@ ValidateInput:27:28--27:32 Error: While processing right hand side of genY_wrong_gened_order. Error during reflection: Generated arguments must go in the same order as in the target type -ValidateInput:30:66--30:70 +ValidateInput:4 26 | genX_wrong_giv_order_autoimpl_rep : 27 | Fuel -> (Fuel -> (b, a : Type) -> Gen MaybeEmpty $ Y a b) => (Fuel -> (a, b : Type) -> Gen MaybeEmpty $ Y a b) => Gen MaybeEmpty X 28 | genX_wrong_giv_order_autoimpl_rep = deriveGen @@ -41,7 +41,7 @@ ValidateInput:30:66--30:70 Error: While processing right hand side of genY_wrong_gened_order'. Error during reflection: Generated arguments must go in the same order as in the target type -ValidateInput:11:10--11:14 +ValidateInput:5 07 | %default total 08 | 09 | data X = MkX @@ -51,7 +51,7 @@ ValidateInput:11:10--11:14 Error: While processing right hand side of genX_wrong_gened_order_autoimpl. Error during reflection: Generated arguments must go in the same order as in the target type -ValidateInput:36:84--36:88 +ValidateInput:6 32 | 33 | genY_wrong_gened_order' : Fuel -> Gen MaybeEmpty (b ** a ** Y a b) 34 | genY_wrong_gened_order' = deriveGen @@ -61,7 +61,7 @@ ValidateInput:36:84--36:88 Error: While processing right hand side of genX_wrong_gened_order_autoimpl_rep. Error during reflection: Generated arguments must go in the same order as in the target type -ValidateInput:40:52--40:56 +ValidateInput:7 36 | genX_wrong_gened_order_autoimpl : Fuel -> (Fuel -> Gen MaybeEmpty (b : Type ** a : Type ** Y a b)) => Gen MaybeEmpty X 37 | genX_wrong_gened_order_autoimpl = deriveGen 38 | diff --git a/tests/derivation/least-effort/print/adt/001 trivial/DerivedGen.idr b/tests/derivation/least-effort/print/adt/001 trivial/DerivedGen.idr index 202e0e384..d438f61f6 100644 --- a/tests/derivation/least-effort/print/adt/001 trivial/DerivedGen.idr +++ b/tests/derivation/least-effort/print/adt/001 trivial/DerivedGen.idr @@ -1,10 +1,10 @@ module DerivedGen -import AlternativeCore -import PrintDerivation +import Deriving.DepTyCheck.Gen %default total %language ElabReflection -%runElab printDerived @{MainCoreDerivator @{LeastEffort}} $ Fuel -> Gen MaybeEmpty Unit +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> Gen MaybeEmpty Unit diff --git a/tests/derivation/least-effort/print/adt/001 trivial/PrintDerivation.idr b/tests/derivation/least-effort/print/adt/001 trivial/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/adt/001 trivial/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/adt/001 trivial/expected b/tests/derivation/least-effort/print/adt/001 trivial/expected index 7c643cfb9..fdf376616 100644 --- a/tests/derivation/least-effort/print/adt/001 trivial/expected +++ b/tests/derivation/least-effort/print/adt/001 trivial/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> Gen MaybeEmpty () -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> Gen MaybeEmpty () MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> local { decls = diff --git a/tests/derivation/least-effort/print/adt/002 noparam/DerivedGen.idr b/tests/derivation/least-effort/print/adt/002 noparam/DerivedGen.idr index bd5f16e26..eb266dfee 100644 --- a/tests/derivation/least-effort/print/adt/002 noparam/DerivedGen.idr +++ b/tests/derivation/least-effort/print/adt/002 noparam/DerivedGen.idr @@ -1,10 +1,10 @@ module DerivedGen -import AlternativeCore -import PrintDerivation +import Deriving.DepTyCheck.Gen %default total %language ElabReflection -%runElab printDerived @{MainCoreDerivator @{LeastEffort}} $ Fuel -> Gen MaybeEmpty Bool +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> Gen MaybeEmpty Bool diff --git a/tests/derivation/least-effort/print/adt/002 noparam/PrintDerivation.idr b/tests/derivation/least-effort/print/adt/002 noparam/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/adt/002 noparam/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/adt/002 noparam/expected b/tests/derivation/least-effort/print/adt/002 noparam/expected index ef8b124d3..830ea4f10 100644 --- a/tests/derivation/least-effort/print/adt/002 noparam/expected +++ b/tests/derivation/least-effort/print/adt/002 noparam/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> Gen MaybeEmpty Bool -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> Gen MaybeEmpty Bool MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> local { decls = diff --git a/tests/derivation/least-effort/print/adt/003 noparam/AlternativeCore.idr b/tests/derivation/least-effort/print/adt/003 noparam/AlternativeCore.idr deleted file mode 120000 index 6da8d83f9..000000000 --- a/tests/derivation/least-effort/print/adt/003 noparam/AlternativeCore.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/AlternativeCore.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/adt/003 noparam/DerivedGen.idr b/tests/derivation/least-effort/print/adt/003 noparam/DerivedGen.idr index a8fe4be13..d0e80e601 100644 --- a/tests/derivation/least-effort/print/adt/003 noparam/DerivedGen.idr +++ b/tests/derivation/least-effort/print/adt/003 noparam/DerivedGen.idr @@ -1,10 +1,10 @@ module DerivedGen -import AlternativeCore -import PrintDerivation +import Deriving.DepTyCheck.Gen %default total %language ElabReflection -%runElab printDerived @{MainCoreDerivator @{LeastEffort}} $ Fuel -> Gen MaybeEmpty Nat +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> Gen MaybeEmpty Nat diff --git a/tests/derivation/least-effort/print/adt/003 noparam/PrintDerivation.idr b/tests/derivation/least-effort/print/adt/003 noparam/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/adt/003 noparam/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/adt/003 noparam/expected b/tests/derivation/least-effort/print/adt/003 noparam/expected index a8897149b..6d91ede24 100644 --- a/tests/derivation/least-effort/print/adt/003 noparam/expected +++ b/tests/derivation/least-effort/print/adt/003 noparam/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> Gen MaybeEmpty Nat -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> Gen MaybeEmpty Nat MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> local { decls = diff --git a/tests/derivation/least-effort/print/adt/004 noparam/AlternativeCore.idr b/tests/derivation/least-effort/print/adt/004 noparam/AlternativeCore.idr deleted file mode 120000 index 6da8d83f9..000000000 --- a/tests/derivation/least-effort/print/adt/004 noparam/AlternativeCore.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/AlternativeCore.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/adt/004 noparam/DerivedGen.idr b/tests/derivation/least-effort/print/adt/004 noparam/DerivedGen.idr index c2e5893ec..7fdeb9fae 100644 --- a/tests/derivation/least-effort/print/adt/004 noparam/DerivedGen.idr +++ b/tests/derivation/least-effort/print/adt/004 noparam/DerivedGen.idr @@ -1,7 +1,6 @@ module DerivedGen -import AlternativeCore -import PrintDerivation +import Deriving.DepTyCheck.Gen %default total @@ -11,4 +10,5 @@ data X : Type where E : X R : X -> Nat -> X -%runElab printDerived @{MainCoreDerivator @{LeastEffort}} $ Fuel -> Gen MaybeEmpty X +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> Gen MaybeEmpty X diff --git a/tests/derivation/least-effort/print/adt/004 noparam/PrintDerivation.idr b/tests/derivation/least-effort/print/adt/004 noparam/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/adt/004 noparam/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/adt/004 noparam/expected b/tests/derivation/least-effort/print/adt/004 noparam/expected index 6b7165e57..d1cf40ea6 100644 --- a/tests/derivation/least-effort/print/adt/004 noparam/expected +++ b/tests/derivation/least-effort/print/adt/004 noparam/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> Gen MaybeEmpty X -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> Gen MaybeEmpty X MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> local { decls = diff --git a/tests/derivation/least-effort/print/adt/005 param/AlternativeCore.idr b/tests/derivation/least-effort/print/adt/005 param/AlternativeCore.idr deleted file mode 120000 index 6da8d83f9..000000000 --- a/tests/derivation/least-effort/print/adt/005 param/AlternativeCore.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/AlternativeCore.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/adt/005 param/DerivedGen.idr b/tests/derivation/least-effort/print/adt/005 param/DerivedGen.idr index 91dfd05f6..280de2665 100644 --- a/tests/derivation/least-effort/print/adt/005 param/DerivedGen.idr +++ b/tests/derivation/least-effort/print/adt/005 param/DerivedGen.idr @@ -1,7 +1,6 @@ module DerivedGen -import AlternativeCore -import PrintDerivation +import Deriving.DepTyCheck.Gen %default total @@ -10,4 +9,5 @@ import PrintDerivation data X : Nat -> Type where MkX : X n -%runElab printDerived @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (n : Nat) -> Gen MaybeEmpty $ X n +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (n : Nat) -> Gen MaybeEmpty $ X n diff --git a/tests/derivation/least-effort/print/adt/005 param/PrintDerivation.idr b/tests/derivation/least-effort/print/adt/005 param/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/adt/005 param/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/adt/005 param/expected b/tests/derivation/least-effort/print/adt/005 param/expected index 39c757998..535ba4e03 100644 --- a/tests/derivation/least-effort/print/adt/005 param/expected +++ b/tests/derivation/least-effort/print/adt/005 param/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> (n : Nat) -> Gen MaybeEmpty (X n) -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> (n : Nat) -> Gen MaybeEmpty (X n) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue .=> local diff --git a/tests/derivation/least-effort/print/adt/006 param/AlternativeCore.idr b/tests/derivation/least-effort/print/adt/006 param/AlternativeCore.idr deleted file mode 120000 index 6da8d83f9..000000000 --- a/tests/derivation/least-effort/print/adt/006 param/AlternativeCore.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/AlternativeCore.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/adt/006 param/DerivedGen.idr b/tests/derivation/least-effort/print/adt/006 param/DerivedGen.idr index ae23d2d01..6a8c898ca 100644 --- a/tests/derivation/least-effort/print/adt/006 param/DerivedGen.idr +++ b/tests/derivation/least-effort/print/adt/006 param/DerivedGen.idr @@ -1,7 +1,6 @@ module DerivedGen -import AlternativeCore -import PrintDerivation +import Deriving.DepTyCheck.Gen %default total @@ -10,4 +9,5 @@ import PrintDerivation data X : Nat -> Type where MkX : X n -%runElab printDerived @{MainCoreDerivator @{LeastEffort}} $ Fuel -> Gen MaybeEmpty (n ** X n) +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> Gen MaybeEmpty (n ** X n) diff --git a/tests/derivation/least-effort/print/adt/006 param/PrintDerivation.idr b/tests/derivation/least-effort/print/adt/006 param/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/adt/006 param/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/adt/006 param/expected b/tests/derivation/least-effort/print/adt/006 param/expected index 590241e1b..7a6d17207 100644 --- a/tests/derivation/least-effort/print/adt/006 param/expected +++ b/tests/derivation/least-effort/print/adt/006 param/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> Gen MaybeEmpty (n : Nat ** X n) -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> Gen MaybeEmpty (n : Nat ** X n) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> local { decls = diff --git a/tests/derivation/least-effort/print/adt/007 right-to-left simple/AlternativeCore.idr b/tests/derivation/least-effort/print/adt/007 right-to-left simple/AlternativeCore.idr deleted file mode 120000 index 6da8d83f9..000000000 --- a/tests/derivation/least-effort/print/adt/007 right-to-left simple/AlternativeCore.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/AlternativeCore.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/adt/007 right-to-left simple/DerivedGen.idr b/tests/derivation/least-effort/print/adt/007 right-to-left simple/DerivedGen.idr index 88d9b7390..a470d2c59 100644 --- a/tests/derivation/least-effort/print/adt/007 right-to-left simple/DerivedGen.idr +++ b/tests/derivation/least-effort/print/adt/007 right-to-left simple/DerivedGen.idr @@ -1,7 +1,6 @@ module DerivedGen -import AlternativeCore -import PrintDerivation +import Deriving.DepTyCheck.Gen %default total @@ -13,4 +12,5 @@ data X : Nat -> Type where data Y : Type where MkY : {n : _} -> X n -> Y -%runElab printDerived @{MainCoreDerivator @{LeastEffort}} $ Fuel -> Gen MaybeEmpty Y +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> Gen MaybeEmpty Y diff --git a/tests/derivation/least-effort/print/adt/007 right-to-left simple/PrintDerivation.idr b/tests/derivation/least-effort/print/adt/007 right-to-left simple/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/adt/007 right-to-left simple/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/adt/007 right-to-left simple/expected b/tests/derivation/least-effort/print/adt/007 right-to-left simple/expected index 99902817d..710108193 100644 --- a/tests/derivation/least-effort/print/adt/007 right-to-left simple/expected +++ b/tests/derivation/least-effort/print/adt/007 right-to-left simple/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> Gen MaybeEmpty Y -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> Gen MaybeEmpty Y MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> local { decls = @@ -76,7 +73,7 @@ LOG gen.auto.derive.infra:0: [ var "Builtin.DPair.MkDPair" .$ bindVar "n" .$ bindVar "^bnd^{arg:2}" .= var "Prelude.pure" .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) - .$ (var "DerivedGen.MkY" .! ("n", var "n") .$ var "^bnd^{arg:2}") + .$ (var "DerivedGen.MkY" .! ("n", implicitTrue) .$ var "^bnd^{arg:2}") ] })) ] diff --git a/tests/derivation/least-effort/print/adt/008 right-to-left simple/AlternativeCore.idr b/tests/derivation/least-effort/print/adt/008 right-to-left simple/AlternativeCore.idr deleted file mode 120000 index 6da8d83f9..000000000 --- a/tests/derivation/least-effort/print/adt/008 right-to-left simple/AlternativeCore.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/AlternativeCore.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/adt/008 right-to-left simple/DerivedGen.idr b/tests/derivation/least-effort/print/adt/008 right-to-left simple/DerivedGen.idr index 5101f0ed9..f89c53349 100644 --- a/tests/derivation/least-effort/print/adt/008 right-to-left simple/DerivedGen.idr +++ b/tests/derivation/least-effort/print/adt/008 right-to-left simple/DerivedGen.idr @@ -1,7 +1,6 @@ module DerivedGen -import AlternativeCore -import PrintDerivation +import Deriving.DepTyCheck.Gen %default total @@ -13,4 +12,5 @@ data X : Nat -> Type where data Y : Type where MkY : X n -> Y -%runElab printDerived @{MainCoreDerivator @{LeastEffort}} $ Fuel -> Gen MaybeEmpty Y +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> Gen MaybeEmpty Y diff --git a/tests/derivation/least-effort/print/adt/008 right-to-left simple/PrintDerivation.idr b/tests/derivation/least-effort/print/adt/008 right-to-left simple/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/adt/008 right-to-left simple/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/adt/008 right-to-left simple/expected b/tests/derivation/least-effort/print/adt/008 right-to-left simple/expected index 99902817d..710108193 100644 --- a/tests/derivation/least-effort/print/adt/008 right-to-left simple/expected +++ b/tests/derivation/least-effort/print/adt/008 right-to-left simple/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> Gen MaybeEmpty Y -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> Gen MaybeEmpty Y MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> local { decls = @@ -76,7 +73,7 @@ LOG gen.auto.derive.infra:0: [ var "Builtin.DPair.MkDPair" .$ bindVar "n" .$ bindVar "^bnd^{arg:2}" .= var "Prelude.pure" .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) - .$ (var "DerivedGen.MkY" .! ("n", var "n") .$ var "^bnd^{arg:2}") + .$ (var "DerivedGen.MkY" .! ("n", implicitTrue) .$ var "^bnd^{arg:2}") ] })) ] diff --git a/tests/derivation/least-effort/print/adt/009 left-to-right/AlternativeCore.idr b/tests/derivation/least-effort/print/adt/009 left-to-right/AlternativeCore.idr deleted file mode 120000 index 6da8d83f9..000000000 --- a/tests/derivation/least-effort/print/adt/009 left-to-right/AlternativeCore.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/AlternativeCore.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/adt/009 left-to-right/DerivedGen.idr b/tests/derivation/least-effort/print/adt/009 left-to-right/DerivedGen.idr index 1ad7b0be4..13e836ca4 100644 --- a/tests/derivation/least-effort/print/adt/009 left-to-right/DerivedGen.idr +++ b/tests/derivation/least-effort/print/adt/009 left-to-right/DerivedGen.idr @@ -1,7 +1,6 @@ module DerivedGen -import AlternativeCore -import PrintDerivation +import Deriving.DepTyCheck.Gen %default total @@ -13,4 +12,5 @@ data X : Nat -> Type where data Y : Type where MkY : {n : _} -> X (n * 2) -> Y -%runElab printDerived @{MainCoreDerivator @{LeastEffort}} $ Fuel -> Gen MaybeEmpty Y +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> Gen MaybeEmpty Y diff --git a/tests/derivation/least-effort/print/adt/009 left-to-right/PrintDerivation.idr b/tests/derivation/least-effort/print/adt/009 left-to-right/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/adt/009 left-to-right/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/adt/009 left-to-right/expected b/tests/derivation/least-effort/print/adt/009 left-to-right/expected index 73df6e27f..e6e909f5b 100644 --- a/tests/derivation/least-effort/print/adt/009 left-to-right/expected +++ b/tests/derivation/least-effort/print/adt/009 left-to-right/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> Gen MaybeEmpty Y -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> Gen MaybeEmpty Y MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> local { decls = @@ -75,7 +72,7 @@ LOG gen.auto.derive.infra:0: .$ ( MkArg MW ExplicitArg (Just "^bnd^{arg:2}") implicitFalse .=> var "Prelude.pure" .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) - .$ (var "DerivedGen.MkY" .! ("n", var "n") .$ var "^bnd^{arg:2}")))) + .$ (var "DerivedGen.MkY" .! ("n", implicitTrue) .$ var "^bnd^{arg:2}")))) ] ] , scope = diff --git a/tests/derivation/least-effort/print/adt/010 right-to-left long-dpair/AlternativeCore.idr b/tests/derivation/least-effort/print/adt/010 right-to-left long-dpair/AlternativeCore.idr deleted file mode 120000 index 6da8d83f9..000000000 --- a/tests/derivation/least-effort/print/adt/010 right-to-left long-dpair/AlternativeCore.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/AlternativeCore.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/adt/010 right-to-left long-dpair/DerivedGen.idr b/tests/derivation/least-effort/print/adt/010 right-to-left long-dpair/DerivedGen.idr index 9952f7c21..b91ee3ecc 100644 --- a/tests/derivation/least-effort/print/adt/010 right-to-left long-dpair/DerivedGen.idr +++ b/tests/derivation/least-effort/print/adt/010 right-to-left long-dpair/DerivedGen.idr @@ -1,7 +1,6 @@ module DerivedGen -import AlternativeCore -import PrintDerivation +import Deriving.DepTyCheck.Gen %default total @@ -13,4 +12,5 @@ data X : Nat -> Nat -> Type where data Y : Type where MkY : X n m -> Y -%runElab printDerived @{MainCoreDerivator @{LeastEffort}} $ Fuel -> Gen MaybeEmpty Y +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> Gen MaybeEmpty Y diff --git a/tests/derivation/least-effort/print/adt/010 right-to-left long-dpair/PrintDerivation.idr b/tests/derivation/least-effort/print/adt/010 right-to-left long-dpair/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/adt/010 right-to-left long-dpair/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/adt/010 right-to-left long-dpair/expected b/tests/derivation/least-effort/print/adt/010 right-to-left long-dpair/expected index e71b4834e..6694c4b8e 100644 --- a/tests/derivation/least-effort/print/adt/010 right-to-left long-dpair/expected +++ b/tests/derivation/least-effort/print/adt/010 right-to-left long-dpair/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> Gen MaybeEmpty Y -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> Gen MaybeEmpty Y MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> local { decls = @@ -82,7 +79,10 @@ LOG gen.auto.derive.infra:0: .$ (var "Builtin.DPair.MkDPair" .$ bindVar "m" .$ bindVar "^bnd^{arg:3}") .= var "Prelude.pure" .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) - .$ (var "DerivedGen.MkY" .! ("m", var "m") .! ("n", var "n") .$ var "^bnd^{arg:3}") + .$ ( var "DerivedGen.MkY" + .! ("m", implicitTrue) + .! ("n", implicitTrue) + .$ var "^bnd^{arg:3}") ] })) ] diff --git a/tests/derivation/least-effort/print/adt/011 right-to-left long-dpair/AlternativeCore.idr b/tests/derivation/least-effort/print/adt/011 right-to-left long-dpair/AlternativeCore.idr deleted file mode 120000 index 6da8d83f9..000000000 --- a/tests/derivation/least-effort/print/adt/011 right-to-left long-dpair/AlternativeCore.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/AlternativeCore.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/adt/011 right-to-left long-dpair/DerivedGen.idr b/tests/derivation/least-effort/print/adt/011 right-to-left long-dpair/DerivedGen.idr index bf720fef4..5d22026f1 100644 --- a/tests/derivation/least-effort/print/adt/011 right-to-left long-dpair/DerivedGen.idr +++ b/tests/derivation/least-effort/print/adt/011 right-to-left long-dpair/DerivedGen.idr @@ -1,7 +1,6 @@ module DerivedGen -import AlternativeCore -import PrintDerivation +import Deriving.DepTyCheck.Gen %default total @@ -13,4 +12,5 @@ data X : Nat -> Unit -> Type where data Y : Type where MkY : X n m -> Y -%runElab printDerived @{MainCoreDerivator @{LeastEffort}} $ Fuel -> Gen MaybeEmpty Y +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> Gen MaybeEmpty Y diff --git a/tests/derivation/least-effort/print/adt/011 right-to-left long-dpair/PrintDerivation.idr b/tests/derivation/least-effort/print/adt/011 right-to-left long-dpair/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/adt/011 right-to-left long-dpair/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/adt/011 right-to-left long-dpair/expected b/tests/derivation/least-effort/print/adt/011 right-to-left long-dpair/expected index 0c547800c..dbcf6c57f 100644 --- a/tests/derivation/least-effort/print/adt/011 right-to-left long-dpair/expected +++ b/tests/derivation/least-effort/print/adt/011 right-to-left long-dpair/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> Gen MaybeEmpty Y -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> Gen MaybeEmpty Y MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> local { decls = @@ -93,7 +90,10 @@ LOG gen.auto.derive.infra:0: .$ (var "Builtin.DPair.MkDPair" .$ bindVar "m" .$ bindVar "^bnd^{arg:3}") .= var "Prelude.pure" .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) - .$ (var "DerivedGen.MkY" .! ("m", var "m") .! ("n", var "n") .$ var "^bnd^{arg:3}") + .$ ( var "DerivedGen.MkY" + .! ("m", implicitTrue) + .! ("n", implicitTrue) + .$ var "^bnd^{arg:3}") ] })) ] diff --git a/tests/derivation/least-effort/print/adt/012 right-to-left chained/AlternativeCore.idr b/tests/derivation/least-effort/print/adt/012 right-to-left chained/AlternativeCore.idr deleted file mode 120000 index 6da8d83f9..000000000 --- a/tests/derivation/least-effort/print/adt/012 right-to-left chained/AlternativeCore.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/AlternativeCore.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/adt/012 right-to-left chained/DerivedGen.idr b/tests/derivation/least-effort/print/adt/012 right-to-left chained/DerivedGen.idr index f4a3c8c65..5d4d9c1f5 100644 --- a/tests/derivation/least-effort/print/adt/012 right-to-left chained/DerivedGen.idr +++ b/tests/derivation/least-effort/print/adt/012 right-to-left chained/DerivedGen.idr @@ -1,7 +1,6 @@ module DerivedGen -import AlternativeCore -import PrintDerivation +import Deriving.DepTyCheck.Gen %default total @@ -16,4 +15,5 @@ data X2 : Nat -> Type where data Y : Type where MkY : X2 n -> Y -%runElab printDerived @{MainCoreDerivator @{LeastEffort}} $ Fuel -> Gen MaybeEmpty Y +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> Gen MaybeEmpty Y diff --git a/tests/derivation/least-effort/print/adt/012 right-to-left chained/PrintDerivation.idr b/tests/derivation/least-effort/print/adt/012 right-to-left chained/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/adt/012 right-to-left chained/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/adt/012 right-to-left chained/expected b/tests/derivation/least-effort/print/adt/012 right-to-left chained/expected index 9ce8de8b5..9bddb0eec 100644 --- a/tests/derivation/least-effort/print/adt/012 right-to-left chained/expected +++ b/tests/derivation/least-effort/print/adt/012 right-to-left chained/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> Gen MaybeEmpty Y -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> Gen MaybeEmpty Y MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> local { decls = @@ -91,7 +88,7 @@ LOG gen.auto.derive.infra:0: [ var "Builtin.DPair.MkDPair" .$ bindVar "n" .$ bindVar "^bnd^{arg:3}" .= var "Prelude.pure" .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) - .$ (var "DerivedGen.MkY" .! ("n", var "n") .$ var "^bnd^{arg:3}") + .$ (var "DerivedGen.MkY" .! ("n", implicitTrue) .$ var "^bnd^{arg:3}") ] })) ] @@ -142,7 +139,7 @@ LOG gen.auto.derive.infra:0: .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) .$ ( var "Builtin.DPair.MkDPair" .$ implicitTrue - .$ (var "DerivedGen.MkX2" .$ var "n" .$ var "^bnd^{arg:4}")) + .$ (var "DerivedGen.MkX2" .$ implicitTrue .$ var "^bnd^{arg:4}")) ] })) ] diff --git a/tests/derivation/least-effort/print/adt/013 right-to-left nondet/AlternativeCore.idr b/tests/derivation/least-effort/print/adt/013 right-to-left nondet/AlternativeCore.idr deleted file mode 120000 index 6da8d83f9..000000000 --- a/tests/derivation/least-effort/print/adt/013 right-to-left nondet/AlternativeCore.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/AlternativeCore.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/adt/013 right-to-left nondet/DerivedGen.idr b/tests/derivation/least-effort/print/adt/013 right-to-left nondet/DerivedGen.idr index 40597e555..c7f1c7ac1 100644 --- a/tests/derivation/least-effort/print/adt/013 right-to-left nondet/DerivedGen.idr +++ b/tests/derivation/least-effort/print/adt/013 right-to-left nondet/DerivedGen.idr @@ -1,7 +1,6 @@ module DerivedGen -import AlternativeCore -import PrintDerivation +import Deriving.DepTyCheck.Gen %default total @@ -13,4 +12,5 @@ data X : Nat -> Nat -> Type where data Y : Type where MkY : X n m -> X n k -> Y -%runElab printDerived @{MainCoreDerivator @{LeastEffort}} $ Fuel -> Gen MaybeEmpty Y +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> Gen MaybeEmpty Y diff --git a/tests/derivation/least-effort/print/adt/013 right-to-left nondet/PrintDerivation.idr b/tests/derivation/least-effort/print/adt/013 right-to-left nondet/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/adt/013 right-to-left nondet/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/adt/013 right-to-left nondet/expected b/tests/derivation/least-effort/print/adt/013 right-to-left nondet/expected index b7ecd7eb4..8f66095cb 100644 --- a/tests/derivation/least-effort/print/adt/013 right-to-left nondet/expected +++ b/tests/derivation/least-effort/print/adt/013 right-to-left nondet/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> Gen MaybeEmpty Y -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> Gen MaybeEmpty Y MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> local { decls = @@ -108,9 +105,9 @@ LOG gen.auto.derive.infra:0: .= var "Prelude.pure" .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) .$ ( var "DerivedGen.MkY" - .! ("k", var "k") - .! ("m", var "m") - .! ("n", var "n") + .! ("k", implicitTrue) + .! ("m", implicitTrue) + .! ("n", implicitTrue) .$ var "^bnd^{arg:4}" .$ var "^bnd^{arg:3}") ] diff --git a/tests/derivation/least-effort/print/adt/014 right-to-left nondet ext/AlternativeCore.idr b/tests/derivation/least-effort/print/adt/014 right-to-left nondet ext/AlternativeCore.idr deleted file mode 120000 index 6da8d83f9..000000000 --- a/tests/derivation/least-effort/print/adt/014 right-to-left nondet ext/AlternativeCore.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/AlternativeCore.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/adt/014 right-to-left nondet ext/DerivedGen.idr b/tests/derivation/least-effort/print/adt/014 right-to-left nondet ext/DerivedGen.idr index e85864bb9..74b70321f 100644 --- a/tests/derivation/least-effort/print/adt/014 right-to-left nondet ext/DerivedGen.idr +++ b/tests/derivation/least-effort/print/adt/014 right-to-left nondet ext/DerivedGen.idr @@ -1,7 +1,6 @@ module DerivedGen -import AlternativeCore -import PrintDerivation +import Deriving.DepTyCheck.Gen %default total @@ -13,4 +12,6 @@ data X : String -> Nat -> Type where data Y : Type where MkY : X n m -> X n k -> Y -%runElab printDerived @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (Fuel -> Gen MaybeEmpty String) => (Fuel -> Gen MaybeEmpty Nat) => Gen MaybeEmpty Y +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ + Fuel -> (Fuel -> Gen MaybeEmpty String) => (Fuel -> Gen MaybeEmpty Nat) => Gen MaybeEmpty Y diff --git a/tests/derivation/least-effort/print/adt/014 right-to-left nondet ext/PrintDerivation.idr b/tests/derivation/least-effort/print/adt/014 right-to-left nondet ext/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/adt/014 right-to-left nondet ext/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/adt/014 right-to-left nondet ext/expected b/tests/derivation/least-effort/print/adt/014 right-to-left nondet ext/expected index d2d217c37..8ea46f840 100644 --- a/tests/derivation/least-effort/print/adt/014 right-to-left nondet ext/expected +++ b/tests/derivation/least-effort/print/adt/014 right-to-left nondet ext/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> {auto conArg : ((arg : Fuel) -> Gen MaybeEmpty String)} -> {auto conArg : ((arg : Fuel) -> Gen MaybeEmpty Nat)} -> Gen MaybeEmpty Y -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> {auto conArg : ((arg : Fuel) -> Gen MaybeEmpty String)} -> {auto conArg : ((arg : Fuel) -> Gen MaybeEmpty Nat)} -> Gen MaybeEmpty Y MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW @@ -109,9 +106,9 @@ LOG gen.auto.derive.infra:0: .= var "Prelude.pure" .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) .$ ( var "DerivedGen.MkY" - .! ("k", var "k") - .! ("m", var "m") - .! ("n", var "n") + .! ("k", implicitTrue) + .! ("m", implicitTrue) + .! ("n", implicitTrue) .$ var "^bnd^{arg:6}" .$ var "^bnd^{arg:5}") ] diff --git a/tests/derivation/least-effort/print/gadt/001 gadt/AlternativeCore.idr b/tests/derivation/least-effort/print/gadt/001 gadt/AlternativeCore.idr deleted file mode 120000 index 6da8d83f9..000000000 --- a/tests/derivation/least-effort/print/gadt/001 gadt/AlternativeCore.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/AlternativeCore.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/gadt/001 gadt/DerivedGen.idr b/tests/derivation/least-effort/print/gadt/001 gadt/DerivedGen.idr index 40d0b0b29..54948df97 100644 --- a/tests/derivation/least-effort/print/gadt/001 gadt/DerivedGen.idr +++ b/tests/derivation/least-effort/print/gadt/001 gadt/DerivedGen.idr @@ -1,7 +1,6 @@ module DerivedGen -import AlternativeCore -import PrintDerivation +import Deriving.DepTyCheck.Gen import Data.Fin @@ -9,4 +8,5 @@ import Data.Fin %language ElabReflection -%runElab printDerived @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (n : Nat) -> Gen MaybeEmpty $ Fin n +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (n : Nat) -> Gen MaybeEmpty $ Fin n diff --git a/tests/derivation/least-effort/print/gadt/001 gadt/PrintDerivation.idr b/tests/derivation/least-effort/print/gadt/001 gadt/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/gadt/001 gadt/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/gadt/001 gadt/expected b/tests/derivation/least-effort/print/gadt/001 gadt/expected index b25b5018c..93235eb8a 100644 --- a/tests/derivation/least-effort/print/gadt/001 gadt/expected +++ b/tests/derivation/least-effort/print/gadt/001 gadt/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> (n : Nat) -> Gen MaybeEmpty (Fin n) -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> (n : Nat) -> Gen MaybeEmpty (Fin n) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue .=> local @@ -75,7 +72,7 @@ LOG gen.auto.derive.infra:0: .$ ( MkArg MW ExplicitArg (Just "^bnd^{arg:1}") implicitFalse .=> var "Prelude.pure" .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) - .$ (var "Data.Fin.FS" .! ("k", var "k") .$ var "^bnd^{arg:1}"))) + .$ (var "Data.Fin.FS" .! ("k", implicitTrue) .$ var "^bnd^{arg:1}"))) , var "<>" .$ implicitTrue .$ implicitTrue .= var "empty" ] ] diff --git a/tests/derivation/least-effort/print/gadt/002 gadt/AlternativeCore.idr b/tests/derivation/least-effort/print/gadt/002 gadt/AlternativeCore.idr deleted file mode 120000 index 6da8d83f9..000000000 --- a/tests/derivation/least-effort/print/gadt/002 gadt/AlternativeCore.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/AlternativeCore.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/gadt/002 gadt/DerivedGen.idr b/tests/derivation/least-effort/print/gadt/002 gadt/DerivedGen.idr index f004bc480..45fe04ce8 100644 --- a/tests/derivation/least-effort/print/gadt/002 gadt/DerivedGen.idr +++ b/tests/derivation/least-effort/print/gadt/002 gadt/DerivedGen.idr @@ -1,7 +1,6 @@ module DerivedGen -import AlternativeCore -import PrintDerivation +import Deriving.DepTyCheck.Gen import Data.Fin @@ -9,4 +8,5 @@ import Data.Fin %language ElabReflection -%runElab printDerived @{MainCoreDerivator @{LeastEffort}} $ Fuel -> Gen MaybeEmpty (n ** Fin n) +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> Gen MaybeEmpty (n ** Fin n) diff --git a/tests/derivation/least-effort/print/gadt/002 gadt/PrintDerivation.idr b/tests/derivation/least-effort/print/gadt/002 gadt/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/gadt/002 gadt/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/gadt/002 gadt/expected b/tests/derivation/least-effort/print/gadt/002 gadt/expected index ebe5d06df..f34612b26 100644 --- a/tests/derivation/least-effort/print/gadt/002 gadt/expected +++ b/tests/derivation/least-effort/print/gadt/002 gadt/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> Gen MaybeEmpty (n : Nat ** Fin n) -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> Gen MaybeEmpty (n : Nat ** Fin n) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> local { decls = @@ -99,7 +96,7 @@ LOG gen.auto.derive.infra:0: .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) .$ ( var "Builtin.DPair.MkDPair" .$ implicitTrue - .$ (var "Data.Fin.FS" .! ("k", var "k") .$ var "^bnd^{arg:1}")) + .$ (var "Data.Fin.FS" .! ("k", implicitTrue) .$ var "^bnd^{arg:1}")) ] })) ] diff --git a/tests/derivation/least-effort/print/gadt/003 right-to-left nondet/AlternativeCore.idr b/tests/derivation/least-effort/print/gadt/003 right-to-left nondet/AlternativeCore.idr deleted file mode 120000 index 6da8d83f9..000000000 --- a/tests/derivation/least-effort/print/gadt/003 right-to-left nondet/AlternativeCore.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/AlternativeCore.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/gadt/003 right-to-left nondet/DerivedGen.idr b/tests/derivation/least-effort/print/gadt/003 right-to-left nondet/DerivedGen.idr index eb6cf7aea..713405d71 100644 --- a/tests/derivation/least-effort/print/gadt/003 right-to-left nondet/DerivedGen.idr +++ b/tests/derivation/least-effort/print/gadt/003 right-to-left nondet/DerivedGen.idr @@ -1,7 +1,6 @@ module DerivedGen -import AlternativeCore -import PrintDerivation +import Deriving.DepTyCheck.Gen %default total @@ -15,4 +14,5 @@ data Y : Type where MkY1 : X_GADT n m -> X_GADT n k -> Y MkY2 : X_GADT n m -> X_GADT k m -> Y -%runElab printDerived @{MainCoreDerivator @{LeastEffort}} $ Fuel -> Gen MaybeEmpty Y +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> Gen MaybeEmpty Y diff --git a/tests/derivation/least-effort/print/gadt/003 right-to-left nondet/PrintDerivation.idr b/tests/derivation/least-effort/print/gadt/003 right-to-left nondet/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/gadt/003 right-to-left nondet/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/gadt/003 right-to-left nondet/expected b/tests/derivation/least-effort/print/gadt/003 right-to-left nondet/expected index b4d6bc272..71ee4768c 100644 --- a/tests/derivation/least-effort/print/gadt/003 right-to-left nondet/expected +++ b/tests/derivation/least-effort/print/gadt/003 right-to-left nondet/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> Gen MaybeEmpty Y -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> Gen MaybeEmpty Y MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> local { decls = @@ -136,9 +133,9 @@ LOG gen.auto.derive.infra:0: .= var "Prelude.pure" .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) .$ ( var "DerivedGen.MkY1" - .! ("k", var "k") - .! ("m", var "m") - .! ("n", var "n") + .! ("k", implicitTrue) + .! ("m", implicitTrue) + .! ("n", implicitTrue) .$ var "^bnd^{arg:4}" .$ var "^bnd^{arg:3}") ] @@ -173,9 +170,9 @@ LOG gen.auto.derive.infra:0: .= var "Prelude.pure" .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) .$ ( var "DerivedGen.MkY2" - .! ("k", var "k") - .! ("m", var "m") - .! ("n", var "n") + .! ("k", implicitTrue) + .! ("m", implicitTrue) + .! ("n", implicitTrue) .$ var "^bnd^{arg:6}" .$ var "^bnd^{arg:5}") ] diff --git a/tests/derivation/least-effort/print/gadt/004 right-to-left det/AlternativeCore.idr b/tests/derivation/least-effort/print/gadt/004 right-to-left det/AlternativeCore.idr deleted file mode 120000 index 6da8d83f9..000000000 --- a/tests/derivation/least-effort/print/gadt/004 right-to-left det/AlternativeCore.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/AlternativeCore.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/gadt/004 right-to-left det/DerivedGen.idr b/tests/derivation/least-effort/print/gadt/004 right-to-left det/DerivedGen.idr index f305bb514..8e0d6746d 100644 --- a/tests/derivation/least-effort/print/gadt/004 right-to-left det/DerivedGen.idr +++ b/tests/derivation/least-effort/print/gadt/004 right-to-left det/DerivedGen.idr @@ -1,7 +1,6 @@ module DerivedGen -import AlternativeCore -import PrintDerivation +import Deriving.DepTyCheck.Gen %default total @@ -20,4 +19,5 @@ data Y : Type where -- Should be generated right-to-left because of GADT on the right MkY_RL : X_ADT n m -> X_GADT n k -> Y -%runElab printDerived @{MainCoreDerivator @{LeastEffort}} $ Fuel -> Gen MaybeEmpty Y +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> Gen MaybeEmpty Y diff --git a/tests/derivation/least-effort/print/gadt/004 right-to-left det/PrintDerivation.idr b/tests/derivation/least-effort/print/gadt/004 right-to-left det/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/gadt/004 right-to-left det/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/gadt/004 right-to-left det/expected b/tests/derivation/least-effort/print/gadt/004 right-to-left det/expected index da000ae97..f87e1f13e 100644 --- a/tests/derivation/least-effort/print/gadt/004 right-to-left det/expected +++ b/tests/derivation/least-effort/print/gadt/004 right-to-left det/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> Gen MaybeEmpty Y -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> Gen MaybeEmpty Y MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> local { decls = @@ -155,9 +152,9 @@ LOG gen.auto.derive.infra:0: .= var "Prelude.pure" .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) .$ ( var "DerivedGen.MkY_LR" - .! ("k", var "k") - .! ("m", var "m") - .! ("n", var "n") + .! ("k", implicitTrue) + .! ("m", implicitTrue) + .! ("n", implicitTrue) .$ var "^bnd^{arg:6}" .$ var "^bnd^{arg:5}") ] @@ -192,9 +189,9 @@ LOG gen.auto.derive.infra:0: .= var "Prelude.pure" .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) .$ ( var "DerivedGen.MkY_RL" - .! ("k", var "k") - .! ("m", var "m") - .! ("n", var "n") + .! ("k", implicitTrue) + .! ("m", implicitTrue) + .! ("n", implicitTrue) .$ var "^bnd^{arg:8}" .$ var "^bnd^{arg:7}") ] diff --git a/tests/derivation/least-effort/print/gadt/005 gadt/AlternativeCore.idr b/tests/derivation/least-effort/print/gadt/005 gadt/AlternativeCore.idr deleted file mode 120000 index 6da8d83f9..000000000 --- a/tests/derivation/least-effort/print/gadt/005 gadt/AlternativeCore.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/AlternativeCore.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/gadt/005 gadt/DerivedGen.idr b/tests/derivation/least-effort/print/gadt/005 gadt/DerivedGen.idr index 0d0f8a64f..34daa1aed 100644 --- a/tests/derivation/least-effort/print/gadt/005 gadt/DerivedGen.idr +++ b/tests/derivation/least-effort/print/gadt/005 gadt/DerivedGen.idr @@ -1,7 +1,6 @@ module DerivedGen -import AlternativeCore -import PrintDerivation +import Deriving.DepTyCheck.Gen %default total @@ -13,5 +12,6 @@ data D : Bool -> Type where TL : String -> D True TR : String -> D b -> D True -%runElab printDerived @{MainCoreDerivator @{LeastEffort}} $ +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (Fuel -> Gen MaybeEmpty Nat) => (Fuel -> Gen MaybeEmpty String) => Gen MaybeEmpty (b ** D b) diff --git a/tests/derivation/least-effort/print/gadt/005 gadt/PrintDerivation.idr b/tests/derivation/least-effort/print/gadt/005 gadt/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/gadt/005 gadt/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/gadt/005 gadt/expected b/tests/derivation/least-effort/print/gadt/005 gadt/expected index 79fb99a1f..c3afb08ef 100644 --- a/tests/derivation/least-effort/print/gadt/005 gadt/expected +++ b/tests/derivation/least-effort/print/gadt/005 gadt/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> {auto conArg : ((arg : Fuel) -> Gen MaybeEmpty Nat)} -> {auto conArg : ((arg : Fuel) -> Gen MaybeEmpty String)} -> Gen MaybeEmpty (b : Bool ** D b) -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> {auto conArg : ((arg : Fuel) -> Gen MaybeEmpty Nat)} -> {auto conArg : ((arg : Fuel) -> Gen MaybeEmpty String)} -> Gen MaybeEmpty (b : Bool ** D b) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW @@ -160,7 +157,7 @@ LOG gen.auto.derive.infra:0: .$ ( var "Builtin.DPair.MkDPair" .$ implicitTrue .$ ( var "DerivedGen.FN" - .! ("b", var "b") + .! ("b", implicitTrue) .$ var "^bnd^{arg:7}" .$ var "^bnd^{arg:6}"))) ] @@ -201,7 +198,7 @@ LOG gen.auto.derive.infra:0: .$ ( var "Builtin.DPair.MkDPair" .$ implicitTrue .$ ( var "DerivedGen.TR" - .! ("b", var "b") + .! ("b", implicitTrue) .$ var "^bnd^{arg:10}" .$ var "^bnd^{arg:9}"))) ] diff --git a/tests/derivation/least-effort/print/gadt/006 gadt/AlternativeCore.idr b/tests/derivation/least-effort/print/gadt/006 gadt/AlternativeCore.idr deleted file mode 120000 index 6da8d83f9..000000000 --- a/tests/derivation/least-effort/print/gadt/006 gadt/AlternativeCore.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/AlternativeCore.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/gadt/006 gadt/DerivedGen.idr b/tests/derivation/least-effort/print/gadt/006 gadt/DerivedGen.idr index 87d0fde8e..9b3625fd3 100644 --- a/tests/derivation/least-effort/print/gadt/006 gadt/DerivedGen.idr +++ b/tests/derivation/least-effort/print/gadt/006 gadt/DerivedGen.idr @@ -1,7 +1,6 @@ module DerivedGen -import AlternativeCore -import PrintDerivation +import Deriving.DepTyCheck.Gen %default total @@ -13,5 +12,6 @@ data D : Bool -> Type where TL : String -> D True TR : String -> D b -> D True -%runElab printDerived @{MainCoreDerivator @{LeastEffort}} $ +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (Fuel -> Gen MaybeEmpty Nat) => (Fuel -> Gen MaybeEmpty String) => (b : Bool) -> Gen MaybeEmpty $ D b diff --git a/tests/derivation/least-effort/print/gadt/006 gadt/PrintDerivation.idr b/tests/derivation/least-effort/print/gadt/006 gadt/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/gadt/006 gadt/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/gadt/006 gadt/expected b/tests/derivation/least-effort/print/gadt/006 gadt/expected index a0afbd896..90554da87 100644 --- a/tests/derivation/least-effort/print/gadt/006 gadt/expected +++ b/tests/derivation/least-effort/print/gadt/006 gadt/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> {auto conArg : ((arg : Fuel) -> Gen MaybeEmpty Nat)} -> {auto conArg : ((arg : Fuel) -> Gen MaybeEmpty String)} -> (b : Bool) -> Gen MaybeEmpty (D b) -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> {auto conArg : ((arg : Fuel) -> Gen MaybeEmpty Nat)} -> {auto conArg : ((arg : Fuel) -> Gen MaybeEmpty String)} -> (b : Bool) -> Gen MaybeEmpty (D b) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW @@ -155,7 +152,7 @@ LOG gen.auto.derive.infra:0: .=> var "Prelude.pure" .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) .$ ( var "DerivedGen.FN" - .! ("b", var "b") + .! ("b", implicitTrue) .$ var "^bnd^{arg:7}" .$ var "^bnd^{arg:6}")) ] @@ -196,7 +193,7 @@ LOG gen.auto.derive.infra:0: .=> var "Prelude.pure" .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) .$ ( var "DerivedGen.TR" - .! ("b", var "b") + .! ("b", implicitTrue) .$ var "^bnd^{arg:10}" .$ var "^bnd^{arg:9}")) ] @@ -358,7 +355,7 @@ LOG gen.auto.derive.infra:0: .$ ( var "Builtin.DPair.MkDPair" .$ implicitTrue .$ ( var "DerivedGen.FN" - .! ("b", var "b") + .! ("b", implicitTrue) .$ var "^bnd^{arg:7}" .$ var "^bnd^{arg:6}"))) ] @@ -399,7 +396,7 @@ LOG gen.auto.derive.infra:0: .$ ( var "Builtin.DPair.MkDPair" .$ implicitTrue .$ ( var "DerivedGen.TR" - .! ("b", var "b") + .! ("b", implicitTrue) .$ var "^bnd^{arg:10}" .$ var "^bnd^{arg:9}"))) ] diff --git a/tests/derivation/least-effort/print/gadt/007 eq-n/AlternativeCore.idr b/tests/derivation/least-effort/print/gadt/007 eq-n/AlternativeCore.idr deleted file mode 120000 index 6da8d83f9..000000000 --- a/tests/derivation/least-effort/print/gadt/007 eq-n/AlternativeCore.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/AlternativeCore.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/gadt/007 eq-n/DerivedGen.idr b/tests/derivation/least-effort/print/gadt/007 eq-n/DerivedGen.idr index c56ce79eb..814d0d989 100644 --- a/tests/derivation/least-effort/print/gadt/007 eq-n/DerivedGen.idr +++ b/tests/derivation/least-effort/print/gadt/007 eq-n/DerivedGen.idr @@ -1,7 +1,6 @@ module DerivedGen -import AlternativeCore -import PrintDerivation +import Deriving.DepTyCheck.Gen %default total @@ -10,4 +9,5 @@ import PrintDerivation data EqualN : Nat -> Nat -> Type where ReflN : EqualN x x -%runElab printDerived @{MainCoreDerivator @{LeastEffort}} $ Fuel -> Gen MaybeEmpty (a ** b ** EqualN a b) +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> Gen MaybeEmpty (a ** b ** EqualN a b) diff --git a/tests/derivation/least-effort/print/gadt/007 eq-n/PrintDerivation.idr b/tests/derivation/least-effort/print/gadt/007 eq-n/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/gadt/007 eq-n/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/gadt/007 eq-n/expected b/tests/derivation/least-effort/print/gadt/007 eq-n/expected index 4a2c5d0d4..29fea41fc 100644 --- a/tests/derivation/least-effort/print/gadt/007 eq-n/expected +++ b/tests/derivation/least-effort/print/gadt/007 eq-n/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> Gen MaybeEmpty (a : Nat ** (b : Nat ** EqualN a b)) -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> Gen MaybeEmpty (a : Nat ** (b : Nat ** EqualN a b)) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> local { decls = diff --git a/tests/derivation/least-effort/print/gadt/008 eq-n/AlternativeCore.idr b/tests/derivation/least-effort/print/gadt/008 eq-n/AlternativeCore.idr deleted file mode 120000 index 6da8d83f9..000000000 --- a/tests/derivation/least-effort/print/gadt/008 eq-n/AlternativeCore.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/AlternativeCore.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/gadt/008 eq-n/DerivedGen.idr b/tests/derivation/least-effort/print/gadt/008 eq-n/DerivedGen.idr index 0b0431fca..bfdde2106 100644 --- a/tests/derivation/least-effort/print/gadt/008 eq-n/DerivedGen.idr +++ b/tests/derivation/least-effort/print/gadt/008 eq-n/DerivedGen.idr @@ -1,7 +1,6 @@ module DerivedGen -import AlternativeCore -import PrintDerivation +import Deriving.DepTyCheck.Gen %default total @@ -10,4 +9,5 @@ import PrintDerivation data EqualN : Nat -> Nat -> Type where ReflN : EqualN x x -%runElab printDerived @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (a : Nat) -> Gen MaybeEmpty (b ** EqualN a b) +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (a : Nat) -> Gen MaybeEmpty (b ** EqualN a b) diff --git a/tests/derivation/least-effort/print/gadt/008 eq-n/PrintDerivation.idr b/tests/derivation/least-effort/print/gadt/008 eq-n/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/gadt/008 eq-n/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/gadt/008 eq-n/expected b/tests/derivation/least-effort/print/gadt/008 eq-n/expected index c09dcbce9..3264f7fdf 100644 --- a/tests/derivation/least-effort/print/gadt/008 eq-n/expected +++ b/tests/derivation/least-effort/print/gadt/008 eq-n/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> (a : Nat) -> Gen MaybeEmpty (b : Nat ** EqualN a b) -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> (a : Nat) -> Gen MaybeEmpty (b : Nat ** EqualN a b) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue .=> local diff --git a/tests/derivation/least-effort/print/gadt/009 eq-n/AlternativeCore.idr b/tests/derivation/least-effort/print/gadt/009 eq-n/AlternativeCore.idr deleted file mode 120000 index 6da8d83f9..000000000 --- a/tests/derivation/least-effort/print/gadt/009 eq-n/AlternativeCore.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/AlternativeCore.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/gadt/009 eq-n/DerivedGen.idr b/tests/derivation/least-effort/print/gadt/009 eq-n/DerivedGen.idr index 2bd218a02..ac62817a9 100644 --- a/tests/derivation/least-effort/print/gadt/009 eq-n/DerivedGen.idr +++ b/tests/derivation/least-effort/print/gadt/009 eq-n/DerivedGen.idr @@ -1,7 +1,6 @@ module DerivedGen -import AlternativeCore -import PrintDerivation +import Deriving.DepTyCheck.Gen %default total @@ -10,4 +9,5 @@ import PrintDerivation data EqualN : Nat -> Nat -> Type where ReflN : EqualN x x -%runElab printDerived @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (b : Nat) -> Gen MaybeEmpty (a ** EqualN a b) +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (b : Nat) -> Gen MaybeEmpty (a ** EqualN a b) diff --git a/tests/derivation/least-effort/print/gadt/009 eq-n/PrintDerivation.idr b/tests/derivation/least-effort/print/gadt/009 eq-n/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/gadt/009 eq-n/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/gadt/009 eq-n/expected b/tests/derivation/least-effort/print/gadt/009 eq-n/expected index 4bea3639d..fa8d8cf51 100644 --- a/tests/derivation/least-effort/print/gadt/009 eq-n/expected +++ b/tests/derivation/least-effort/print/gadt/009 eq-n/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> (b : Nat) -> Gen MaybeEmpty (a : Nat ** EqualN a b) -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> (b : Nat) -> Gen MaybeEmpty (a : Nat ** EqualN a b) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue .=> local diff --git a/tests/derivation/least-effort/print/gadt/010 eq-n/AlternativeCore.idr b/tests/derivation/least-effort/print/gadt/010 eq-n/AlternativeCore.idr deleted file mode 120000 index 6da8d83f9..000000000 --- a/tests/derivation/least-effort/print/gadt/010 eq-n/AlternativeCore.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/AlternativeCore.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/gadt/010 eq-n/DerivedGen.idr b/tests/derivation/least-effort/print/gadt/010 eq-n/DerivedGen.idr index 156e74605..512f66652 100644 --- a/tests/derivation/least-effort/print/gadt/010 eq-n/DerivedGen.idr +++ b/tests/derivation/least-effort/print/gadt/010 eq-n/DerivedGen.idr @@ -1,7 +1,6 @@ module DerivedGen -import AlternativeCore -import PrintDerivation +import Deriving.DepTyCheck.Gen %default total @@ -10,4 +9,5 @@ import PrintDerivation data EqualN : Nat -> Nat -> Type where ReflN : EqualN x x -%runElab printDerived @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (a, b : Nat) -> Gen MaybeEmpty $ EqualN a b +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (a, b : Nat) -> Gen MaybeEmpty $ EqualN a b diff --git a/tests/derivation/least-effort/print/gadt/010 eq-n/PrintDerivation.idr b/tests/derivation/least-effort/print/gadt/010 eq-n/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/gadt/010 eq-n/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/gadt/010 eq-n/expected b/tests/derivation/least-effort/print/gadt/010 eq-n/expected index 5004a4d81..f712dd332 100644 --- a/tests/derivation/least-effort/print/gadt/010 eq-n/expected +++ b/tests/derivation/least-effort/print/gadt/010 eq-n/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> (a : Nat) -> (b : Nat) -> Gen MaybeEmpty (EqualN a b) -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> (a : Nat) -> (b : Nat) -> Gen MaybeEmpty (EqualN a b) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue diff --git a/tests/derivation/least-effort/print/gadt/011 eq deepcons/AlternativeCore.idr b/tests/derivation/least-effort/print/gadt/011 eq deepcons/AlternativeCore.idr deleted file mode 120000 index 6da8d83f9..000000000 --- a/tests/derivation/least-effort/print/gadt/011 eq deepcons/AlternativeCore.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/AlternativeCore.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/gadt/011 eq deepcons/DerivedGen.idr b/tests/derivation/least-effort/print/gadt/011 eq deepcons/DerivedGen.idr index 39abcaed4..41a64330d 100644 --- a/tests/derivation/least-effort/print/gadt/011 eq deepcons/DerivedGen.idr +++ b/tests/derivation/least-effort/print/gadt/011 eq deepcons/DerivedGen.idr @@ -1,7 +1,6 @@ module DerivedGen -import AlternativeCore -import PrintDerivation +import Deriving.DepTyCheck.Gen %default total @@ -11,4 +10,5 @@ data LT2 : Nat -> Nat -> Type where Base : x `LT2` S (S x) Step : x `LT2` y -> x `LT2` S y -%runElab printDerived @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (Fuel -> Gen MaybeEmpty Nat) => Gen MaybeEmpty (a ** b ** LT2 a b) +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (Fuel -> Gen MaybeEmpty Nat) => Gen MaybeEmpty (a ** b ** LT2 a b) diff --git a/tests/derivation/least-effort/print/gadt/011 eq deepcons/PrintDerivation.idr b/tests/derivation/least-effort/print/gadt/011 eq deepcons/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/gadt/011 eq deepcons/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/gadt/011 eq deepcons/expected b/tests/derivation/least-effort/print/gadt/011 eq deepcons/expected index 91ef4015d..d9860ad11 100644 --- a/tests/derivation/least-effort/print/gadt/011 eq deepcons/expected +++ b/tests/derivation/least-effort/print/gadt/011 eq deepcons/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> {auto conArg : ((arg : Fuel) -> Gen MaybeEmpty Nat)} -> Gen MaybeEmpty (a : Nat ** (b : Nat ** LT2 a b)) -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> {auto conArg : ((arg : Fuel) -> Gen MaybeEmpty Nat)} -> Gen MaybeEmpty (a : Nat ** (b : Nat ** LT2 a b)) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW @@ -113,8 +110,8 @@ LOG gen.auto.derive.infra:0: .$ ( var "Builtin.DPair.MkDPair" .$ implicitTrue .$ ( var "DerivedGen.Step" - .! ("y", var "y") - .! ("x", var "x") + .! ("y", implicitTrue) + .! ("x", implicitTrue) .$ var "^bnd^{arg:4}"))) ] })) diff --git a/tests/derivation/least-effort/print/gadt/012 eq deepcons/AlternativeCore.idr b/tests/derivation/least-effort/print/gadt/012 eq deepcons/AlternativeCore.idr deleted file mode 120000 index 6da8d83f9..000000000 --- a/tests/derivation/least-effort/print/gadt/012 eq deepcons/AlternativeCore.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/AlternativeCore.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/gadt/012 eq deepcons/DerivedGen.idr b/tests/derivation/least-effort/print/gadt/012 eq deepcons/DerivedGen.idr index d21093527..3afc9b6f6 100644 --- a/tests/derivation/least-effort/print/gadt/012 eq deepcons/DerivedGen.idr +++ b/tests/derivation/least-effort/print/gadt/012 eq deepcons/DerivedGen.idr @@ -1,7 +1,6 @@ module DerivedGen -import AlternativeCore -import PrintDerivation +import Deriving.DepTyCheck.Gen %default total @@ -11,4 +10,5 @@ data LT2 : Nat -> Nat -> Type where Base : x `LT2` S (S x) Step : x `LT2` y -> x `LT2` S y -%runElab printDerived @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (a : Nat) -> Gen MaybeEmpty (b ** LT2 a b) +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (a : Nat) -> Gen MaybeEmpty (b ** LT2 a b) diff --git a/tests/derivation/least-effort/print/gadt/012 eq deepcons/PrintDerivation.idr b/tests/derivation/least-effort/print/gadt/012 eq deepcons/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/gadt/012 eq deepcons/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/gadt/012 eq deepcons/expected b/tests/derivation/least-effort/print/gadt/012 eq deepcons/expected index 5003f3937..ad9cd22e6 100644 --- a/tests/derivation/least-effort/print/gadt/012 eq deepcons/expected +++ b/tests/derivation/least-effort/print/gadt/012 eq deepcons/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> (a : Nat) -> Gen MaybeEmpty (b : Nat ** LT2 a b) -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> (a : Nat) -> Gen MaybeEmpty (b : Nat ** LT2 a b) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue .=> local @@ -92,7 +89,10 @@ LOG gen.auto.derive.infra:0: .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) .$ ( var "Builtin.DPair.MkDPair" .$ implicitTrue - .$ (var "DerivedGen.Step" .! ("y", var "y") .! ("x", var "x") .$ var "^bnd^{arg:3}")) + .$ ( var "DerivedGen.Step" + .! ("y", implicitTrue) + .! ("x", implicitTrue) + .$ var "^bnd^{arg:3}")) ] })) ] diff --git a/tests/derivation/least-effort/print/gadt/013 eq deepcons/AlternativeCore.idr b/tests/derivation/least-effort/print/gadt/013 eq deepcons/AlternativeCore.idr deleted file mode 120000 index 6da8d83f9..000000000 --- a/tests/derivation/least-effort/print/gadt/013 eq deepcons/AlternativeCore.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/AlternativeCore.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/gadt/013 eq deepcons/DerivedGen.idr b/tests/derivation/least-effort/print/gadt/013 eq deepcons/DerivedGen.idr index c3106bd02..f36073edc 100644 --- a/tests/derivation/least-effort/print/gadt/013 eq deepcons/DerivedGen.idr +++ b/tests/derivation/least-effort/print/gadt/013 eq deepcons/DerivedGen.idr @@ -1,7 +1,6 @@ module DerivedGen -import AlternativeCore -import PrintDerivation +import Deriving.DepTyCheck.Gen %default total @@ -11,4 +10,5 @@ data LT2 : Nat -> Nat -> Type where Base : x `LT2` S (S x) Step : x `LT2` y -> x `LT2` S y -%runElab printDerived @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (b : Nat) -> Gen MaybeEmpty (a ** LT2 a b) +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (b : Nat) -> Gen MaybeEmpty (a ** LT2 a b) diff --git a/tests/derivation/least-effort/print/gadt/013 eq deepcons/PrintDerivation.idr b/tests/derivation/least-effort/print/gadt/013 eq deepcons/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/gadt/013 eq deepcons/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/gadt/013 eq deepcons/expected b/tests/derivation/least-effort/print/gadt/013 eq deepcons/expected index 1fafeefe4..2e868552d 100644 --- a/tests/derivation/least-effort/print/gadt/013 eq deepcons/expected +++ b/tests/derivation/least-effort/print/gadt/013 eq deepcons/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> (b : Nat) -> Gen MaybeEmpty (a : Nat ** LT2 a b) -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> (b : Nat) -> Gen MaybeEmpty (a : Nat ** LT2 a b) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue .=> local @@ -95,7 +92,10 @@ LOG gen.auto.derive.infra:0: .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) .$ ( var "Builtin.DPair.MkDPair" .$ implicitTrue - .$ (var "DerivedGen.Step" .! ("y", var "y") .! ("x", var "x") .$ var "^bnd^{arg:3}")) + .$ ( var "DerivedGen.Step" + .! ("y", implicitTrue) + .! ("x", implicitTrue) + .$ var "^bnd^{arg:3}")) ] })) , var "<>" .$ implicitTrue .$ implicitTrue .= var "empty" diff --git a/tests/derivation/least-effort/print/gadt/014 eq deepcons/AlternativeCore.idr b/tests/derivation/least-effort/print/gadt/014 eq deepcons/AlternativeCore.idr deleted file mode 120000 index 6da8d83f9..000000000 --- a/tests/derivation/least-effort/print/gadt/014 eq deepcons/AlternativeCore.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/AlternativeCore.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/gadt/014 eq deepcons/DerivedGen.idr b/tests/derivation/least-effort/print/gadt/014 eq deepcons/DerivedGen.idr index d111b9eef..23510c2a9 100644 --- a/tests/derivation/least-effort/print/gadt/014 eq deepcons/DerivedGen.idr +++ b/tests/derivation/least-effort/print/gadt/014 eq deepcons/DerivedGen.idr @@ -1,7 +1,6 @@ module DerivedGen -import AlternativeCore -import PrintDerivation +import Deriving.DepTyCheck.Gen %default total @@ -11,4 +10,5 @@ data LT2 : Nat -> Nat -> Type where Base : x `LT2` S (S x) Step : x `LT2` y -> x `LT2` S y -%runElab printDerived @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (a, b : Nat) -> Gen MaybeEmpty $ LT2 a b +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (a, b : Nat) -> Gen MaybeEmpty $ LT2 a b diff --git a/tests/derivation/least-effort/print/gadt/014 eq deepcons/PrintDerivation.idr b/tests/derivation/least-effort/print/gadt/014 eq deepcons/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/gadt/014 eq deepcons/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/gadt/014 eq deepcons/expected b/tests/derivation/least-effort/print/gadt/014 eq deepcons/expected index d85a8a75f..dbb2af764 100644 --- a/tests/derivation/least-effort/print/gadt/014 eq deepcons/expected +++ b/tests/derivation/least-effort/print/gadt/014 eq deepcons/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> (a : Nat) -> (b : Nat) -> Gen MaybeEmpty (LT2 a b) -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> (a : Nat) -> (b : Nat) -> Gen MaybeEmpty (LT2 a b) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue @@ -104,7 +101,7 @@ LOG gen.auto.derive.infra:0: .$ ( MkArg MW ExplicitArg (Just "^bnd^{arg:3}") implicitFalse .=> var "Prelude.pure" .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) - .$ (var "DerivedGen.Step" .! ("y", var "y") .! ("x", var "x") .$ var "^bnd^{arg:3}"))) + .$ (var "DerivedGen.Step" .! ("y", implicitTrue) .! ("x", implicitTrue) .$ var "^bnd^{arg:3}"))) , var "<>" .$ implicitTrue .$ implicitTrue .$ implicitTrue .= var "empty" ] ] diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-big/AlternativeCore.idr b/tests/derivation/least-effort/print/regression/dependent-givens-big/AlternativeCore.idr deleted file mode 120000 index 6da8d83f9..000000000 --- a/tests/derivation/least-effort/print/regression/dependent-givens-big/AlternativeCore.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/AlternativeCore.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-big/PrintDerivation.idr b/tests/derivation/least-effort/print/regression/dependent-givens-big/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/regression/dependent-givens-big/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-big/DerivedGen.idr b/tests/derivation/least-effort/print/regression/dependent-givens-expl-big/DerivedGen.idr similarity index 87% rename from tests/derivation/least-effort/print/regression/dependent-givens-big/DerivedGen.idr rename to tests/derivation/least-effort/print/regression/dependent-givens-expl-big/DerivedGen.idr index aeaf0b5b2..c8446e81a 100644 --- a/tests/derivation/least-effort/print/regression/dependent-givens-big/DerivedGen.idr +++ b/tests/derivation/least-effort/print/regression/dependent-givens-expl-big/DerivedGen.idr @@ -1,7 +1,6 @@ module DerivedGen -import AlternativeCore -import PrintDerivation +import Deriving.DepTyCheck.Gen import Data.Fin @@ -63,4 +62,6 @@ namespace VectMaybeAnyType %language ElabReflection -%runElab printDerived @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (n : Nat) -> (v : VectMaybeAnyType n) -> Gen MaybeEmpty (i ** t ** AtIndex n i t v) +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ + Fuel -> (n : Nat) -> (v : VectMaybeAnyType n) -> Gen MaybeEmpty (i ** t ** AtIndex n i t v) diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-expl-big/RunDerivedGen.idr b/tests/derivation/least-effort/print/regression/dependent-givens-expl-big/RunDerivedGen.idr new file mode 120000 index 000000000..2b18cc56c --- /dev/null +++ b/tests/derivation/least-effort/print/regression/dependent-givens-expl-big/RunDerivedGen.idr @@ -0,0 +1 @@ +../_common/RunDerivedGen.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-expl-big/derive.ipkg b/tests/derivation/least-effort/print/regression/dependent-givens-expl-big/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/least-effort/print/regression/dependent-givens-expl-big/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-big/expected b/tests/derivation/least-effort/print/regression/dependent-givens-expl-big/expected similarity index 95% rename from tests/derivation/least-effort/print/regression/dependent-givens-big/expected rename to tests/derivation/least-effort/print/regression/dependent-givens-expl-big/expected index 3d6c7e79e..2ed020667 100644 --- a/tests/derivation/least-effort/print/regression/dependent-givens-big/expected +++ b/tests/derivation/least-effort/print/regression/dependent-givens-expl-big/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> (n : Nat) -> (v : VectMaybeAnyType n) -> Gen MaybeEmpty (i : Fin n ** (t : MaybeAnyType ** AtIndex n i t v)) -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> (n : Nat) -> (v : VectMaybeAnyType n) -> Gen MaybeEmpty (i : Fin n ** (t : MaybeAnyType ** AtIndex n i t v)) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue @@ -104,7 +101,10 @@ LOG gen.auto.derive.infra:0: .$ implicitTrue .$ ( var "Builtin.DPair.MkDPair" .$ implicitTrue - .$ (var "DerivedGen.VectMaybeAnyType.Here" .! ("n", var "n") .! ("xs", var "xs") .! ("x", var "x"))))) + .$ ( var "DerivedGen.VectMaybeAnyType.Here" + .! ("n", implicitTrue) + .! ("xs", var "xs") + .! ("x", var "x"))))) , var "<>" .$ implicitTrue .$ implicitTrue .$ implicitTrue .= var "empty" ] , IDef @@ -134,10 +134,10 @@ LOG gen.auto.derive.infra:0: .$ implicitTrue .$ ( var "DerivedGen.VectMaybeAnyType.There" .! ("z", var "z") - .! ("n", var "n") - .! ("zs", var "zs") - .! ("x", var "x") - .! ("i", var "i") + .! ("n", implicitTrue) + .! ("zs", implicitTrue) + .! ("x", implicitTrue) + .! ("i", implicitTrue) .$ var "^bnd^{arg:4}"))) ] })) diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-expl-big/run b/tests/derivation/least-effort/print/regression/dependent-givens-expl-big/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/least-effort/print/regression/dependent-givens-expl-big/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-expl-small-deep/DerivedGen.idr b/tests/derivation/least-effort/print/regression/dependent-givens-expl-small-deep/DerivedGen.idr new file mode 100644 index 000000000..3ccfbb61b --- /dev/null +++ b/tests/derivation/least-effort/print/regression/dependent-givens-expl-small-deep/DerivedGen.idr @@ -0,0 +1,15 @@ +module DerivedGen + +import Deriving.DepTyCheck.Gen + +import Data.Fin + +%default total + +data X : (n : Nat) -> Fin n -> Type where + MkX : (n : _) -> (f : _) -> X (S (S n)) (FS (FS f)) + +%language ElabReflection + +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (n : Nat) -> (f : Fin n) -> Gen MaybeEmpty $ X n f diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-expl-small-deep/RunDerivedGen.idr b/tests/derivation/least-effort/print/regression/dependent-givens-expl-small-deep/RunDerivedGen.idr new file mode 120000 index 000000000..2b18cc56c --- /dev/null +++ b/tests/derivation/least-effort/print/regression/dependent-givens-expl-small-deep/RunDerivedGen.idr @@ -0,0 +1 @@ +../_common/RunDerivedGen.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-expl-small-deep/derive.ipkg b/tests/derivation/least-effort/print/regression/dependent-givens-expl-small-deep/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/least-effort/print/regression/dependent-givens-expl-small-deep/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-small-deep/expected b/tests/derivation/least-effort/print/regression/dependent-givens-expl-small-deep/expected similarity index 92% rename from tests/derivation/least-effort/print/regression/dependent-givens-small-deep/expected rename to tests/derivation/least-effort/print/regression/dependent-givens-expl-small-deep/expected index bd2c4785d..44b63a6e3 100644 --- a/tests/derivation/least-effort/print/regression/dependent-givens-small-deep/expected +++ b/tests/derivation/least-effort/print/regression/dependent-givens-expl-small-deep/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> (n : Nat) -> (f : Fin n) -> Gen MaybeEmpty (X n f) -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> (n : Nat) -> (f : Fin n) -> Gen MaybeEmpty (X n f) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue @@ -57,7 +54,7 @@ LOG gen.auto.derive.infra:0: .$ (var "fromString" .$ primVal (Str "DerivedGen.MkX (orders)")) .$ ( var "Prelude.pure" .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) - .$ (var "DerivedGen.MkX" .$ var "n" .$ var "f")) + .$ (var "DerivedGen.MkX" .$ implicitTrue .$ var "f")) , var "<>" .$ implicitTrue .$ implicitTrue .$ implicitTrue .= var "empty" ] ] diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-expl-small-deep/run b/tests/derivation/least-effort/print/regression/dependent-givens-expl-small-deep/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/least-effort/print/regression/dependent-givens-expl-small-deep/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-expl-small-shallow/DerivedGen.idr b/tests/derivation/least-effort/print/regression/dependent-givens-expl-small-shallow/DerivedGen.idr new file mode 100644 index 000000000..2ada959bc --- /dev/null +++ b/tests/derivation/least-effort/print/regression/dependent-givens-expl-small-shallow/DerivedGen.idr @@ -0,0 +1,15 @@ +module DerivedGen + +import Deriving.DepTyCheck.Gen + +import Data.Fin + +%default total + +data X : (n : Nat) -> Fin n -> Type where + MkX : (n : _) -> (f : _) -> X (S n) (FS f) + +%language ElabReflection + +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (n : Nat) -> (f : Fin n) -> Gen MaybeEmpty $ X n f diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-expl-small-shallow/RunDerivedGen.idr b/tests/derivation/least-effort/print/regression/dependent-givens-expl-small-shallow/RunDerivedGen.idr new file mode 120000 index 000000000..2b18cc56c --- /dev/null +++ b/tests/derivation/least-effort/print/regression/dependent-givens-expl-small-shallow/RunDerivedGen.idr @@ -0,0 +1 @@ +../_common/RunDerivedGen.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-expl-small-shallow/derive.ipkg b/tests/derivation/least-effort/print/regression/dependent-givens-expl-small-shallow/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/least-effort/print/regression/dependent-givens-expl-small-shallow/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-small-shallow/expected b/tests/derivation/least-effort/print/regression/dependent-givens-expl-small-shallow/expected similarity index 92% rename from tests/derivation/least-effort/print/regression/dependent-givens-small-shallow/expected rename to tests/derivation/least-effort/print/regression/dependent-givens-expl-small-shallow/expected index d729941e8..9db94345c 100644 --- a/tests/derivation/least-effort/print/regression/dependent-givens-small-shallow/expected +++ b/tests/derivation/least-effort/print/regression/dependent-givens-expl-small-shallow/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> (n : Nat) -> (f : Fin n) -> Gen MaybeEmpty (X n f) -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> (n : Nat) -> (f : Fin n) -> Gen MaybeEmpty (X n f) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue @@ -55,7 +52,7 @@ LOG gen.auto.derive.infra:0: .$ (var "fromString" .$ primVal (Str "DerivedGen.MkX (orders)")) .$ ( var "Prelude.pure" .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) - .$ (var "DerivedGen.MkX" .$ var "n" .$ var "f")) + .$ (var "DerivedGen.MkX" .$ implicitTrue .$ var "f")) , var "<>" .$ implicitTrue .$ implicitTrue .$ implicitTrue .= var "empty" ] ] diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-expl-small-shallow/run b/tests/derivation/least-effort/print/regression/dependent-givens-expl-small-shallow/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/least-effort/print/regression/dependent-givens-expl-small-shallow/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-impl-big/DerivedGen.idr b/tests/derivation/least-effort/print/regression/dependent-givens-impl-big/DerivedGen.idr new file mode 100644 index 000000000..1503383f9 --- /dev/null +++ b/tests/derivation/least-effort/print/regression/dependent-givens-impl-big/DerivedGen.idr @@ -0,0 +1,68 @@ +module DerivedGen + +import Data.Fin + +import Deriving.DepTyCheck.Gen + +%default total + +data AnyType = PrimTy | RefTy + +DecEq AnyType where + decEq PrimTy PrimTy = Yes Refl + decEq PrimTy RefTy = No $ \case Refl impossible + decEq RefTy PrimTy = No $ \case Refl impossible + decEq RefTy RefTy = Yes Refl + +namespace MaybeAnyType + + -- specialisation since we don't support polymorphism over types yet + public export + data MaybeAnyType + = Nothing + | Just AnyType + + export + Injective MaybeAnyType.Just where + injective Refl = Refl + + export + DecEq MaybeAnyType where + decEq Nothing Nothing = Yes Refl + decEq Nothing (Just _) = No $ \case Refl impossible + decEq (Just _) Nothing = No $ \case Refl impossible + decEq (Just x) (Just y) = decEqCong $ decEq x y + +namespace VectMaybeAnyType + + -- specialisation since we don't support polymorphism over types yet + public export + data VectMaybeAnyType : Nat -> Type where + Nil : VectMaybeAnyType Z + (::) : MaybeAnyType -> VectMaybeAnyType n -> VectMaybeAnyType (S n) + + public export + index : Fin n -> VectMaybeAnyType n -> MaybeAnyType + index FZ (x::_ ) = x + index (FS i) (_::xs) = index i xs + + export + Biinjective VectMaybeAnyType.(::) where + biinjective Refl = (Refl, Refl) + + export + DecEq (VectMaybeAnyType n) where + decEq [] [] = Yes Refl + decEq (x::xs) (y::ys) = decEqCong2 (decEq x y) (decEq xs ys) + + public export + data AtIndex : Fin n -> MaybeAnyType -> VectMaybeAnyType n -> Type where + Here : AtIndex FZ x (x::xs) + There : {n : Nat} -> {0 i : Fin n} -> {0 zs : VectMaybeAnyType n} -> + AtIndex i x zs -> AtIndex (FS i) x (z::zs) + +%language ElabReflection + +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ + Fuel -> {n : Nat} -> (v : VectMaybeAnyType n) -> Gen MaybeEmpty (i ** t ** AtIndex i t v) diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-impl-big/RunDerivedGen.idr b/tests/derivation/least-effort/print/regression/dependent-givens-impl-big/RunDerivedGen.idr new file mode 120000 index 000000000..2b18cc56c --- /dev/null +++ b/tests/derivation/least-effort/print/regression/dependent-givens-impl-big/RunDerivedGen.idr @@ -0,0 +1 @@ +../_common/RunDerivedGen.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-impl-big/derive.ipkg b/tests/derivation/least-effort/print/regression/dependent-givens-impl-big/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/least-effort/print/regression/dependent-givens-impl-big/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-impl-big/expected b/tests/derivation/least-effort/print/regression/dependent-givens-impl-big/expected new file mode 100644 index 000000000..1fc94226b --- /dev/null +++ b/tests/derivation/least-effort/print/regression/dependent-givens-impl-big/expected @@ -0,0 +1,185 @@ +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> (v : VectMaybeAnyType n) -> Gen MaybeEmpty (i : Fin n ** (t : MaybeAnyType ** AtIndex i t v)) + MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") +.=> MkArg MW ImplicitArg (Just "outer^") implicitTrue +.=> MkArg MW ExplicitArg (Just "outer^") implicitTrue +.=> local + { decls = + [ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "[0, 3]" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") + .-> MkArg MW ExplicitArg (Just "{arg:1}") (var "DerivedGen.VectMaybeAnyType.VectMaybeAnyType" .$ var "n") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ ( var "Builtin.DPair.DPair" + .$ (var "Data.Fin.Fin" .$ var "n") + .$ ( MkArg MW ExplicitArg (Just "{arg:2}") (var "Data.Fin.Fin" .$ var "n") + .=> var "Builtin.DPair.DPair" + .$ var "DerivedGen.MaybeAnyType.MaybeAnyType" + .$ ( MkArg MW ExplicitArg (Just "{arg:3}") (var "DerivedGen.MaybeAnyType.MaybeAnyType") + .=> var "DerivedGen.VectMaybeAnyType.AtIndex" + .! ("n", var "n") + .$ var "{arg:2}" + .$ var "{arg:3}" + .$ var "{arg:1}"))) + }) + , IDef + emptyFC + "[0, 3]" + [ var "[0, 3]" .$ bindVar "^fuel_arg^" .$ bindVar "inter^" .$ bindVar "inter^<{arg:1}>" + .= local + { decls = + [ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "<>" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") + .-> MkArg MW ExplicitArg (Just "{arg:1}") (var "DerivedGen.VectMaybeAnyType.VectMaybeAnyType" .$ var "n") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ ( var "Builtin.DPair.DPair" + .$ (var "Data.Fin.Fin" .$ var "n") + .$ ( MkArg MW ExplicitArg (Just "{arg:2}") (var "Data.Fin.Fin" .$ var "n") + .=> var "Builtin.DPair.DPair" + .$ var "DerivedGen.MaybeAnyType.MaybeAnyType" + .$ ( MkArg MW ExplicitArg (Just "{arg:3}") (var "DerivedGen.MaybeAnyType.MaybeAnyType") + .=> var "DerivedGen.VectMaybeAnyType.AtIndex" + .! ("n", var "n") + .$ var "{arg:2}" + .$ var "{arg:3}" + .$ var "{arg:1}"))) + }) + , IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "<>" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") + .-> MkArg MW ExplicitArg (Just "{arg:1}") (var "DerivedGen.VectMaybeAnyType.VectMaybeAnyType" .$ var "n") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ ( var "Builtin.DPair.DPair" + .$ (var "Data.Fin.Fin" .$ var "n") + .$ ( MkArg MW ExplicitArg (Just "{arg:2}") (var "Data.Fin.Fin" .$ var "n") + .=> var "Builtin.DPair.DPair" + .$ var "DerivedGen.MaybeAnyType.MaybeAnyType" + .$ ( MkArg MW ExplicitArg (Just "{arg:3}") (var "DerivedGen.MaybeAnyType.MaybeAnyType") + .=> var "DerivedGen.VectMaybeAnyType.AtIndex" + .! ("n", var "n") + .$ var "{arg:2}" + .$ var "{arg:3}" + .$ var "{arg:1}"))) + }) + , IDef + emptyFC + "<>" + [ var "<>" + .$ bindVar "^cons_fuel^" + .$ (var "Prelude.Types.S" .$ bindVar "^bnd^{n:4022}") + .$ (var "DerivedGen.VectMaybeAnyType.(::)" .! ("n", implicitTrue) .$ bindVar "x" .$ bindVar "xs") + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "DerivedGen.VectMaybeAnyType.Here (orders)")) + .$ ( var "Prelude.pure" + .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) + .$ ( var "Builtin.DPair.MkDPair" + .$ implicitTrue + .$ ( var "Builtin.DPair.MkDPair" + .$ implicitTrue + .$ ( var "DerivedGen.VectMaybeAnyType.Here" + .! ("{n:4022}", implicitTrue) + .! ("xs", var "xs") + .! ("x", var "x"))))) + , var "<>" .$ implicitTrue .$ implicitTrue .$ implicitTrue .= var "empty" + ] + , IDef + emptyFC + "<>" + [ var "<>" + .$ bindVar "^cons_fuel^" + .$ (var "Prelude.Types.S" .$ bindVar "n") + .$ (var "DerivedGen.VectMaybeAnyType.(::)" .! ("n", implicitTrue) .$ bindVar "z" .$ bindVar "zs") + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "DerivedGen.VectMaybeAnyType.There (orders)")) + .$ ( var ">>=" + .$ (var "[0, 3]" .$ var "^cons_fuel^" .$ var "n" .$ var "zs") + .$ ( MkArg MW ExplicitArg (Just "{lamc:0}") implicitFalse + .=> iCase + { sc = var "{lamc:0}" + , ty = implicitFalse + , clauses = + [ var "Builtin.DPair.MkDPair" + .$ bindVar "i" + .$ (var "Builtin.DPair.MkDPair" .$ bindVar "x" .$ bindVar "^bnd^{arg:4}") + .= var "Prelude.pure" + .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) + .$ ( var "Builtin.DPair.MkDPair" + .$ implicitTrue + .$ ( var "Builtin.DPair.MkDPair" + .$ implicitTrue + .$ ( var "DerivedGen.VectMaybeAnyType.There" + .! ("z", var "z") + .! ("x", implicitTrue) + .! ("n", implicitTrue) + .! ("i", implicitTrue) + .! ("zs", implicitTrue) + .$ var "^bnd^{arg:4}"))) + ] + })) + , var "<>" .$ implicitTrue .$ implicitTrue .$ implicitTrue .= var "empty" + ] + ] + , scope = + iCase + { sc = var "^fuel_arg^" + , ty = var "Data.Fuel.Fuel" + , clauses = + [ var "Data.Fuel.Dry" + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "DerivedGen.VectMaybeAnyType.AtIndex[0, 3] (dry fuel)")) + .$ ( var "<>" + .$ var "Data.Fuel.Dry" + .$ var "inter^" + .$ var "inter^<{arg:1}>") + , var "Data.Fuel.More" .$ bindVar "^sub^fuel_arg^" + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "DerivedGen.VectMaybeAnyType.AtIndex[0, 3] (spend fuel)")) + .$ ( var "Test.DepTyCheck.Gen.frequency" + .$ ( var "::" + .$ ( var "Builtin.MkPair" + .$ var "Data.Nat1.one" + .$ ( var "<>" + .$ var "^fuel_arg^" + .$ var "inter^" + .$ var "inter^<{arg:1}>")) + .$ ( var "::" + .$ ( var "Builtin.MkPair" + .$ (var "Deriving.DepTyCheck.Util.Reflection.leftDepth" .$ var "^sub^fuel_arg^") + .$ ( var "<>" + .$ var "^sub^fuel_arg^" + .$ var "inter^" + .$ var "inter^<{arg:1}>")) + .$ var "Nil"))) + ] + } + } + ] + ] + , scope = var "[0, 3]" .$ var "^outmost-fuel^" .$ var "outer^" .$ var "outer^" + } + diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-impl-big/run b/tests/derivation/least-effort/print/regression/dependent-givens-impl-big/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/least-effort/print/regression/dependent-givens-impl-big/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-impl-small-deep/DerivedGen.idr b/tests/derivation/least-effort/print/regression/dependent-givens-impl-small-deep/DerivedGen.idr new file mode 100644 index 000000000..8530a597f --- /dev/null +++ b/tests/derivation/least-effort/print/regression/dependent-givens-impl-small-deep/DerivedGen.idr @@ -0,0 +1,15 @@ +module DerivedGen + +import Data.Fin + +import Deriving.DepTyCheck.Gen + +%default total + +data X : Fin n -> Type where + MkX : (n : _) -> (f : Fin n) -> X (FS (FS f)) + +%language ElabReflection + +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (n : Nat) -> (f : Fin n) -> Gen MaybeEmpty $ X f diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-impl-small-deep/RunDerivedGen.idr b/tests/derivation/least-effort/print/regression/dependent-givens-impl-small-deep/RunDerivedGen.idr new file mode 120000 index 000000000..2b18cc56c --- /dev/null +++ b/tests/derivation/least-effort/print/regression/dependent-givens-impl-small-deep/RunDerivedGen.idr @@ -0,0 +1 @@ +../_common/RunDerivedGen.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-impl-small-deep/derive.ipkg b/tests/derivation/least-effort/print/regression/dependent-givens-impl-small-deep/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/least-effort/print/regression/dependent-givens-impl-small-deep/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-impl-small-deep/expected b/tests/derivation/least-effort/print/regression/dependent-givens-impl-small-deep/expected new file mode 100644 index 000000000..a33ca544f --- /dev/null +++ b/tests/derivation/least-effort/print/regression/dependent-givens-impl-small-deep/expected @@ -0,0 +1,70 @@ +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> (n : Nat) -> (f : Fin n) -> Gen MaybeEmpty (X f) + MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") +.=> MkArg MW ExplicitArg (Just "outer^") implicitTrue +.=> MkArg MW ExplicitArg (Just "outer^") implicitTrue +.=> local + { decls = + [ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "[0, 1]" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") + .-> MkArg MW ExplicitArg (Just "{arg:1}") (var "Data.Fin.Fin" .$ var "n") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ (var "DerivedGen.X" .! ("n", var "n") .$ var "{arg:1}") + }) + , IDef + emptyFC + "[0, 1]" + [ var "[0, 1]" .$ bindVar "^fuel_arg^" .$ bindVar "inter^" .$ bindVar "inter^<{arg:1}>" + .= local + { decls = + [ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "<>" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") + .-> MkArg MW ExplicitArg (Just "{arg:1}") (var "Data.Fin.Fin" .$ var "n") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ (var "DerivedGen.X" .! ("n", var "n") .$ var "{arg:1}") + }) + , IDef + emptyFC + "<>" + [ var "<>" + .$ bindVar "^cons_fuel^" + .$ (var "Prelude.Types.S" .$ (var "Prelude.Types.S" .$ bindVar "n")) + .$ ( var "Data.Fin.FS" + .! ("k", var "Prelude.Types.S" .$ implicitTrue) + .$ (var "Data.Fin.FS" .! ("k", implicitTrue) .$ bindVar "f")) + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "DerivedGen.MkX (orders)")) + .$ ( var "Prelude.pure" + .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) + .$ (var "DerivedGen.MkX" .$ implicitTrue .$ var "f")) + , var "<>" .$ implicitTrue .$ implicitTrue .$ implicitTrue .= var "empty" + ] + ] + , scope = + var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "DerivedGen.X[0, 1] (non-recursive)")) + .$ (var "<>" .$ var "^fuel_arg^" .$ var "inter^" .$ var "inter^<{arg:1}>") + } + ] + ] + , scope = var "[0, 1]" .$ var "^outmost-fuel^" .$ var "outer^" .$ var "outer^" + } + diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-impl-small-deep/run b/tests/derivation/least-effort/print/regression/dependent-givens-impl-small-deep/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/least-effort/print/regression/dependent-givens-impl-small-deep/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-impl-small-shallow/DerivedGen.idr b/tests/derivation/least-effort/print/regression/dependent-givens-impl-small-shallow/DerivedGen.idr new file mode 100644 index 000000000..c8643b51e --- /dev/null +++ b/tests/derivation/least-effort/print/regression/dependent-givens-impl-small-shallow/DerivedGen.idr @@ -0,0 +1,15 @@ +module DerivedGen + +import Data.Fin + +import Deriving.DepTyCheck.Gen + +%default total + +data X : Fin n -> Type where + MkX : (n : _) -> (f : Fin n) -> X (FS f) + +%language ElabReflection + +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (n : Nat) -> (f : Fin n) -> Gen MaybeEmpty $ X f diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-impl-small-shallow/RunDerivedGen.idr b/tests/derivation/least-effort/print/regression/dependent-givens-impl-small-shallow/RunDerivedGen.idr new file mode 120000 index 000000000..2b18cc56c --- /dev/null +++ b/tests/derivation/least-effort/print/regression/dependent-givens-impl-small-shallow/RunDerivedGen.idr @@ -0,0 +1 @@ +../_common/RunDerivedGen.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-impl-small-shallow/derive.ipkg b/tests/derivation/least-effort/print/regression/dependent-givens-impl-small-shallow/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/least-effort/print/regression/dependent-givens-impl-small-shallow/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-impl-small-shallow/expected b/tests/derivation/least-effort/print/regression/dependent-givens-impl-small-shallow/expected new file mode 100644 index 000000000..b123bf5d3 --- /dev/null +++ b/tests/derivation/least-effort/print/regression/dependent-givens-impl-small-shallow/expected @@ -0,0 +1,68 @@ +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> (n : Nat) -> (f : Fin n) -> Gen MaybeEmpty (X f) + MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") +.=> MkArg MW ExplicitArg (Just "outer^") implicitTrue +.=> MkArg MW ExplicitArg (Just "outer^") implicitTrue +.=> local + { decls = + [ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "[0, 1]" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") + .-> MkArg MW ExplicitArg (Just "{arg:1}") (var "Data.Fin.Fin" .$ var "n") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ (var "DerivedGen.X" .! ("n", var "n") .$ var "{arg:1}") + }) + , IDef + emptyFC + "[0, 1]" + [ var "[0, 1]" .$ bindVar "^fuel_arg^" .$ bindVar "inter^" .$ bindVar "inter^<{arg:1}>" + .= local + { decls = + [ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "<>" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") + .-> MkArg MW ExplicitArg (Just "{arg:1}") (var "Data.Fin.Fin" .$ var "n") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ (var "DerivedGen.X" .! ("n", var "n") .$ var "{arg:1}") + }) + , IDef + emptyFC + "<>" + [ var "<>" + .$ bindVar "^cons_fuel^" + .$ (var "Prelude.Types.S" .$ bindVar "n") + .$ (var "Data.Fin.FS" .! ("k", implicitTrue) .$ bindVar "f") + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "DerivedGen.MkX (orders)")) + .$ ( var "Prelude.pure" + .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) + .$ (var "DerivedGen.MkX" .$ implicitTrue .$ var "f")) + , var "<>" .$ implicitTrue .$ implicitTrue .$ implicitTrue .= var "empty" + ] + ] + , scope = + var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "DerivedGen.X[0, 1] (non-recursive)")) + .$ (var "<>" .$ var "^fuel_arg^" .$ var "inter^" .$ var "inter^<{arg:1}>") + } + ] + ] + , scope = var "[0, 1]" .$ var "^outmost-fuel^" .$ var "outer^" .$ var "outer^" + } + diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-impl-small-shallow/run b/tests/derivation/least-effort/print/regression/dependent-givens-impl-small-shallow/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/least-effort/print/regression/dependent-givens-impl-small-shallow/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-small-deep/AlternativeCore.idr b/tests/derivation/least-effort/print/regression/dependent-givens-small-deep/AlternativeCore.idr deleted file mode 120000 index 6da8d83f9..000000000 --- a/tests/derivation/least-effort/print/regression/dependent-givens-small-deep/AlternativeCore.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/AlternativeCore.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-small-deep/DerivedGen.idr b/tests/derivation/least-effort/print/regression/dependent-givens-small-deep/DerivedGen.idr deleted file mode 100644 index 192202848..000000000 --- a/tests/derivation/least-effort/print/regression/dependent-givens-small-deep/DerivedGen.idr +++ /dev/null @@ -1,15 +0,0 @@ -module DerivedGen - -import AlternativeCore -import PrintDerivation - -import Data.Fin - -%default total - -data X : (n : Nat) -> Fin n -> Type where - MkX : (n : _) -> (f : _) -> X (S (S n)) (FS (FS f)) - -%language ElabReflection - -%runElab printDerived @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (n : Nat) -> (f : Fin n) -> Gen MaybeEmpty $ X n f diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-small-deep/PrintDerivation.idr b/tests/derivation/least-effort/print/regression/dependent-givens-small-deep/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/regression/dependent-givens-small-deep/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-small-shallow/AlternativeCore.idr b/tests/derivation/least-effort/print/regression/dependent-givens-small-shallow/AlternativeCore.idr deleted file mode 120000 index 6da8d83f9..000000000 --- a/tests/derivation/least-effort/print/regression/dependent-givens-small-shallow/AlternativeCore.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/AlternativeCore.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-small-shallow/DerivedGen.idr b/tests/derivation/least-effort/print/regression/dependent-givens-small-shallow/DerivedGen.idr deleted file mode 100644 index f05d5adea..000000000 --- a/tests/derivation/least-effort/print/regression/dependent-givens-small-shallow/DerivedGen.idr +++ /dev/null @@ -1,15 +0,0 @@ -module DerivedGen - -import AlternativeCore -import PrintDerivation - -import Data.Fin - -%default total - -data X : (n : Nat) -> Fin n -> Type where - MkX : (n : _) -> (f : _) -> X (S n) (FS f) - -%language ElabReflection - -%runElab printDerived @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (n : Nat) -> (f : Fin n) -> Gen MaybeEmpty $ X n f diff --git a/tests/derivation/least-effort/print/regression/dependent-givens-small-shallow/PrintDerivation.idr b/tests/derivation/least-effort/print/regression/dependent-givens-small-shallow/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/regression/dependent-givens-small-shallow/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/fin-inc/DerivedGen.idr b/tests/derivation/least-effort/print/regression/fin-inc/DerivedGen.idr new file mode 100644 index 000000000..e8a337d19 --- /dev/null +++ b/tests/derivation/least-effort/print/regression/fin-inc/DerivedGen.idr @@ -0,0 +1,15 @@ +module DerivedGen + +import Deriving.DepTyCheck.Gen + +%default total + +record FinInc n where + constructor MkFinInc + val : Nat + prf : LTE val n + +%language ElabReflection + +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> Gen MaybeEmpty (n ** FinInc n) diff --git a/tests/derivation/least-effort/print/regression/fin-inc/RunDerivedGen.idr b/tests/derivation/least-effort/print/regression/fin-inc/RunDerivedGen.idr new file mode 120000 index 000000000..2b18cc56c --- /dev/null +++ b/tests/derivation/least-effort/print/regression/fin-inc/RunDerivedGen.idr @@ -0,0 +1 @@ +../_common/RunDerivedGen.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/fin-inc/derive.ipkg b/tests/derivation/least-effort/print/regression/fin-inc/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/least-effort/print/regression/fin-inc/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/fin-inc/expected b/tests/derivation/least-effort/print/regression/fin-inc/expected new file mode 100644 index 000000000..f3a0bba56 --- /dev/null +++ b/tests/derivation/least-effort/print/regression/fin-inc/expected @@ -0,0 +1,294 @@ +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> Gen MaybeEmpty (n : Nat ** FinInc n) + MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") +.=> local + { decls = + [ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "[]" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ ( var "Builtin.DPair.DPair" + .$ implicitFalse + .$ (MkArg MW ExplicitArg (Just "n") implicitFalse .=> var "DerivedGen.FinInc" .$ var "n")) + }) + , IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "[]" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ ( var "Builtin.DPair.DPair" + .$ var "Prelude.Types.Nat" + .$ ( MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") + .=> var "Builtin.DPair.DPair" + .$ var "Prelude.Types.Nat" + .$ (MkArg MW ExplicitArg (Just "m") (var "Prelude.Types.Nat") .=> var "Data.Nat.LTE" .$ var "n" .$ var "m"))) + }) + , IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "[]" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> var "Test.DepTyCheck.Gen.Gen" .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" .$ var "Prelude.Types.Nat" + }) + , IDef + emptyFC + "[]" + [ var "[]" .$ bindVar "^fuel_arg^" + .= local + { decls = + [ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "<>" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ ( var "Builtin.DPair.DPair" + .$ implicitFalse + .$ (MkArg MW ExplicitArg (Just "n") implicitFalse .=> var "DerivedGen.FinInc" .$ var "n")) + }) + , IDef + emptyFC + "<>" + [ var "<>" .$ bindVar "^cons_fuel^" + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "DerivedGen.MkFinInc (orders)")) + .$ ( var ">>=" + .$ (var "[]" .$ var "^outmost-fuel^") + .$ ( MkArg MW ExplicitArg (Just "{lamc:0}") implicitFalse + .=> iCase + { sc = var "{lamc:0}" + , ty = implicitFalse + , clauses = + [ var "Builtin.DPair.MkDPair" + .$ bindVar "val" + .$ (var "Builtin.DPair.MkDPair" .$ bindVar "n" .$ bindVar "prf") + .= var "Prelude.pure" + .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) + .$ ( var "Builtin.DPair.MkDPair" + .$ implicitTrue + .$ (var "DerivedGen.MkFinInc" .! ("n", implicitTrue) .$ implicitTrue .$ var "prf")) + ] + })) + ] + ] + , scope = + var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "DerivedGen.FinInc[] (non-recursive)")) + .$ (var "<>" .$ var "^fuel_arg^") + } + ] + , IDef + emptyFC + "[]" + [ var "[]" .$ bindVar "^fuel_arg^" + .= local + { decls = + [ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "<>" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ ( var "Builtin.DPair.DPair" + .$ var "Prelude.Types.Nat" + .$ ( MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") + .=> var "Builtin.DPair.DPair" + .$ var "Prelude.Types.Nat" + .$ ( MkArg MW ExplicitArg (Just "m") (var "Prelude.Types.Nat") + .=> var "Data.Nat.LTE" .$ var "n" .$ var "m"))) + }) + , IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "<>" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ ( var "Builtin.DPair.DPair" + .$ var "Prelude.Types.Nat" + .$ ( MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") + .=> var "Builtin.DPair.DPair" + .$ var "Prelude.Types.Nat" + .$ ( MkArg MW ExplicitArg (Just "m") (var "Prelude.Types.Nat") + .=> var "Data.Nat.LTE" .$ var "n" .$ var "m"))) + }) + , IDef + emptyFC + "<>" + [ var "<>" .$ bindVar "^cons_fuel^" + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Data.Nat.LTEZero (orders)")) + .$ ( var ">>=" + .$ (var "[]" .$ var "^outmost-fuel^") + .$ ( MkArg MW ExplicitArg (Just "right") implicitFalse + .=> var "Prelude.pure" + .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) + .$ ( var "Builtin.DPair.MkDPair" + .$ implicitTrue + .$ ( var "Builtin.DPair.MkDPair" + .$ implicitTrue + .$ (var "Data.Nat.LTEZero" .! ("right", var "right")))))) + ] + , IDef + emptyFC + "<>" + [ var "<>" .$ bindVar "^cons_fuel^" + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Data.Nat.LTESucc (orders)")) + .$ ( var ">>=" + .$ (var "[]" .$ var "^cons_fuel^") + .$ ( MkArg MW ExplicitArg (Just "{lamc:0}") implicitFalse + .=> iCase + { sc = var "{lamc:0}" + , ty = implicitFalse + , clauses = + [ var "Builtin.DPair.MkDPair" + .$ bindVar "left" + .$ (var "Builtin.DPair.MkDPair" .$ bindVar "right" .$ bindVar "^bnd^{arg:1}") + .= var "Prelude.pure" + .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) + .$ ( var "Builtin.DPair.MkDPair" + .$ implicitTrue + .$ ( var "Builtin.DPair.MkDPair" + .$ implicitTrue + .$ ( var "Data.Nat.LTESucc" + .! ("right", implicitTrue) + .! ("left", implicitTrue) + .$ var "^bnd^{arg:1}"))) + ] + })) + ] + ] + , scope = + iCase + { sc = var "^fuel_arg^" + , ty = var "Data.Fuel.Fuel" + , clauses = + [ var "Data.Fuel.Dry" + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Data.Nat.LTE[] (dry fuel)")) + .$ (var "<>" .$ var "Data.Fuel.Dry") + , var "Data.Fuel.More" .$ bindVar "^sub^fuel_arg^" + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Data.Nat.LTE[] (spend fuel)")) + .$ ( var "Test.DepTyCheck.Gen.frequency" + .$ ( var "::" + .$ (var "Builtin.MkPair" .$ var "Data.Nat1.one" .$ (var "<>" .$ var "^fuel_arg^")) + .$ ( var "::" + .$ ( var "Builtin.MkPair" + .$ (var "Deriving.DepTyCheck.Util.Reflection.leftDepth" .$ var "^sub^fuel_arg^") + .$ (var "<>" .$ var "^sub^fuel_arg^")) + .$ var "Nil"))) + ] + } + } + ] + , IDef + emptyFC + "[]" + [ var "[]" .$ bindVar "^fuel_arg^" + .= local + { decls = + [ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "<>" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> var "Test.DepTyCheck.Gen.Gen" .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" .$ var "Prelude.Types.Nat" + }) + , IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "<>" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> var "Test.DepTyCheck.Gen.Gen" .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" .$ var "Prelude.Types.Nat" + }) + , IDef + emptyFC + "<>" + [ var "<>" .$ bindVar "^cons_fuel^" + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Prelude.Types.Z (orders)")) + .$ (var "Prelude.pure" .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) .$ var "Prelude.Types.Z") + ] + , IDef + emptyFC + "<>" + [ var "<>" .$ bindVar "^cons_fuel^" + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Prelude.Types.S (orders)")) + .$ ( var ">>=" + .$ (var "[]" .$ var "^cons_fuel^") + .$ ( MkArg MW ExplicitArg (Just "^bnd^{arg:2}") implicitFalse + .=> var "Prelude.pure" + .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) + .$ (var "Prelude.Types.S" .$ var "^bnd^{arg:2}"))) + ] + ] + , scope = + iCase + { sc = var "^fuel_arg^" + , ty = var "Data.Fuel.Fuel" + , clauses = + [ var "Data.Fuel.Dry" + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Prelude.Types.Nat[] (dry fuel)")) + .$ (var "<>" .$ var "Data.Fuel.Dry") + , var "Data.Fuel.More" .$ bindVar "^sub^fuel_arg^" + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Prelude.Types.Nat[] (spend fuel)")) + .$ ( var "Test.DepTyCheck.Gen.frequency" + .$ ( var "::" + .$ (var "Builtin.MkPair" .$ var "Data.Nat1.one" .$ (var "<>" .$ var "^fuel_arg^")) + .$ ( var "::" + .$ ( var "Builtin.MkPair" + .$ (var "Deriving.DepTyCheck.Util.Reflection.leftDepth" .$ var "^sub^fuel_arg^") + .$ (var "<>" .$ var "^sub^fuel_arg^")) + .$ var "Nil"))) + ] + } + } + ] + ] + , scope = var "[]" .$ var "^outmost-fuel^" + } + diff --git a/tests/derivation/least-effort/print/regression/fin-inc/run b/tests/derivation/least-effort/print/regression/fin-inc/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/least-effort/print/regression/fin-inc/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/lost-deceq-four-occurences/AlternativeCore.idr b/tests/derivation/least-effort/print/regression/lost-deceq-four-occurences/AlternativeCore.idr deleted file mode 120000 index 6da8d83f9..000000000 --- a/tests/derivation/least-effort/print/regression/lost-deceq-four-occurences/AlternativeCore.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/AlternativeCore.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/lost-deceq-four-occurences/DerivedGen.idr b/tests/derivation/least-effort/print/regression/lost-deceq-four-occurences/DerivedGen.idr index d14906920..478b79c08 100644 --- a/tests/derivation/least-effort/print/regression/lost-deceq-four-occurences/DerivedGen.idr +++ b/tests/derivation/least-effort/print/regression/lost-deceq-four-occurences/DerivedGen.idr @@ -1,7 +1,6 @@ module DerivedGen -import AlternativeCore -import PrintDerivation +import Deriving.DepTyCheck.Gen %default total @@ -10,5 +9,6 @@ data X : Nat -> Nat -> Nat -> Nat -> Type where %language ElabReflection -%runElab printDerived @{MainCoreDerivator @{LeastEffort}} $ +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (x1 : Nat) -> (x2 : Nat) -> (x3 : Nat) -> (x4 : Nat) -> Gen MaybeEmpty $ X x1 x2 x3 x4 diff --git a/tests/derivation/least-effort/print/regression/lost-deceq-four-occurences/PrintDerivation.idr b/tests/derivation/least-effort/print/regression/lost-deceq-four-occurences/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/regression/lost-deceq-four-occurences/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/lost-deceq-four-occurences/expected b/tests/derivation/least-effort/print/regression/lost-deceq-four-occurences/expected index 5087bd90f..be2ffb8ef 100644 --- a/tests/derivation/least-effort/print/regression/lost-deceq-four-occurences/expected +++ b/tests/derivation/least-effort/print/regression/lost-deceq-four-occurences/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> (x1 : Nat) -> (x2 : Nat) -> (x3 : Nat) -> (x4 : Nat) -> Gen MaybeEmpty (X x1 x2 x3 x4) -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> (x1 : Nat) -> (x2 : Nat) -> (x3 : Nat) -> (x4 : Nat) -> Gen MaybeEmpty (X x1 x2 x3 x4) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue diff --git a/tests/derivation/least-effort/print/regression/lost-deceq-three-occurences/AlternativeCore.idr b/tests/derivation/least-effort/print/regression/lost-deceq-three-occurences/AlternativeCore.idr deleted file mode 120000 index 6da8d83f9..000000000 --- a/tests/derivation/least-effort/print/regression/lost-deceq-three-occurences/AlternativeCore.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/AlternativeCore.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/lost-deceq-three-occurences/DerivedGen.idr b/tests/derivation/least-effort/print/regression/lost-deceq-three-occurences/DerivedGen.idr index 829546dc0..da07fe1a9 100644 --- a/tests/derivation/least-effort/print/regression/lost-deceq-three-occurences/DerivedGen.idr +++ b/tests/derivation/least-effort/print/regression/lost-deceq-three-occurences/DerivedGen.idr @@ -1,7 +1,6 @@ module DerivedGen -import AlternativeCore -import PrintDerivation +import Deriving.DepTyCheck.Gen %default total @@ -10,4 +9,5 @@ data X : Nat -> Nat -> Nat -> Type where %language ElabReflection -%runElab printDerived @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (x1 : Nat) -> (x2 : Nat) -> (x3 : Nat) -> Gen MaybeEmpty $ X x1 x2 x3 +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (x1 : Nat) -> (x2 : Nat) -> (x3 : Nat) -> Gen MaybeEmpty $ X x1 x2 x3 diff --git a/tests/derivation/least-effort/print/regression/lost-deceq-three-occurences/PrintDerivation.idr b/tests/derivation/least-effort/print/regression/lost-deceq-three-occurences/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/regression/lost-deceq-three-occurences/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/lost-deceq-three-occurences/expected b/tests/derivation/least-effort/print/regression/lost-deceq-three-occurences/expected index 9cfd8a0a3..175310f8f 100644 --- a/tests/derivation/least-effort/print/regression/lost-deceq-three-occurences/expected +++ b/tests/derivation/least-effort/print/regression/lost-deceq-three-occurences/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> (x1 : Nat) -> (x2 : Nat) -> (x3 : Nat) -> Gen MaybeEmpty (X x1 x2 x3) -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> (x1 : Nat) -> (x2 : Nat) -> (x3 : Nat) -> Gen MaybeEmpty (X x1 x2 x3) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue diff --git a/tests/derivation/least-effort/print/regression/too-early-rename-multiple-complex/AlternativeCore.idr b/tests/derivation/least-effort/print/regression/too-early-rename-multiple-complex/AlternativeCore.idr deleted file mode 120000 index 6da8d83f9..000000000 --- a/tests/derivation/least-effort/print/regression/too-early-rename-multiple-complex/AlternativeCore.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/AlternativeCore.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/too-early-rename-multiple-complex/DerivedGen.idr b/tests/derivation/least-effort/print/regression/too-early-rename-multiple-complex/DerivedGen.idr index 206913aca..8d84e6c8c 100644 --- a/tests/derivation/least-effort/print/regression/too-early-rename-multiple-complex/DerivedGen.idr +++ b/tests/derivation/least-effort/print/regression/too-early-rename-multiple-complex/DerivedGen.idr @@ -1,7 +1,6 @@ module DerivedGen -import AlternativeCore -import PrintDerivation +import Deriving.DepTyCheck.Gen %default total @@ -22,4 +21,5 @@ data Z : Type where data W : Z -> Z -> Type where MkW : W (MkZ (MkX n False) (MkX m False)) (MkZ (MkX n True) (MkX m True)) -%runElab printDerived @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (a : Z) -> (b : Z) -> Gen MaybeEmpty (W a b) +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (a : Z) -> (b : Z) -> Gen MaybeEmpty (W a b) diff --git a/tests/derivation/least-effort/print/regression/too-early-rename-multiple-complex/PrintDerivation.idr b/tests/derivation/least-effort/print/regression/too-early-rename-multiple-complex/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/regression/too-early-rename-multiple-complex/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/too-early-rename-multiple-complex/expected b/tests/derivation/least-effort/print/regression/too-early-rename-multiple-complex/expected index 0a6bfff91..982aa6d11 100644 --- a/tests/derivation/least-effort/print/regression/too-early-rename-multiple-complex/expected +++ b/tests/derivation/least-effort/print/regression/too-early-rename-multiple-complex/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> (a : Z) -> (b : Z) -> Gen MaybeEmpty (W a b) -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> (a : Z) -> (b : Z) -> Gen MaybeEmpty (W a b) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue diff --git a/tests/derivation/least-effort/print/regression/too-early-rename-multiple-simple/AlternativeCore.idr b/tests/derivation/least-effort/print/regression/too-early-rename-multiple-simple/AlternativeCore.idr deleted file mode 120000 index 6da8d83f9..000000000 --- a/tests/derivation/least-effort/print/regression/too-early-rename-multiple-simple/AlternativeCore.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/AlternativeCore.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/too-early-rename-multiple-simple/DerivedGen.idr b/tests/derivation/least-effort/print/regression/too-early-rename-multiple-simple/DerivedGen.idr index 0bd71a53b..a67ef6e3a 100644 --- a/tests/derivation/least-effort/print/regression/too-early-rename-multiple-simple/DerivedGen.idr +++ b/tests/derivation/least-effort/print/regression/too-early-rename-multiple-simple/DerivedGen.idr @@ -1,7 +1,6 @@ module DerivedGen -import AlternativeCore -import PrintDerivation +import Deriving.DepTyCheck.Gen %default total @@ -21,4 +20,5 @@ data Z : Type where data W : Z -> Z -> Type where MkW : W (MkZ (MkX n m False)) (MkZ (MkX n m True)) -%runElab printDerived @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (a : Z) -> (b : Z) -> Gen MaybeEmpty (W a b) +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (a : Z) -> (b : Z) -> Gen MaybeEmpty (W a b) diff --git a/tests/derivation/least-effort/print/regression/too-early-rename-multiple-simple/PrintDerivation.idr b/tests/derivation/least-effort/print/regression/too-early-rename-multiple-simple/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/regression/too-early-rename-multiple-simple/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/too-early-rename-multiple-simple/expected b/tests/derivation/least-effort/print/regression/too-early-rename-multiple-simple/expected index 9139e0be1..35aa68636 100644 --- a/tests/derivation/least-effort/print/regression/too-early-rename-multiple-simple/expected +++ b/tests/derivation/least-effort/print/regression/too-early-rename-multiple-simple/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> (a : Z) -> (b : Z) -> Gen MaybeEmpty (W a b) -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> (a : Z) -> (b : Z) -> Gen MaybeEmpty (W a b) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue diff --git a/tests/derivation/least-effort/print/regression/too-early-rename-single-dependency/AlternativeCore.idr b/tests/derivation/least-effort/print/regression/too-early-rename-single-dependency/AlternativeCore.idr deleted file mode 120000 index 6da8d83f9..000000000 --- a/tests/derivation/least-effort/print/regression/too-early-rename-single-dependency/AlternativeCore.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/AlternativeCore.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/too-early-rename-single-dependency/DerivedGen.idr b/tests/derivation/least-effort/print/regression/too-early-rename-single-dependency/DerivedGen.idr index 445a9e97c..1257fb467 100644 --- a/tests/derivation/least-effort/print/regression/too-early-rename-single-dependency/DerivedGen.idr +++ b/tests/derivation/least-effort/print/regression/too-early-rename-single-dependency/DerivedGen.idr @@ -1,7 +1,6 @@ module DerivedGen -import AlternativeCore -import PrintDerivation +import Deriving.DepTyCheck.Gen %default total @@ -21,4 +20,5 @@ data Z : Type where data W : Z -> Z -> Type where MkW : W (MkZ (MkX n False)) (MkZ (MkX n True)) -%runElab printDerived @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (a : Z) -> (b : Z) -> Gen MaybeEmpty (W a b) +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (a : Z) -> (b : Z) -> Gen MaybeEmpty (W a b) diff --git a/tests/derivation/least-effort/print/regression/too-early-rename-single-dependency/PrintDerivation.idr b/tests/derivation/least-effort/print/regression/too-early-rename-single-dependency/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/regression/too-early-rename-single-dependency/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/too-early-rename-single-dependency/expected b/tests/derivation/least-effort/print/regression/too-early-rename-single-dependency/expected index 82c0d975e..450dadd17 100644 --- a/tests/derivation/least-effort/print/regression/too-early-rename-single-dependency/expected +++ b/tests/derivation/least-effort/print/regression/too-early-rename-single-dependency/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> (a : Z) -> (b : Z) -> Gen MaybeEmpty (W a b) -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> (a : Z) -> (b : Z) -> Gen MaybeEmpty (W a b) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue diff --git a/tests/derivation/least-effort/print/regression/type-alias-gen-itself/AlternativeCore.idr b/tests/derivation/least-effort/print/regression/type-alias-gen-itself/AlternativeCore.idr deleted file mode 120000 index 6da8d83f9..000000000 --- a/tests/derivation/least-effort/print/regression/type-alias-gen-itself/AlternativeCore.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/AlternativeCore.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/type-alias-gen-itself/DerivedGen.idr b/tests/derivation/least-effort/print/regression/type-alias-gen-itself/DerivedGen.idr index 589a997bd..db21871c2 100644 --- a/tests/derivation/least-effort/print/regression/type-alias-gen-itself/DerivedGen.idr +++ b/tests/derivation/least-effort/print/regression/type-alias-gen-itself/DerivedGen.idr @@ -1,7 +1,6 @@ module DerivedGen -import AlternativeCore -import PrintDerivation +import Deriving.DepTyCheck.Gen import Data.Fin @@ -12,4 +11,5 @@ X = Bool %language ElabReflection -%runElab printDerived @{MainCoreDerivator @{LeastEffort}} $ Fuel -> Gen0 X +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> Gen0 X diff --git a/tests/derivation/least-effort/print/regression/type-alias-gen-itself/PrintDerivation.idr b/tests/derivation/least-effort/print/regression/type-alias-gen-itself/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/regression/type-alias-gen-itself/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/type-alias-gen-itself/expected b/tests/derivation/least-effort/print/regression/type-alias-gen-itself/expected index b4dcbbac2..b4bb77a57 100644 --- a/tests/derivation/least-effort/print/regression/type-alias-gen-itself/expected +++ b/tests/derivation/least-effort/print/regression/type-alias-gen-itself/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> Gen0 X -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> Gen0 X MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> local { decls = diff --git a/tests/derivation/least-effort/print/regression/type-alias-target-type/AlternativeCore.idr b/tests/derivation/least-effort/print/regression/type-alias-target-type/AlternativeCore.idr deleted file mode 120000 index 6da8d83f9..000000000 --- a/tests/derivation/least-effort/print/regression/type-alias-target-type/AlternativeCore.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/AlternativeCore.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/type-alias-target-type/DerivedGen.idr b/tests/derivation/least-effort/print/regression/type-alias-target-type/DerivedGen.idr index fe36b6466..b6084031f 100644 --- a/tests/derivation/least-effort/print/regression/type-alias-target-type/DerivedGen.idr +++ b/tests/derivation/least-effort/print/regression/type-alias-target-type/DerivedGen.idr @@ -1,7 +1,6 @@ module DerivedGen -import AlternativeCore -import PrintDerivation +import Deriving.DepTyCheck.Gen import Data.Fin @@ -12,4 +11,5 @@ X = Bool %language ElabReflection -%runElab printDerived @{MainCoreDerivator @{LeastEffort}} $ Fuel -> Gen MaybeEmpty X +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> Gen MaybeEmpty X diff --git a/tests/derivation/least-effort/print/regression/type-alias-target-type/PrintDerivation.idr b/tests/derivation/least-effort/print/regression/type-alias-target-type/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/regression/type-alias-target-type/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/type-alias-target-type/expected b/tests/derivation/least-effort/print/regression/type-alias-target-type/expected index 1dccc08aa..44d95731a 100644 --- a/tests/derivation/least-effort/print/regression/type-alias-target-type/expected +++ b/tests/derivation/least-effort/print/regression/type-alias-target-type/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> Gen MaybeEmpty X -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> Gen MaybeEmpty X MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> local { decls = diff --git a/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full-gend1/DerivedGen.idr b/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full-gend1/DerivedGen.idr new file mode 100644 index 000000000..135e0e3e8 --- /dev/null +++ b/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full-gend1/DerivedGen.idr @@ -0,0 +1,16 @@ +module DerivedGen + +import Data.Fin + +import Deriving.DepTyCheck.Gen + +%default total + +data IsFS : (n : _) -> Fin n -> Type where + ItIsFS : IsFS _ (FS i) + +%language ElabReflection + +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ + Fuel -> (n : Nat) -> Gen MaybeEmpty (v ** IsFS n v) diff --git a/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full-gend1/RunDerivedGen.idr b/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full-gend1/RunDerivedGen.idr new file mode 120000 index 000000000..2b18cc56c --- /dev/null +++ b/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full-gend1/RunDerivedGen.idr @@ -0,0 +1 @@ +../_common/RunDerivedGen.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full-gend1/derive.ipkg b/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full-gend1/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full-gend1/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full-gend1/expected b/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full-gend1/expected new file mode 100644 index 000000000..8eb2c5761 --- /dev/null +++ b/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full-gend1/expected @@ -0,0 +1,171 @@ +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> (n : Nat) -> Gen MaybeEmpty (v : Fin n ** IsFS n v) + MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") +.=> MkArg MW ExplicitArg (Just "outer^") implicitTrue +.=> local + { decls = + [ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "[0]" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ ( var "Builtin.DPair.DPair" + .$ (var "Data.Fin.Fin" .$ var "n") + .$ ( MkArg MW ExplicitArg (Just "{arg:1}") (var "Data.Fin.Fin" .$ var "n") + .=> var "DerivedGen.IsFS" .$ var "n" .$ var "{arg:1}")) + }) + , IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "[0]" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") + .-> var "Test.DepTyCheck.Gen.Gen" .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" .$ (var "Data.Fin.Fin" .$ var "n") + }) + , IDef + emptyFC + "[0]" + [ var "[0]" .$ bindVar "^fuel_arg^" .$ bindVar "inter^" + .= local + { decls = + [ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "<>" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ ( var "Builtin.DPair.DPair" + .$ (var "Data.Fin.Fin" .$ var "n") + .$ ( MkArg MW ExplicitArg (Just "{arg:1}") (var "Data.Fin.Fin" .$ var "n") + .=> var "DerivedGen.IsFS" .$ var "n" .$ var "{arg:1}")) + }) + , IDef + emptyFC + "<>" + [ var "<>" .$ bindVar "^cons_fuel^" .$ (var "Prelude.Types.S" .$ bindVar "^bnd^{k:3643}") + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "DerivedGen.ItIsFS (orders)")) + .$ ( var ">>=" + .$ (var "[0]" .$ var "^outmost-fuel^" .$ var "{k:3643}") + .$ ( MkArg MW ExplicitArg (Just "i") implicitFalse + .=> var "Prelude.pure" + .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) + .$ ( var "Builtin.DPair.MkDPair" + .$ implicitTrue + .$ (var "DerivedGen.ItIsFS" .! ("{k:3643}", implicitTrue) .! ("i", var "i"))))) + , var "<>" .$ implicitTrue .$ implicitTrue .= var "empty" + ] + ] + , scope = + var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "DerivedGen.IsFS[0] (non-recursive)")) + .$ (var "<>" .$ var "^fuel_arg^" .$ var "inter^") + } + ] + , IDef + emptyFC + "[0]" + [ var "[0]" .$ bindVar "^fuel_arg^" .$ bindVar "inter^" + .= local + { decls = + [ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "<>" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ (var "Data.Fin.Fin" .$ var "n") + }) + , IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "<>" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ (var "Data.Fin.Fin" .$ var "n") + }) + , IDef + emptyFC + "<>" + [ var "<>" .$ bindVar "^cons_fuel^" .$ (var "Prelude.Types.S" .$ bindVar "k") + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Data.Fin.FZ (orders)")) + .$ ( var "Prelude.pure" + .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) + .$ (var "Data.Fin.FZ" .! ("k", var "k"))) + , var "<>" .$ implicitTrue .$ implicitTrue .= var "empty" + ] + , IDef + emptyFC + "<>" + [ var "<>" .$ bindVar "^cons_fuel^" .$ (var "Prelude.Types.S" .$ bindVar "k") + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Data.Fin.FS (orders)")) + .$ ( var ">>=" + .$ (var "[0]" .$ var "^cons_fuel^" .$ var "k") + .$ ( MkArg MW ExplicitArg (Just "^bnd^{arg:2}") implicitFalse + .=> var "Prelude.pure" + .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) + .$ (var "Data.Fin.FS" .! ("k", implicitTrue) .$ var "^bnd^{arg:2}"))) + , var "<>" .$ implicitTrue .$ implicitTrue .= var "empty" + ] + ] + , scope = + iCase + { sc = var "^fuel_arg^" + , ty = var "Data.Fuel.Fuel" + , clauses = + [ var "Data.Fuel.Dry" + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Data.Fin.Fin[0] (dry fuel)")) + .$ (var "<>" .$ var "Data.Fuel.Dry" .$ var "inter^") + , var "Data.Fuel.More" .$ bindVar "^sub^fuel_arg^" + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Data.Fin.Fin[0] (spend fuel)")) + .$ ( var "Test.DepTyCheck.Gen.frequency" + .$ ( var "::" + .$ ( var "Builtin.MkPair" + .$ var "Data.Nat1.one" + .$ (var "<>" .$ var "^fuel_arg^" .$ var "inter^")) + .$ ( var "::" + .$ ( var "Builtin.MkPair" + .$ (var "Deriving.DepTyCheck.Util.Reflection.leftDepth" .$ var "^sub^fuel_arg^") + .$ (var "<>" .$ var "^sub^fuel_arg^" .$ var "inter^")) + .$ var "Nil"))) + ] + } + } + ] + ] + , scope = var "[0]" .$ var "^outmost-fuel^" .$ var "outer^" + } + diff --git a/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full-gend1/run b/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full-gend1/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full-gend1/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full-gend2/DerivedGen.idr b/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full-gend2/DerivedGen.idr new file mode 100644 index 000000000..d4ab4c4a4 --- /dev/null +++ b/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full-gend2/DerivedGen.idr @@ -0,0 +1,16 @@ +module DerivedGen + +import Data.Fin + +import Deriving.DepTyCheck.Gen + +%default total + +data IsFS : (n : _) -> Fin n -> Type where + ItIsFS : IsFS _ (FS i) + +%language ElabReflection + +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ + Fuel -> Gen MaybeEmpty (n ** v ** IsFS n v) diff --git a/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full-gend2/RunDerivedGen.idr b/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full-gend2/RunDerivedGen.idr new file mode 120000 index 000000000..2b18cc56c --- /dev/null +++ b/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full-gend2/RunDerivedGen.idr @@ -0,0 +1 @@ +../_common/RunDerivedGen.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full-gend2/derive.ipkg b/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full-gend2/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full-gend2/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full-gend2/expected b/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full-gend2/expected new file mode 100644 index 000000000..3348d8678 --- /dev/null +++ b/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full-gend2/expected @@ -0,0 +1,280 @@ +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> Gen MaybeEmpty (n : Nat ** (v : Fin n ** IsFS n v)) + MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") +.=> local + { decls = + [ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "[]" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ ( var "Builtin.DPair.DPair" + .$ var "Prelude.Types.Nat" + .$ ( MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") + .=> var "Builtin.DPair.DPair" + .$ (var "Data.Fin.Fin" .$ var "n") + .$ ( MkArg MW ExplicitArg (Just "{arg:1}") (var "Data.Fin.Fin" .$ var "n") + .=> var "DerivedGen.IsFS" .$ var "n" .$ var "{arg:1}"))) + }) + , IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "[]" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ ( var "Builtin.DPair.DPair" + .$ var "Prelude.Types.Nat" + .$ (MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") .=> var "Data.Fin.Fin" .$ var "n")) + }) + , IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "[]" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> var "Test.DepTyCheck.Gen.Gen" .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" .$ var "Prelude.Types.Nat" + }) + , IDef + emptyFC + "[]" + [ var "[]" .$ bindVar "^fuel_arg^" + .= local + { decls = + [ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "<>" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ ( var "Builtin.DPair.DPair" + .$ var "Prelude.Types.Nat" + .$ ( MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") + .=> var "Builtin.DPair.DPair" + .$ (var "Data.Fin.Fin" .$ var "n") + .$ ( MkArg MW ExplicitArg (Just "{arg:1}") (var "Data.Fin.Fin" .$ var "n") + .=> var "DerivedGen.IsFS" .$ var "n" .$ var "{arg:1}"))) + }) + , IDef + emptyFC + "<>" + [ var "<>" .$ bindVar "^cons_fuel^" + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "DerivedGen.ItIsFS (orders)")) + .$ ( var ">>=" + .$ (var "[]" .$ var "^outmost-fuel^") + .$ ( MkArg MW ExplicitArg (Just "{lamc:0}") implicitFalse + .=> iCase + { sc = var "{lamc:0}" + , ty = implicitFalse + , clauses = + [ var "Builtin.DPair.MkDPair" .$ bindVar "^bnd^{k:3643}" .$ bindVar "i" + .= var "Prelude.pure" + .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) + .$ ( var "Builtin.DPair.MkDPair" + .$ implicitTrue + .$ ( var "Builtin.DPair.MkDPair" + .$ implicitTrue + .$ (var "DerivedGen.ItIsFS" .! ("{k:3643}", implicitTrue) .! ("i", var "i")))) + ] + })) + ] + ] + , scope = + var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "DerivedGen.IsFS[] (non-recursive)")) + .$ (var "<>" .$ var "^fuel_arg^") + } + ] + , IDef + emptyFC + "[]" + [ var "[]" .$ bindVar "^fuel_arg^" + .= local + { decls = + [ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "<>" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ ( var "Builtin.DPair.DPair" + .$ var "Prelude.Types.Nat" + .$ (MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") .=> var "Data.Fin.Fin" .$ var "n")) + }) + , IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "<>" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ ( var "Builtin.DPair.DPair" + .$ var "Prelude.Types.Nat" + .$ (MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") .=> var "Data.Fin.Fin" .$ var "n")) + }) + , IDef + emptyFC + "<>" + [ var "<>" .$ bindVar "^cons_fuel^" + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Data.Fin.FZ (orders)")) + .$ ( var ">>=" + .$ (var "[]" .$ var "^outmost-fuel^") + .$ ( MkArg MW ExplicitArg (Just "k") implicitFalse + .=> var "Prelude.pure" + .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) + .$ (var "Builtin.DPair.MkDPair" .$ implicitTrue .$ (var "Data.Fin.FZ" .! ("k", var "k"))))) + ] + , IDef + emptyFC + "<>" + [ var "<>" .$ bindVar "^cons_fuel^" + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Data.Fin.FS (orders)")) + .$ ( var ">>=" + .$ (var "[]" .$ var "^cons_fuel^") + .$ ( MkArg MW ExplicitArg (Just "{lamc:0}") implicitFalse + .=> iCase + { sc = var "{lamc:0}" + , ty = implicitFalse + , clauses = + [ var "Builtin.DPair.MkDPair" .$ bindVar "k" .$ bindVar "^bnd^{arg:2}" + .= var "Prelude.pure" + .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) + .$ ( var "Builtin.DPair.MkDPair" + .$ implicitTrue + .$ (var "Data.Fin.FS" .! ("k", implicitTrue) .$ var "^bnd^{arg:2}")) + ] + })) + ] + ] + , scope = + iCase + { sc = var "^fuel_arg^" + , ty = var "Data.Fuel.Fuel" + , clauses = + [ var "Data.Fuel.Dry" + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Data.Fin.Fin[] (dry fuel)")) + .$ (var "<>" .$ var "Data.Fuel.Dry") + , var "Data.Fuel.More" .$ bindVar "^sub^fuel_arg^" + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Data.Fin.Fin[] (spend fuel)")) + .$ ( var "Test.DepTyCheck.Gen.frequency" + .$ ( var "::" + .$ (var "Builtin.MkPair" .$ var "Data.Nat1.one" .$ (var "<>" .$ var "^fuel_arg^")) + .$ ( var "::" + .$ ( var "Builtin.MkPair" + .$ (var "Deriving.DepTyCheck.Util.Reflection.leftDepth" .$ var "^sub^fuel_arg^") + .$ (var "<>" .$ var "^sub^fuel_arg^")) + .$ var "Nil"))) + ] + } + } + ] + , IDef + emptyFC + "[]" + [ var "[]" .$ bindVar "^fuel_arg^" + .= local + { decls = + [ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "<>" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> var "Test.DepTyCheck.Gen.Gen" .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" .$ var "Prelude.Types.Nat" + }) + , IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "<>" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> var "Test.DepTyCheck.Gen.Gen" .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" .$ var "Prelude.Types.Nat" + }) + , IDef + emptyFC + "<>" + [ var "<>" .$ bindVar "^cons_fuel^" + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Prelude.Types.Z (orders)")) + .$ (var "Prelude.pure" .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) .$ var "Prelude.Types.Z") + ] + , IDef + emptyFC + "<>" + [ var "<>" .$ bindVar "^cons_fuel^" + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Prelude.Types.S (orders)")) + .$ ( var ">>=" + .$ (var "[]" .$ var "^cons_fuel^") + .$ ( MkArg MW ExplicitArg (Just "^bnd^{arg:3}") implicitFalse + .=> var "Prelude.pure" + .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) + .$ (var "Prelude.Types.S" .$ var "^bnd^{arg:3}"))) + ] + ] + , scope = + iCase + { sc = var "^fuel_arg^" + , ty = var "Data.Fuel.Fuel" + , clauses = + [ var "Data.Fuel.Dry" + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Prelude.Types.Nat[] (dry fuel)")) + .$ (var "<>" .$ var "Data.Fuel.Dry") + , var "Data.Fuel.More" .$ bindVar "^sub^fuel_arg^" + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "Prelude.Types.Nat[] (spend fuel)")) + .$ ( var "Test.DepTyCheck.Gen.frequency" + .$ ( var "::" + .$ (var "Builtin.MkPair" .$ var "Data.Nat1.one" .$ (var "<>" .$ var "^fuel_arg^")) + .$ ( var "::" + .$ ( var "Builtin.MkPair" + .$ (var "Deriving.DepTyCheck.Util.Reflection.leftDepth" .$ var "^sub^fuel_arg^") + .$ (var "<>" .$ var "^sub^fuel_arg^")) + .$ var "Nil"))) + ] + } + } + ] + ] + , scope = var "[]" .$ var "^outmost-fuel^" + } + diff --git a/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full-gend2/run b/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full-gend2/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full-gend2/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full/DerivedGen.idr b/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full/DerivedGen.idr new file mode 100644 index 000000000..7c24533a3 --- /dev/null +++ b/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full/DerivedGen.idr @@ -0,0 +1,16 @@ +module DerivedGen + +import Data.Fin + +import Deriving.DepTyCheck.Gen + +%default total + +data IsFS : (n : _) -> Fin n -> Type where + ItIsFS : IsFS _ (FS i) + +%language ElabReflection + +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ + Fuel -> {n : Nat} -> (v : Fin n) -> Gen MaybeEmpty $ IsFS n v diff --git a/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full/RunDerivedGen.idr b/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full/RunDerivedGen.idr new file mode 120000 index 000000000..2b18cc56c --- /dev/null +++ b/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full/RunDerivedGen.idr @@ -0,0 +1 @@ +../_common/RunDerivedGen.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full/derive.ipkg b/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full/expected b/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full/expected new file mode 100644 index 000000000..546f1d57f --- /dev/null +++ b/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full/expected @@ -0,0 +1,68 @@ +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> (v : Fin n) -> Gen MaybeEmpty (IsFS n v) + MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") +.=> MkArg MW ImplicitArg (Just "outer^") implicitTrue +.=> MkArg MW ExplicitArg (Just "outer^") implicitTrue +.=> local + { decls = + [ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "[0, 1]" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") + .-> MkArg MW ExplicitArg (Just "{arg:1}") (var "Data.Fin.Fin" .$ var "n") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ (var "DerivedGen.IsFS" .$ var "n" .$ var "{arg:1}") + }) + , IDef + emptyFC + "[0, 1]" + [ var "[0, 1]" .$ bindVar "^fuel_arg^" .$ bindVar "inter^" .$ bindVar "inter^<{arg:1}>" + .= local + { decls = + [ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "<>" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") + .-> MkArg MW ExplicitArg (Just "{arg:1}") (var "Data.Fin.Fin" .$ var "n") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ (var "DerivedGen.IsFS" .$ var "n" .$ var "{arg:1}") + }) + , IDef + emptyFC + "<>" + [ var "<>" + .$ bindVar "^cons_fuel^" + .$ (var "Prelude.Types.S" .$ bindVar "^bnd^{k:3643}") + .$ (var "Data.Fin.FS" .! ("k", implicitTrue) .$ bindVar "i") + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "DerivedGen.ItIsFS (orders)")) + .$ ( var "Prelude.pure" + .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) + .$ (var "DerivedGen.ItIsFS" .! ("{k:3643}", implicitTrue) .! ("i", var "i"))) + , var "<>" .$ implicitTrue .$ implicitTrue .$ implicitTrue .= var "empty" + ] + ] + , scope = + var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "DerivedGen.IsFS[0, 1] (non-recursive)")) + .$ (var "<>" .$ var "^fuel_arg^" .$ var "inter^" .$ var "inter^<{arg:1}>") + } + ] + ] + , scope = var "[0, 1]" .$ var "^outmost-fuel^" .$ var "outer^" .$ var "outer^" + } + diff --git a/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full/run b/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-full/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-partial/DerivedGen.idr b/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-partial/DerivedGen.idr new file mode 100644 index 000000000..1b212c923 --- /dev/null +++ b/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-partial/DerivedGen.idr @@ -0,0 +1,16 @@ +module DerivedGen + +import Data.Fin + +import Deriving.DepTyCheck.Gen + +%default total + +data IsFS : (n : _) -> Fin n -> Type where + ItIsFS : IsFS (S _) (FS i) + +%language ElabReflection + +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ + Fuel -> {n : Nat} -> (v : Fin n) -> Gen MaybeEmpty $ IsFS n v diff --git a/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-partial/RunDerivedGen.idr b/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-partial/RunDerivedGen.idr new file mode 120000 index 000000000..2b18cc56c --- /dev/null +++ b/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-partial/RunDerivedGen.idr @@ -0,0 +1 @@ +../_common/RunDerivedGen.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-partial/derive.ipkg b/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-partial/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-partial/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-partial/expected b/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-partial/expected new file mode 100644 index 000000000..834525554 --- /dev/null +++ b/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-partial/expected @@ -0,0 +1,68 @@ +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> (v : Fin n) -> Gen MaybeEmpty (IsFS n v) + MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") +.=> MkArg MW ImplicitArg (Just "outer^") implicitTrue +.=> MkArg MW ExplicitArg (Just "outer^") implicitTrue +.=> local + { decls = + [ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "[0, 1]" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") + .-> MkArg MW ExplicitArg (Just "{arg:1}") (var "Data.Fin.Fin" .$ var "n") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ (var "DerivedGen.IsFS" .$ var "n" .$ var "{arg:1}") + }) + , IDef + emptyFC + "[0, 1]" + [ var "[0, 1]" .$ bindVar "^fuel_arg^" .$ bindVar "inter^" .$ bindVar "inter^<{arg:1}>" + .= local + { decls = + [ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "<>" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") + .-> MkArg MW ExplicitArg (Just "{arg:1}") (var "Data.Fin.Fin" .$ var "n") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ (var "DerivedGen.IsFS" .$ var "n" .$ var "{arg:1}") + }) + , IDef + emptyFC + "<>" + [ var "<>" + .$ bindVar "^cons_fuel^" + .$ (var "Prelude.Types.S" .$ bindVar "^bnd^{_:3643}") + .$ (var "Data.Fin.FS" .! ("k", implicitTrue) .$ bindVar "i") + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "DerivedGen.ItIsFS (orders)")) + .$ ( var "Prelude.pure" + .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) + .$ (var "DerivedGen.ItIsFS" .! ("{_:3643}", implicitTrue) .! ("i", var "i"))) + , var "<>" .$ implicitTrue .$ implicitTrue .$ implicitTrue .= var "empty" + ] + ] + , scope = + var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "DerivedGen.IsFS[0, 1] (non-recursive)")) + .$ (var "<>" .$ var "^fuel_arg^" .$ var "inter^" .$ var "inter^<{arg:1}>") + } + ] + ] + , scope = var "[0, 1]" .$ var "^outmost-fuel^" .$ var "outer^" .$ var "outer^" + } + diff --git a/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-partial/run b/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-partial/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/least-effort/print/regression/underscore-in-cons-expl-partial/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/underscore-in-cons-impl-full/DerivedGen.idr b/tests/derivation/least-effort/print/regression/underscore-in-cons-impl-full/DerivedGen.idr new file mode 100644 index 000000000..172917855 --- /dev/null +++ b/tests/derivation/least-effort/print/regression/underscore-in-cons-impl-full/DerivedGen.idr @@ -0,0 +1,16 @@ +module DerivedGen + +import Data.Fin + +import Deriving.DepTyCheck.Gen + +%default total + +data IsFS : Fin n -> Type where + ItIsFS : IsFS (FS i) + +%language ElabReflection + +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ + Fuel -> {n : Nat} -> (v : Fin n) -> Gen MaybeEmpty $ IsFS v diff --git a/tests/derivation/least-effort/print/regression/underscore-in-cons-impl-full/RunDerivedGen.idr b/tests/derivation/least-effort/print/regression/underscore-in-cons-impl-full/RunDerivedGen.idr new file mode 120000 index 000000000..2b18cc56c --- /dev/null +++ b/tests/derivation/least-effort/print/regression/underscore-in-cons-impl-full/RunDerivedGen.idr @@ -0,0 +1 @@ +../_common/RunDerivedGen.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/underscore-in-cons-impl-full/derive.ipkg b/tests/derivation/least-effort/print/regression/underscore-in-cons-impl-full/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/least-effort/print/regression/underscore-in-cons-impl-full/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/underscore-in-cons-impl-full/expected b/tests/derivation/least-effort/print/regression/underscore-in-cons-impl-full/expected new file mode 100644 index 000000000..908255536 --- /dev/null +++ b/tests/derivation/least-effort/print/regression/underscore-in-cons-impl-full/expected @@ -0,0 +1,68 @@ +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> (v : Fin n) -> Gen MaybeEmpty (IsFS v) + MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") +.=> MkArg MW ImplicitArg (Just "outer^") implicitTrue +.=> MkArg MW ExplicitArg (Just "outer^") implicitTrue +.=> local + { decls = + [ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "[0, 1]" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") + .-> MkArg MW ExplicitArg (Just "{arg:1}") (var "Data.Fin.Fin" .$ var "n") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ (var "DerivedGen.IsFS" .! ("n", var "n") .$ var "{arg:1}") + }) + , IDef + emptyFC + "[0, 1]" + [ var "[0, 1]" .$ bindVar "^fuel_arg^" .$ bindVar "inter^" .$ bindVar "inter^<{arg:1}>" + .= local + { decls = + [ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "<>" + , type = + MkArg MW ExplicitArg Nothing (var "Data.Fuel.Fuel") + .-> MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") + .-> MkArg MW ExplicitArg (Just "{arg:1}") (var "Data.Fin.Fin" .$ var "n") + .-> var "Test.DepTyCheck.Gen.Gen" + .$ var "Test.DepTyCheck.Gen.Emptiness.MaybeEmpty" + .$ (var "DerivedGen.IsFS" .! ("n", var "n") .$ var "{arg:1}") + }) + , IDef + emptyFC + "<>" + [ var "<>" + .$ bindVar "^cons_fuel^" + .$ (var "Prelude.Types.S" .$ bindVar "^bnd^{k:3639}") + .$ (var "Data.Fin.FS" .! ("k", implicitTrue) .$ bindVar "i") + .= var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "DerivedGen.ItIsFS (orders)")) + .$ ( var "Prelude.pure" + .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) + .$ (var "DerivedGen.ItIsFS" .! ("{k:3639}", implicitTrue) .! ("i", var "i"))) + , var "<>" .$ implicitTrue .$ implicitTrue .$ implicitTrue .= var "empty" + ] + ] + , scope = + var "Test.DepTyCheck.Gen.label" + .$ (var "fromString" .$ primVal (Str "DerivedGen.IsFS[0, 1] (non-recursive)")) + .$ (var "<>" .$ var "^fuel_arg^" .$ var "inter^" .$ var "inter^<{arg:1}>") + } + ] + ] + , scope = var "[0, 1]" .$ var "^outmost-fuel^" .$ var "outer^" .$ var "outer^" + } + diff --git a/tests/derivation/least-effort/print/regression/underscore-in-cons-impl-full/run b/tests/derivation/least-effort/print/regression/underscore-in-cons-impl-full/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/least-effort/print/regression/underscore-in-cons-impl-full/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/unification-mismatch-dependent/AlternativeCore.idr b/tests/derivation/least-effort/print/regression/unification-mismatch-dependent/AlternativeCore.idr deleted file mode 120000 index 6da8d83f9..000000000 --- a/tests/derivation/least-effort/print/regression/unification-mismatch-dependent/AlternativeCore.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/AlternativeCore.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/unification-mismatch-dependent/DerivedGen.idr b/tests/derivation/least-effort/print/regression/unification-mismatch-dependent/DerivedGen.idr index a11564702..4897b4e85 100644 --- a/tests/derivation/least-effort/print/regression/unification-mismatch-dependent/DerivedGen.idr +++ b/tests/derivation/least-effort/print/regression/unification-mismatch-dependent/DerivedGen.idr @@ -1,7 +1,6 @@ module DerivedGen -import AlternativeCore -import PrintDerivation +import Deriving.DepTyCheck.Gen import Data.Fin @@ -21,4 +20,5 @@ data Z : X -> X -> Type where %language ElabReflection -%runElab printDerived @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (x : X) -> (x' : X) -> Gen MaybeEmpty $ Z x x' +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (x : X) -> (x' : X) -> Gen MaybeEmpty $ Z x x' diff --git a/tests/derivation/least-effort/print/regression/unification-mismatch-dependent/PrintDerivation.idr b/tests/derivation/least-effort/print/regression/unification-mismatch-dependent/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/regression/unification-mismatch-dependent/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/unification-mismatch-dependent/expected b/tests/derivation/least-effort/print/regression/unification-mismatch-dependent/expected index dbb4089a9..f6e0a1eec 100644 --- a/tests/derivation/least-effort/print/regression/unification-mismatch-dependent/expected +++ b/tests/derivation/least-effort/print/regression/unification-mismatch-dependent/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> (x : X) -> (x' : X) -> Gen MaybeEmpty (Z x x') -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> (x : X) -> (x' : X) -> Gen MaybeEmpty (Z x x') MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue @@ -80,7 +77,7 @@ LOG gen.auto.derive.infra:0: .$ (var "fromString" .$ primVal (Str "DerivedGen.MkZ (orders)")) .$ ( var "Prelude.pure" .! ("f", var "Test.DepTyCheck.Gen.Gen" .$ implicitTrue) - .$ (var "DerivedGen.MkZ" .! ("x", var "x") .$ var "prf")) + .$ (var "DerivedGen.MkZ" .! ("x", implicitTrue) .$ var "prf")) , var "<>" .$ bindVar "^cons_fuel^" .$ (var "DerivedGen.Cons" .$ bindVar "x" .$ bindVar "prf") diff --git a/tests/derivation/least-effort/print/regression/unification-name-mismatch/AlternativeCore.idr b/tests/derivation/least-effort/print/regression/unification-name-mismatch/AlternativeCore.idr deleted file mode 120000 index 6da8d83f9..000000000 --- a/tests/derivation/least-effort/print/regression/unification-name-mismatch/AlternativeCore.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/AlternativeCore.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/unification-name-mismatch/DerivedGen.idr b/tests/derivation/least-effort/print/regression/unification-name-mismatch/DerivedGen.idr index e74d7450b..b55eb2fa3 100644 --- a/tests/derivation/least-effort/print/regression/unification-name-mismatch/DerivedGen.idr +++ b/tests/derivation/least-effort/print/regression/unification-name-mismatch/DerivedGen.idr @@ -1,16 +1,11 @@ module DerivedGen -import AlternativeCore -import PrintDerivation +import Deriving.DepTyCheck.Gen %default total %language ElabReflection -%hint -UsedConstructorDerivator : ConstructorDerivator -UsedConstructorDerivator = LeastEffort - data X : Type where Nil : X (::) : Unit -> X -> X @@ -19,4 +14,5 @@ data Y : (xs : X) -> (ys : X) -> Type where A : Y (x :: xs) (x :: xs) B : Y xs ys -> Y (x :: xs) (y :: ys) -%runElab printDerived $ Fuel -> (xs : X) -> (ys : X) -> Gen MaybeEmpty $ Y xs ys +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter $ Fuel -> (xs : X) -> (ys : X) -> Gen MaybeEmpty $ Y xs ys diff --git a/tests/derivation/least-effort/print/regression/unification-name-mismatch/PrintDerivation.idr b/tests/derivation/least-effort/print/regression/unification-name-mismatch/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/regression/unification-name-mismatch/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/unification-name-mismatch/expected b/tests/derivation/least-effort/print/regression/unification-name-mismatch/expected index a04fb2f71..1008e0bde 100644 --- a/tests/derivation/least-effort/print/regression/unification-name-mismatch/expected +++ b/tests/derivation/least-effort/print/regression/unification-name-mismatch/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> (xs : X) -> (ys : X) -> Gen MaybeEmpty (Y xs ys) -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> (xs : X) -> (ys : X) -> Gen MaybeEmpty (Y xs ys) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue @@ -132,8 +129,8 @@ LOG gen.auto.derive.infra:0: .$ ( var "DerivedGen.B" .! ("x", var "x") .! ("y", var "y") - .! ("ys", var "ys") - .! ("xs", var "xs") + .! ("ys", implicitTrue) + .! ("xs", implicitTrue) .$ var "^bnd^{arg:1}"))) , var "<>" .$ implicitTrue .$ implicitTrue .$ implicitTrue .= var "empty" ] diff --git a/tests/derivation/least-effort/print/regression/unnamed-auto-implicit/AlternativeCore.idr b/tests/derivation/least-effort/print/regression/unnamed-auto-implicit/AlternativeCore.idr deleted file mode 120000 index 6da8d83f9..000000000 --- a/tests/derivation/least-effort/print/regression/unnamed-auto-implicit/AlternativeCore.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/AlternativeCore.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/unnamed-auto-implicit/DerivedGen.idr b/tests/derivation/least-effort/print/regression/unnamed-auto-implicit/DerivedGen.idr index 92a5ad3aa..dfd74e08f 100644 --- a/tests/derivation/least-effort/print/regression/unnamed-auto-implicit/DerivedGen.idr +++ b/tests/derivation/least-effort/print/regression/unnamed-auto-implicit/DerivedGen.idr @@ -1,7 +1,6 @@ module DerivedGen -import AlternativeCore -import PrintDerivation +import Deriving.DepTyCheck.Gen import Data.Fin @@ -23,4 +22,5 @@ mutual %language ElabReflection -%runElab printDerived @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (f : _) -> Gen MaybeEmpty (u ** Y u f) +%logging "deptycheck.derive.print" 5 +%runElab deriveGenPrinter @{MainCoreDerivator @{LeastEffort}} $ Fuel -> (f : _) -> Gen MaybeEmpty (u ** Y u f) diff --git a/tests/derivation/least-effort/print/regression/unnamed-auto-implicit/PrintDerivation.idr b/tests/derivation/least-effort/print/regression/unnamed-auto-implicit/PrintDerivation.idr deleted file mode 120000 index 3724a195a..000000000 --- a/tests/derivation/least-effort/print/regression/unnamed-auto-implicit/PrintDerivation.idr +++ /dev/null @@ -1 +0,0 @@ -../_common/PrintDerivation.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/print/regression/unnamed-auto-implicit/expected b/tests/derivation/least-effort/print/regression/unnamed-auto-implicit/expected index 56bac181e..f2400dae4 100644 --- a/tests/derivation/least-effort/print/regression/unnamed-auto-implicit/expected +++ b/tests/derivation/least-effort/print/regression/unnamed-auto-implicit/expected @@ -1,8 +1,5 @@ -1/3: Building AlternativeCore (AlternativeCore.idr) -2/3: Building PrintDerivation (PrintDerivation.idr) -3/3: Building DerivedGen (DerivedGen.idr) -LOG gen.auto.derive.infra:0: type: (arg : Fuel) -> (f : X) -> Gen MaybeEmpty (u : () ** Y u f) -LOG gen.auto.derive.infra:0: +1/1: Building DerivedGen (DerivedGen.idr) +LOG deptycheck.derive.print:5: type: (arg : Fuel) -> (f : X) -> Gen MaybeEmpty (u : () ** Y u f) MkArg MW ExplicitArg (Just "^outmost-fuel^") (var "Data.Fuel.Fuel") .=> MkArg MW ExplicitArg (Just "outer^") implicitTrue .=> local @@ -110,9 +107,9 @@ LOG gen.auto.derive.infra:0: .$ ( var "Builtin.DPair.MkDPair" .$ implicitTrue .$ ( var "DerivedGen.B" - .! ("x", var "x") - .! ("xs", var "xs") - .! ("n", var "n") + .! ("x", implicitTrue) + .! ("xs", implicitTrue) + .! ("n", implicitTrue) .$ var "^bnd^{arg:3}" .@ var "^bnd^{conArg:2}")) ] diff --git a/tests/derivation/least-effort/run/regression/dependent-givens-big/DerivedGen.idr b/tests/derivation/least-effort/run/regression/dependent-givens-expl-big/DerivedGen.idr similarity index 100% rename from tests/derivation/least-effort/run/regression/dependent-givens-big/DerivedGen.idr rename to tests/derivation/least-effort/run/regression/dependent-givens-expl-big/DerivedGen.idr diff --git a/tests/derivation/least-effort/run/regression/dependent-givens-expl-big/RunDerivedGen.idr b/tests/derivation/least-effort/run/regression/dependent-givens-expl-big/RunDerivedGen.idr new file mode 120000 index 000000000..2b18cc56c --- /dev/null +++ b/tests/derivation/least-effort/run/regression/dependent-givens-expl-big/RunDerivedGen.idr @@ -0,0 +1 @@ +../_common/RunDerivedGen.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/run/regression/dependent-givens-expl-big/derive.ipkg b/tests/derivation/least-effort/run/regression/dependent-givens-expl-big/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/least-effort/run/regression/dependent-givens-expl-big/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/least-effort/run/regression/dependent-givens-big/expected b/tests/derivation/least-effort/run/regression/dependent-givens-expl-big/expected similarity index 100% rename from tests/derivation/least-effort/run/regression/dependent-givens-big/expected rename to tests/derivation/least-effort/run/regression/dependent-givens-expl-big/expected diff --git a/tests/derivation/least-effort/run/regression/dependent-givens-expl-big/run b/tests/derivation/least-effort/run/regression/dependent-givens-expl-big/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/least-effort/run/regression/dependent-givens-expl-big/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/least-effort/run/regression/dependent-givens-small-deep/DerivedGen.idr b/tests/derivation/least-effort/run/regression/dependent-givens-expl-small-deep/DerivedGen.idr similarity index 100% rename from tests/derivation/least-effort/run/regression/dependent-givens-small-deep/DerivedGen.idr rename to tests/derivation/least-effort/run/regression/dependent-givens-expl-small-deep/DerivedGen.idr diff --git a/tests/derivation/least-effort/run/regression/dependent-givens-expl-small-deep/RunDerivedGen.idr b/tests/derivation/least-effort/run/regression/dependent-givens-expl-small-deep/RunDerivedGen.idr new file mode 120000 index 000000000..2b18cc56c --- /dev/null +++ b/tests/derivation/least-effort/run/regression/dependent-givens-expl-small-deep/RunDerivedGen.idr @@ -0,0 +1 @@ +../_common/RunDerivedGen.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/run/regression/dependent-givens-expl-small-deep/derive.ipkg b/tests/derivation/least-effort/run/regression/dependent-givens-expl-small-deep/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/least-effort/run/regression/dependent-givens-expl-small-deep/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/least-effort/run/regression/dependent-givens-small-deep/expected b/tests/derivation/least-effort/run/regression/dependent-givens-expl-small-deep/expected similarity index 100% rename from tests/derivation/least-effort/run/regression/dependent-givens-small-deep/expected rename to tests/derivation/least-effort/run/regression/dependent-givens-expl-small-deep/expected diff --git a/tests/derivation/least-effort/run/regression/dependent-givens-expl-small-deep/run b/tests/derivation/least-effort/run/regression/dependent-givens-expl-small-deep/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/least-effort/run/regression/dependent-givens-expl-small-deep/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/least-effort/run/regression/dependent-givens-small-shallow/DerivedGen.idr b/tests/derivation/least-effort/run/regression/dependent-givens-expl-small-shallow/DerivedGen.idr similarity index 100% rename from tests/derivation/least-effort/run/regression/dependent-givens-small-shallow/DerivedGen.idr rename to tests/derivation/least-effort/run/regression/dependent-givens-expl-small-shallow/DerivedGen.idr diff --git a/tests/derivation/least-effort/run/regression/dependent-givens-expl-small-shallow/RunDerivedGen.idr b/tests/derivation/least-effort/run/regression/dependent-givens-expl-small-shallow/RunDerivedGen.idr new file mode 120000 index 000000000..2b18cc56c --- /dev/null +++ b/tests/derivation/least-effort/run/regression/dependent-givens-expl-small-shallow/RunDerivedGen.idr @@ -0,0 +1 @@ +../_common/RunDerivedGen.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/run/regression/dependent-givens-expl-small-shallow/derive.ipkg b/tests/derivation/least-effort/run/regression/dependent-givens-expl-small-shallow/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/least-effort/run/regression/dependent-givens-expl-small-shallow/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/least-effort/run/regression/dependent-givens-small-shallow/expected b/tests/derivation/least-effort/run/regression/dependent-givens-expl-small-shallow/expected similarity index 100% rename from tests/derivation/least-effort/run/regression/dependent-givens-small-shallow/expected rename to tests/derivation/least-effort/run/regression/dependent-givens-expl-small-shallow/expected diff --git a/tests/derivation/least-effort/run/regression/dependent-givens-expl-small-shallow/run b/tests/derivation/least-effort/run/regression/dependent-givens-expl-small-shallow/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/least-effort/run/regression/dependent-givens-expl-small-shallow/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/least-effort/run/regression/dependent-givens-impl-big/DerivedGen.idr b/tests/derivation/least-effort/run/regression/dependent-givens-impl-big/DerivedGen.idr new file mode 100644 index 000000000..e9bfd6b8f --- /dev/null +++ b/tests/derivation/least-effort/run/regression/dependent-givens-impl-big/DerivedGen.idr @@ -0,0 +1,96 @@ +module DerivedGen + +import RunDerivedGen + +import Data.Fin + +%default total + +data AnyType = PrimTy | RefTy + +DecEq AnyType where + decEq PrimTy PrimTy = Yes Refl + decEq PrimTy RefTy = No $ \case Refl impossible + decEq RefTy PrimTy = No $ \case Refl impossible + decEq RefTy RefTy = Yes Refl + +Show AnyType where + show PrimTy = "PrimTy" + show RefTy = "RefTy" + +namespace MaybeAnyType + + -- specialisation since we don't support polymorphism over types yet + public export + data MaybeAnyType + = Nothing + | Just AnyType + + public export + Show MaybeAnyType where + show Nothing = "Nothing" + show (Just x) = "Just \{show x}" + + export + Injective MaybeAnyType.Just where + injective Refl = Refl + + export + DecEq MaybeAnyType where + decEq Nothing Nothing = Yes Refl + decEq Nothing (Just _) = No $ \case Refl impossible + decEq (Just _) Nothing = No $ \case Refl impossible + decEq (Just x) (Just y) = decEqCong $ decEq x y + +namespace VectMaybeAnyType + + -- specialisation since we don't support polymorphism over types yet + public export + data VectMaybeAnyType : Nat -> Type where + Nil : VectMaybeAnyType Z + (::) : MaybeAnyType -> VectMaybeAnyType n -> VectMaybeAnyType (S n) + + public export + toVect : VectMaybeAnyType n -> Vect n MaybeAnyType + toVect [] = [] + toVect (x::xs) = x :: toVect xs + + public export + Show (VectMaybeAnyType n) where + show = show . toVect + + public export + index : Fin n -> VectMaybeAnyType n -> MaybeAnyType + index FZ (x::_ ) = x + index (FS i) (_::xs) = index i xs + + export + Biinjective VectMaybeAnyType.(::) where + biinjective Refl = (Refl, Refl) + + export + DecEq (VectMaybeAnyType n) where + decEq [] [] = Yes Refl + decEq (x::xs) (y::ys) = decEqCong2 (decEq x y) (decEq xs ys) + + public export + data AtIndex : Fin n -> MaybeAnyType -> VectMaybeAnyType n -> Type where + Here : AtIndex FZ x (x::xs) + There : {n : _} -> {0 i : Fin n} -> {0 zs : VectMaybeAnyType n} -> + AtIndex i x zs -> AtIndex (FS i) x (z::zs) + + export + Show (AtIndex i t vs) where + show Here = "!" + show (There x) = "." ++ show x + +%language ElabReflection + +checkedGen : Fuel -> {n : Nat} -> (v : VectMaybeAnyType n) -> Gen MaybeEmpty (i ** t ** AtIndex i t v) +checkedGen = deriveGen @{MainCoreDerivator @{LeastEffort}} + +main : IO () +main = runGs + [ G $ \fl => checkedGen fl [Nothing, Just PrimTy, Just RefTy] + , G $ \fl => checkedGen fl [] + ] diff --git a/tests/derivation/least-effort/run/regression/dependent-givens-impl-big/RunDerivedGen.idr b/tests/derivation/least-effort/run/regression/dependent-givens-impl-big/RunDerivedGen.idr new file mode 120000 index 000000000..2b18cc56c --- /dev/null +++ b/tests/derivation/least-effort/run/regression/dependent-givens-impl-big/RunDerivedGen.idr @@ -0,0 +1 @@ +../_common/RunDerivedGen.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/run/regression/dependent-givens-impl-big/derive.ipkg b/tests/derivation/least-effort/run/regression/dependent-givens-impl-big/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/least-effort/run/regression/dependent-givens-impl-big/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/least-effort/run/regression/dependent-givens-impl-big/expected b/tests/derivation/least-effort/run/regression/dependent-givens-impl-big/expected new file mode 100644 index 000000000..93330384a --- /dev/null +++ b/tests/derivation/least-effort/run/regression/dependent-givens-impl-big/expected @@ -0,0 +1,25 @@ +1/2: Building RunDerivedGen (RunDerivedGen.idr) +2/2: Building DerivedGen (DerivedGen.idr) +Generated values: +----- +----- +(2 ** (Just RefTy ** ..!)) +----- +(2 ** (Just RefTy ** ..!)) +----- +(2 ** (Just RefTy ** ..!)) +----- +(2 ** (Just RefTy ** ..!)) +----- +(2 ** (Just RefTy ** ..!)) +----- +(1 ** (Just PrimTy ** .!)) +----- +(2 ** (Just RefTy ** ..!)) +----- +(2 ** (Just RefTy ** ..!)) +----- +(2 ** (Just RefTy ** ..!)) +----- +(2 ** (Just RefTy ** ..!)) +----- diff --git a/tests/derivation/least-effort/run/regression/dependent-givens-impl-big/run b/tests/derivation/least-effort/run/regression/dependent-givens-impl-big/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/least-effort/run/regression/dependent-givens-impl-big/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/least-effort/run/regression/dependent-givens-impl-small-deep/DerivedGen.idr b/tests/derivation/least-effort/run/regression/dependent-givens-impl-small-deep/DerivedGen.idr new file mode 100644 index 000000000..ec7f1aba9 --- /dev/null +++ b/tests/derivation/least-effort/run/regression/dependent-givens-impl-small-deep/DerivedGen.idr @@ -0,0 +1,24 @@ +module DerivedGen + +import RunDerivedGen + +import Data.Fin + +%default total + +data X : Fin n -> Type where + MkX : (n : _) -> (f : Fin n) -> X (FS (FS f)) + +Show (X f) where + show $ MkX n f = "MkX \{show n} \{show f}" + +%language ElabReflection + +checkedGen : Fuel -> (n : Nat) -> (f : Fin n) -> Gen MaybeEmpty $ X f +checkedGen = deriveGen @{MainCoreDerivator @{LeastEffort}} + +main : IO () +main = runGs + [ G $ \fl => checkedGen fl 3 0 + , G $ \fl => checkedGen fl 5 4 + ] diff --git a/tests/derivation/least-effort/run/regression/dependent-givens-impl-small-deep/RunDerivedGen.idr b/tests/derivation/least-effort/run/regression/dependent-givens-impl-small-deep/RunDerivedGen.idr new file mode 120000 index 000000000..2b18cc56c --- /dev/null +++ b/tests/derivation/least-effort/run/regression/dependent-givens-impl-small-deep/RunDerivedGen.idr @@ -0,0 +1 @@ +../_common/RunDerivedGen.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/run/regression/dependent-givens-impl-small-deep/derive.ipkg b/tests/derivation/least-effort/run/regression/dependent-givens-impl-small-deep/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/least-effort/run/regression/dependent-givens-impl-small-deep/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/least-effort/run/regression/dependent-givens-impl-small-deep/expected b/tests/derivation/least-effort/run/regression/dependent-givens-impl-small-deep/expected new file mode 100644 index 000000000..9ea1a4eeb --- /dev/null +++ b/tests/derivation/least-effort/run/regression/dependent-givens-impl-small-deep/expected @@ -0,0 +1,25 @@ +1/2: Building RunDerivedGen (RunDerivedGen.idr) +2/2: Building DerivedGen (DerivedGen.idr) +Generated values: +----- +----- +----- +MkX 3 2 +----- +MkX 3 2 +----- +MkX 3 2 +----- +MkX 3 2 +----- +MkX 3 2 +----- +MkX 3 2 +----- +MkX 3 2 +----- +MkX 3 2 +----- +MkX 3 2 +----- +MkX 3 2 diff --git a/tests/derivation/least-effort/run/regression/dependent-givens-impl-small-deep/run b/tests/derivation/least-effort/run/regression/dependent-givens-impl-small-deep/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/least-effort/run/regression/dependent-givens-impl-small-deep/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/least-effort/run/regression/dependent-givens-impl-small-shallow/DerivedGen.idr b/tests/derivation/least-effort/run/regression/dependent-givens-impl-small-shallow/DerivedGen.idr new file mode 100644 index 000000000..2864357ff --- /dev/null +++ b/tests/derivation/least-effort/run/regression/dependent-givens-impl-small-shallow/DerivedGen.idr @@ -0,0 +1,24 @@ +module DerivedGen + +import RunDerivedGen + +import Data.Fin + +%default total + +data X : Fin n -> Type where + MkX : (n : _) -> (f : Fin n) -> X (FS f) + +Show (X f) where + show $ MkX n f = "MkX \{show n} \{show f}" + +%language ElabReflection + +checkedGen : Fuel -> (n : Nat) -> (f : Fin n) -> Gen MaybeEmpty $ X f +checkedGen = deriveGen @{MainCoreDerivator @{LeastEffort}} + +main : IO () +main = runGs + [ G $ \fl => checkedGen fl 3 0 + , G $ \fl => checkedGen fl 2 1 + ] diff --git a/tests/derivation/least-effort/run/regression/dependent-givens-impl-small-shallow/RunDerivedGen.idr b/tests/derivation/least-effort/run/regression/dependent-givens-impl-small-shallow/RunDerivedGen.idr new file mode 120000 index 000000000..2b18cc56c --- /dev/null +++ b/tests/derivation/least-effort/run/regression/dependent-givens-impl-small-shallow/RunDerivedGen.idr @@ -0,0 +1 @@ +../_common/RunDerivedGen.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/run/regression/dependent-givens-impl-small-shallow/derive.ipkg b/tests/derivation/least-effort/run/regression/dependent-givens-impl-small-shallow/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/least-effort/run/regression/dependent-givens-impl-small-shallow/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/least-effort/run/regression/dependent-givens-impl-small-shallow/expected b/tests/derivation/least-effort/run/regression/dependent-givens-impl-small-shallow/expected new file mode 100644 index 000000000..e2a9b3c95 --- /dev/null +++ b/tests/derivation/least-effort/run/regression/dependent-givens-impl-small-shallow/expected @@ -0,0 +1,25 @@ +1/2: Building RunDerivedGen (RunDerivedGen.idr) +2/2: Building DerivedGen (DerivedGen.idr) +Generated values: +----- +----- +----- +MkX 1 0 +----- +MkX 1 0 +----- +MkX 1 0 +----- +MkX 1 0 +----- +MkX 1 0 +----- +MkX 1 0 +----- +MkX 1 0 +----- +MkX 1 0 +----- +MkX 1 0 +----- +MkX 1 0 diff --git a/tests/derivation/least-effort/run/regression/dependent-givens-impl-small-shallow/run b/tests/derivation/least-effort/run/regression/dependent-givens-impl-small-shallow/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/least-effort/run/regression/dependent-givens-impl-small-shallow/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/least-effort/run/regression/fin-inc/DerivedGen.idr b/tests/derivation/least-effort/run/regression/fin-inc/DerivedGen.idr new file mode 100644 index 000000000..4d656ea01 --- /dev/null +++ b/tests/derivation/least-effort/run/regression/fin-inc/DerivedGen.idr @@ -0,0 +1,21 @@ +module DerivedGen + +import RunDerivedGen + +%default total + +record FinInc n where + constructor MkFinInc + val : Nat + prf : LTE val n + +Show (FinInc n) where + show (MkFinInc v p) = "MkFinInc \{show v} prf" + +checkedGen : Fuel -> Gen MaybeEmpty (n ** FinInc n) +checkedGen = deriveGen @{MainCoreDerivator @{LeastEffort}} + +main : IO () +main = runGs + [ G $ \fl => checkedGen fl + ] diff --git a/tests/derivation/least-effort/run/regression/fin-inc/RunDerivedGen.idr b/tests/derivation/least-effort/run/regression/fin-inc/RunDerivedGen.idr new file mode 120000 index 000000000..2b18cc56c --- /dev/null +++ b/tests/derivation/least-effort/run/regression/fin-inc/RunDerivedGen.idr @@ -0,0 +1 @@ +../_common/RunDerivedGen.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/run/regression/fin-inc/derive.ipkg b/tests/derivation/least-effort/run/regression/fin-inc/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/least-effort/run/regression/fin-inc/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/least-effort/run/regression/fin-inc/expected b/tests/derivation/least-effort/run/regression/fin-inc/expected new file mode 100644 index 000000000..f7ab5c74a --- /dev/null +++ b/tests/derivation/least-effort/run/regression/fin-inc/expected @@ -0,0 +1,24 @@ +1/2: Building RunDerivedGen (RunDerivedGen.idr) +2/2: Building DerivedGen (DerivedGen.idr) +Generated values: +----- +----- +(20 ** MkFinInc 16 prf) +----- +(27 ** MkFinInc 17 prf) +----- +(27 ** MkFinInc 10 prf) +----- +(9 ** MkFinInc 5 prf) +----- +(23 ** MkFinInc 12 prf) +----- +(23 ** MkFinInc 8 prf) +----- +(18 ** MkFinInc 4 prf) +----- +(11 ** MkFinInc 7 prf) +----- +(11 ** MkFinInc 10 prf) +----- +(35 ** MkFinInc 15 prf) diff --git a/tests/derivation/least-effort/run/regression/fin-inc/run b/tests/derivation/least-effort/run/regression/fin-inc/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/least-effort/run/regression/fin-inc/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/least-effort/run/regression/function-in-cons/DerivedGen.idr b/tests/derivation/least-effort/run/regression/function-in-cons/DerivedGen.idr new file mode 100644 index 000000000..1336a5090 --- /dev/null +++ b/tests/derivation/least-effort/run/regression/function-in-cons/DerivedGen.idr @@ -0,0 +1,21 @@ +module DerivedGen + +import RunDerivedGen + +%default total + +data X : Type where + MkX : (Unit -> Unit) -> X + +Show X where + show (MkX f) = "MkX f" + +%language ElabReflection + +checkedGen : Fuel -> Gen MaybeEmpty X +checkedGen = deriveGen @{MainCoreDerivator @{LeastEffort}} + +main : IO () +main = runGs + [ G $ \fl => checkedGen fl + ] diff --git a/tests/derivation/least-effort/run/regression/function-in-cons/RunDerivedGen.idr b/tests/derivation/least-effort/run/regression/function-in-cons/RunDerivedGen.idr new file mode 120000 index 000000000..2b18cc56c --- /dev/null +++ b/tests/derivation/least-effort/run/regression/function-in-cons/RunDerivedGen.idr @@ -0,0 +1 @@ +../_common/RunDerivedGen.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/run/regression/function-in-cons/derive.ipkg b/tests/derivation/least-effort/run/regression/function-in-cons/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/least-effort/run/regression/function-in-cons/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/least-effort/run/regression/function-in-cons/expected b/tests/derivation/least-effort/run/regression/function-in-cons/expected new file mode 100644 index 000000000..5d53e626e --- /dev/null +++ b/tests/derivation/least-effort/run/regression/function-in-cons/expected @@ -0,0 +1,25 @@ +1/2: Building RunDerivedGen (RunDerivedGen.idr) +2/2: Building DerivedGen (DerivedGen.idr) +Error: While processing right hand side of checkedGen. Sorry, I can't find any elaboration which works. All errors: +Possible error: + Error during reflection: Fields with function types are not supported in constructors + + DerivedGen:1 + 4 | + 5 | %default total + 6 | + 7 | data X : Type where + 8 | MkX : (Unit -> Unit) -> X + ^^^^^^^^^^^^ + +Possible error: + Error during reflection: No arguments in the generator function signature, at least a fuel argument must be present + + DerivedGen:2 + 12 | + 13 | %language ElabReflection + 14 | + 15 | checkedGen : Fuel -> Gen MaybeEmpty X + 16 | checkedGen = deriveGen @{MainCoreDerivator @{LeastEffort}} + ^^^^^^^^^ + diff --git a/tests/derivation/least-effort/run/regression/function-in-cons/run b/tests/derivation/least-effort/run/regression/function-in-cons/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/least-effort/run/regression/function-in-cons/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full-gend1/DerivedGen.idr b/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full-gend1/DerivedGen.idr new file mode 100644 index 000000000..932aa877d --- /dev/null +++ b/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full-gend1/DerivedGen.idr @@ -0,0 +1,23 @@ +module DerivedGen + +import RunDerivedGen + +import Data.Fin + +%default total + +data IsFS : (n : _) -> Fin n -> Type where + ItIsFS : IsFS _ (FS i) + +Show (IsFS n vs) where show ItIsFS = "ItIsFS" + +%language ElabReflection + +checkedGen : Fuel -> (n : Nat) -> Gen MaybeEmpty (v ** IsFS n v) +checkedGen = deriveGen @{MainCoreDerivator @{LeastEffort}} + +main : IO () +main = runGs + [ G $ \fl => checkedGen fl 3 + , G $ \fl => checkedGen fl 0 + ] diff --git a/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full-gend1/RunDerivedGen.idr b/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full-gend1/RunDerivedGen.idr new file mode 120000 index 000000000..2b18cc56c --- /dev/null +++ b/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full-gend1/RunDerivedGen.idr @@ -0,0 +1 @@ +../_common/RunDerivedGen.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full-gend1/derive.ipkg b/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full-gend1/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full-gend1/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full-gend1/expected b/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full-gend1/expected new file mode 100644 index 000000000..c1738e7f1 --- /dev/null +++ b/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full-gend1/expected @@ -0,0 +1,20 @@ +1/2: Building RunDerivedGen (RunDerivedGen.idr) +2/2: Building DerivedGen (DerivedGen.idr) +Error: While processing right hand side of checkedGen. Sorry, I can't find any elaboration which works. All errors: +Possible error: + Error during reflection: While processing right hand side of {u:1837},[0]. While processing right hand side of $resolved1,<>. {k:1755} is not accessible in this context. + +Possible error: + Error during reflection: No arguments in the generator function signature, at least a fuel argument must be present + + DerivedGen:1 + 13 | + 14 | %language ElabReflection + 15 | + 16 | checkedGen : Fuel -> (n : Nat) -> Gen MaybeEmpty (v ** IsFS n v) + 17 | checkedGen = deriveGen @{MainCoreDerivator @{LeastEffort}} + ^^^^^^^^^ + +[ fatal ] Error when executing system command. + Command: "build/exec/_tmppack" + Error code: 127 diff --git a/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full-gend1/run b/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full-gend1/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full-gend1/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full-gend2/DerivedGen.idr b/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full-gend2/DerivedGen.idr new file mode 100644 index 000000000..414bd25f4 --- /dev/null +++ b/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full-gend2/DerivedGen.idr @@ -0,0 +1,22 @@ +module DerivedGen + +import RunDerivedGen + +import Data.Fin + +%default total + +data IsFS : (n : _) -> Fin n -> Type where + ItIsFS : IsFS _ (FS i) + +Show (IsFS n vs) where show ItIsFS = "ItIsFS" + +%language ElabReflection + +checkedGen : Fuel -> Gen MaybeEmpty (n ** v ** IsFS n v) +checkedGen = deriveGen @{MainCoreDerivator @{LeastEffort}} + +main : IO () +main = runGs + [ G $ \fl => checkedGen fl + ] diff --git a/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full-gend2/RunDerivedGen.idr b/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full-gend2/RunDerivedGen.idr new file mode 120000 index 000000000..2b18cc56c --- /dev/null +++ b/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full-gend2/RunDerivedGen.idr @@ -0,0 +1 @@ +../_common/RunDerivedGen.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full-gend2/derive.ipkg b/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full-gend2/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full-gend2/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full-gend2/expected b/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full-gend2/expected new file mode 100644 index 000000000..36e7faec3 --- /dev/null +++ b/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full-gend2/expected @@ -0,0 +1,24 @@ +1/2: Building RunDerivedGen (RunDerivedGen.idr) +2/2: Building DerivedGen (DerivedGen.idr) +Generated values: +----- +----- +(22 ** (17 ** ItIsFS)) +----- +(29 ** (18 ** ItIsFS)) +----- +(29 ** (11 ** ItIsFS)) +----- +(11 ** (6 ** ItIsFS)) +----- +(25 ** (13 ** ItIsFS)) +----- +(25 ** (9 ** ItIsFS)) +----- +(20 ** (5 ** ItIsFS)) +----- +(13 ** (8 ** ItIsFS)) +----- +(13 ** (11 ** ItIsFS)) +----- +(37 ** (16 ** ItIsFS)) diff --git a/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full-gend2/run b/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full-gend2/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full-gend2/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full/DerivedGen.idr b/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full/DerivedGen.idr new file mode 100644 index 000000000..4e95b763c --- /dev/null +++ b/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full/DerivedGen.idr @@ -0,0 +1,23 @@ +module DerivedGen + +import RunDerivedGen + +import Data.Fin + +%default total + +data IsFS : (n : _) -> Fin n -> Type where + ItIsFS : IsFS _ (FS i) + +Show (IsFS n vs) where show ItIsFS = "ItIsFS" + +%language ElabReflection + +checkedGen : Fuel -> {n : Nat} -> (v : Fin n) -> Gen MaybeEmpty $ IsFS n v +checkedGen = deriveGen @{MainCoreDerivator @{LeastEffort}} + +main : IO () +main = runGs + [ G $ \fl => checkedGen fl $ the (Fin 4) 3 + , G $ \fl => checkedGen fl $ the (Fin 3) 0 + ] diff --git a/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full/RunDerivedGen.idr b/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full/RunDerivedGen.idr new file mode 120000 index 000000000..2b18cc56c --- /dev/null +++ b/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full/RunDerivedGen.idr @@ -0,0 +1 @@ +../_common/RunDerivedGen.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full/derive.ipkg b/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full/expected b/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full/expected new file mode 100644 index 000000000..c2be1814b --- /dev/null +++ b/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full/expected @@ -0,0 +1,25 @@ +1/2: Building RunDerivedGen (RunDerivedGen.idr) +2/2: Building DerivedGen (DerivedGen.idr) +Generated values: +----- +----- +ItIsFS +----- +ItIsFS +----- +ItIsFS +----- +ItIsFS +----- +ItIsFS +----- +ItIsFS +----- +ItIsFS +----- +ItIsFS +----- +ItIsFS +----- +ItIsFS +----- diff --git a/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full/run b/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-full/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-partial/DerivedGen.idr b/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-partial/DerivedGen.idr new file mode 100644 index 000000000..5f2278141 --- /dev/null +++ b/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-partial/DerivedGen.idr @@ -0,0 +1,23 @@ +module DerivedGen + +import RunDerivedGen + +import Data.Fin + +%default total + +data IsFS : (n : _) -> Fin n -> Type where + ItIsFS : IsFS (S _) (FS i) + +Show (IsFS n vs) where show ItIsFS = "ItIsFS" + +%language ElabReflection + +checkedGen : Fuel -> {n : Nat} -> (v : Fin n) -> Gen MaybeEmpty $ IsFS n v +checkedGen = deriveGen @{MainCoreDerivator @{LeastEffort}} + +main : IO () +main = runGs + [ G $ \fl => checkedGen fl $ the (Fin 4) 3 + , G $ \fl => checkedGen fl $ the (Fin 3) 0 + ] diff --git a/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-partial/RunDerivedGen.idr b/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-partial/RunDerivedGen.idr new file mode 120000 index 000000000..2b18cc56c --- /dev/null +++ b/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-partial/RunDerivedGen.idr @@ -0,0 +1 @@ +../_common/RunDerivedGen.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-partial/derive.ipkg b/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-partial/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-partial/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-partial/expected b/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-partial/expected new file mode 100644 index 000000000..c2be1814b --- /dev/null +++ b/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-partial/expected @@ -0,0 +1,25 @@ +1/2: Building RunDerivedGen (RunDerivedGen.idr) +2/2: Building DerivedGen (DerivedGen.idr) +Generated values: +----- +----- +ItIsFS +----- +ItIsFS +----- +ItIsFS +----- +ItIsFS +----- +ItIsFS +----- +ItIsFS +----- +ItIsFS +----- +ItIsFS +----- +ItIsFS +----- +ItIsFS +----- diff --git a/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-partial/run b/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-partial/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/least-effort/run/regression/underscore-in-cons-expl-partial/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/least-effort/run/regression/underscore-in-cons-impl-full/DerivedGen.idr b/tests/derivation/least-effort/run/regression/underscore-in-cons-impl-full/DerivedGen.idr new file mode 100644 index 000000000..ac9136e1d --- /dev/null +++ b/tests/derivation/least-effort/run/regression/underscore-in-cons-impl-full/DerivedGen.idr @@ -0,0 +1,23 @@ +module DerivedGen + +import RunDerivedGen + +import Data.Fin + +%default total + +data IsFS : Fin n -> Type where + ItIsFS : IsFS (FS i) + +Show (IsFS vs) where show ItIsFS = "ItIsFS" + +%language ElabReflection + +checkedGen : Fuel -> {n : Nat} -> (v : Fin n) -> Gen MaybeEmpty $ IsFS v +checkedGen = deriveGen @{MainCoreDerivator @{LeastEffort}} + +main : IO () +main = runGs + [ G $ \fl => checkedGen fl $ the (Fin 4) 3 + , G $ \fl => checkedGen fl $ the (Fin 3) 0 + ] diff --git a/tests/derivation/least-effort/run/regression/underscore-in-cons-impl-full/RunDerivedGen.idr b/tests/derivation/least-effort/run/regression/underscore-in-cons-impl-full/RunDerivedGen.idr new file mode 120000 index 000000000..2b18cc56c --- /dev/null +++ b/tests/derivation/least-effort/run/regression/underscore-in-cons-impl-full/RunDerivedGen.idr @@ -0,0 +1 @@ +../_common/RunDerivedGen.idr \ No newline at end of file diff --git a/tests/derivation/least-effort/run/regression/underscore-in-cons-impl-full/derive.ipkg b/tests/derivation/least-effort/run/regression/underscore-in-cons-impl-full/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/least-effort/run/regression/underscore-in-cons-impl-full/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/least-effort/run/regression/underscore-in-cons-impl-full/expected b/tests/derivation/least-effort/run/regression/underscore-in-cons-impl-full/expected new file mode 100644 index 000000000..c2be1814b --- /dev/null +++ b/tests/derivation/least-effort/run/regression/underscore-in-cons-impl-full/expected @@ -0,0 +1,25 @@ +1/2: Building RunDerivedGen (RunDerivedGen.idr) +2/2: Building DerivedGen (DerivedGen.idr) +Generated values: +----- +----- +ItIsFS +----- +ItIsFS +----- +ItIsFS +----- +ItIsFS +----- +ItIsFS +----- +ItIsFS +----- +ItIsFS +----- +ItIsFS +----- +ItIsFS +----- +ItIsFS +----- diff --git a/tests/derivation/least-effort/run/regression/underscore-in-cons-impl-full/run b/tests/derivation/least-effort/run/regression/underscore-in-cons-impl-full/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/least-effort/run/regression/underscore-in-cons-impl-full/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/utils/arg-deps/_common/Infra.idr b/tests/derivation/utils/arg-deps/_common/Infra.idr index a10fc95d0..eab87c14b 100644 --- a/tests/derivation/utils/arg-deps/_common/Infra.idr +++ b/tests/derivation/utils/arg-deps/_common/Infra.idr @@ -8,13 +8,22 @@ import Language.Reflection.Compat %language ElabReflection -ppTy : Type -> Elab Unit -ppTy ty = do - expr <- quote ty - let (args, ret) = unPi expr - deps <- map SortedSet.toList <$> argDeps args - let expr' = piAll ret $ {piInfo := ExplicitArg} <$> args -- as if all arguments were explicit - logSugaredTerm "gen.auto.arg-deps" 0 "type " expr' - logMsg "gen.auto.arg-deps" 0 "dependencies: \{show deps}\n" +unlist : TTImp -> List TTImp +unlist e = do + let (_, [a, b]) = unApp e +-- | (IVar {}, []) => [] + | _ => [] + a :: unlist b -%runElab for_ listToCheck ppTy +ppTys : (0 _ : List Type) -> Elab Unit +ppTys tys = do + tys <- quote tys + let tys = unlist tys + for_ tys $ \expr => do + let (args, ret) = unPi expr + let deps = map SortedSet.toList $ argDeps args + let expr' = piAll ret $ {piInfo := ExplicitArg} <$> args -- as if all arguments were explicit + logSugaredTerm "deptycheck.arg-deps" 0 "type " expr' + logMsg "deptycheck.arg-deps" 0 "dependencies: \{show deps}\n" + +%runElab ppTys listToCheck diff --git a/tests/derivation/utils/arg-deps/deps-001-simple/expected b/tests/derivation/utils/arg-deps/deps-001-simple/expected index 8981a043b..0a7274ce4 100644 --- a/tests/derivation/utils/arg-deps/deps-001-simple/expected +++ b/tests/derivation/utils/arg-deps/deps-001-simple/expected @@ -1,14 +1,14 @@ 1/2: Building DepsCheck (DepsCheck.idr) 2/2: Building Infra (Infra.idr) -LOG gen.auto.arg-deps:0: type : () -LOG gen.auto.arg-deps:0: dependencies: [] +LOG deptycheck.arg-deps:0: type : () +LOG deptycheck.arg-deps:0: dependencies: [] -LOG gen.auto.arg-deps:0: type : (arg : Nat) -> Nat -LOG gen.auto.arg-deps:0: dependencies: [[]] +LOG deptycheck.arg-deps:0: type : (arg : Nat) -> Nat +LOG deptycheck.arg-deps:0: dependencies: [[]] -LOG gen.auto.arg-deps:0: type : (arg : Nat) -> (arg : Nat) -> Nat -LOG gen.auto.arg-deps:0: dependencies: [[], []] +LOG deptycheck.arg-deps:0: type : (arg : Nat) -> (arg : Nat) -> Nat +LOG deptycheck.arg-deps:0: dependencies: [[], []] -LOG gen.auto.arg-deps:0: type : (a : Type) -> (arg : List a) -> Nat -LOG gen.auto.arg-deps:0: dependencies: [[], [0]] +LOG deptycheck.arg-deps:0: type : (a : Type) -> (arg : List a) -> Nat +LOG deptycheck.arg-deps:0: dependencies: [[], [0]] diff --git a/tests/derivation/utils/arg-deps/deps-002-longer-transitive/expected b/tests/derivation/utils/arg-deps/deps-002-longer-transitive/expected index 7fbaa2cd3..de98fb058 100644 --- a/tests/derivation/utils/arg-deps/deps-002-longer-transitive/expected +++ b/tests/derivation/utils/arg-deps/deps-002-longer-transitive/expected @@ -1,29 +1,29 @@ 1/2: Building DepsCheck (DepsCheck.idr) 2/2: Building Infra (Infra.idr) -LOG gen.auto.arg-deps:0: type : (n : Nat) -> (a : Type) -> (arg : Vect n a) -> Nat -LOG gen.auto.arg-deps:0: dependencies: [[], [], [0, 1]] +LOG deptycheck.arg-deps:0: type : (n : Nat) -> (a : Type) -> (arg : Vect n a) -> Nat +LOG deptycheck.arg-deps:0: dependencies: [[], [], [0, 1]] -LOG gen.auto.arg-deps:0: type : (n : Nat) -> (a : Type) -> (v : Vect n a) -> (arg : length v = 5) -> Nat -LOG gen.auto.arg-deps:0: dependencies: [[], [], [0, 1], [0, 1, 2]] +LOG deptycheck.arg-deps:0: type : (n : Nat) -> (a : Type) -> (v : Vect n a) -> (arg : length v = 5) -> Nat +LOG deptycheck.arg-deps:0: dependencies: [[], [], [0, 1], [0, 1, 2]] -LOG gen.auto.arg-deps:0: type : (a : Type) -> (xs : List a) -> (arg : Vect (length xs) a) -> Nat -LOG gen.auto.arg-deps:0: dependencies: [[], [0], [0, 1]] +LOG deptycheck.arg-deps:0: type : (a : Type) -> (xs : List a) -> (arg : Vect (length xs) a) -> Nat +LOG deptycheck.arg-deps:0: dependencies: [[], [0], [0, 1]] -LOG gen.auto.arg-deps:0: type : (a : Type) -> (xs : List a) -> (v : Vect (length xs) a) -> Nat -LOG gen.auto.arg-deps:0: dependencies: [[], [0], [0, 1]] +LOG deptycheck.arg-deps:0: type : (a : Type) -> (xs : List a) -> (v : Vect (length xs) a) -> Nat +LOG deptycheck.arg-deps:0: dependencies: [[], [0], [0, 1]] -LOG gen.auto.arg-deps:0: type : (a : Type) -> (xs : List a) -> (ys : List a) -> (arg : xs = ys) -> Nat -LOG gen.auto.arg-deps:0: dependencies: [[], [0], [0], [0, 1, 2]] +LOG deptycheck.arg-deps:0: type : (a : Type) -> (xs : List a) -> (ys : List a) -> (arg : xs = ys) -> Nat +LOG deptycheck.arg-deps:0: dependencies: [[], [0], [0], [0, 1, 2]] -LOG gen.auto.arg-deps:0: type : (a : Type) -> (n : Nat) -> (m : Nat) -> (xs : Vect n a) -> (ys : Vect m a) -> (arg : xs = ys) -> Nat -LOG gen.auto.arg-deps:0: dependencies: [[], [], [], [0, 1], [0, 2], [0, 1, 2, 3, 4]] +LOG deptycheck.arg-deps:0: type : (a : Type) -> (n : Nat) -> (m : Nat) -> (xs : Vect n a) -> (ys : Vect m a) -> (arg : xs = ys) -> Nat +LOG deptycheck.arg-deps:0: dependencies: [[], [], [], [0, 1], [0, 2], [0, 1, 2, 3, 4]] -LOG gen.auto.arg-deps:0: type : (a : Type) -> (n : Nat) -> (m : Nat) -> (xs : Vect n a) -> (ys : Vect m a) -> (arg : xs = ys) -> (arg : List a) -> Nat -LOG gen.auto.arg-deps:0: dependencies: [[], [], [], [0, 1], [0, 2], [0, 1, 2, 3, 4], [0]] +LOG deptycheck.arg-deps:0: type : (a : Type) -> (n : Nat) -> (m : Nat) -> (xs : Vect n a) -> (ys : Vect m a) -> (arg : xs = ys) -> (arg : List a) -> Nat +LOG deptycheck.arg-deps:0: dependencies: [[], [], [], [0, 1], [0, 2], [0, 1, 2, 3, 4], [0]] -LOG gen.auto.arg-deps:0: type : (a : Type) -> (n : Nat) -> (m : Nat) -> (xs : Vect n a) -> (ys : Vect m a) -> (arg : xs = ys) -> (arg : xs = []) -> Nat -LOG gen.auto.arg-deps:0: dependencies: [[], [], [], [0, 1], [0, 2], [0, 1, 2, 3, 4], [0, 1, 3]] +LOG deptycheck.arg-deps:0: type : (a : Type) -> (n : Nat) -> (m : Nat) -> (xs : Vect n a) -> (ys : Vect m a) -> (arg : xs = ys) -> (arg : xs = []) -> Nat +LOG deptycheck.arg-deps:0: dependencies: [[], [], [], [0, 1], [0, 2], [0, 1, 2, 3, 4], [0, 1, 3]] -LOG gen.auto.arg-deps:0: type : (a : Type) -> (n : Nat) -> (m : Nat) -> (xs : Vect n a) -> (ys : Vect m a) -> (arg : xs = []) -> (arg : ys = []) -> Nat -LOG gen.auto.arg-deps:0: dependencies: [[], [], [], [0, 1], [0, 2], [0, 1, 3], [0, 2, 4]] +LOG deptycheck.arg-deps:0: type : (a : Type) -> (n : Nat) -> (m : Nat) -> (xs : Vect n a) -> (ys : Vect m a) -> (arg : xs = []) -> (arg : ys = []) -> Nat +LOG deptycheck.arg-deps:0: dependencies: [[], [], [], [0, 1], [0, 2], [0, 1, 3], [0, 2, 4]] diff --git a/tests/derivation/utils/arg-deps/deps-003-lambda-shadowing/expected b/tests/derivation/utils/arg-deps/deps-003-lambda-shadowing/expected index e1317455c..fb3bf4ce5 100644 --- a/tests/derivation/utils/arg-deps/deps-003-lambda-shadowing/expected +++ b/tests/derivation/utils/arg-deps/deps-003-lambda-shadowing/expected @@ -1,11 +1,11 @@ 1/2: Building DepsCheck (DepsCheck.idr) 2/2: Building Infra (Infra.idr) -LOG gen.auto.arg-deps:0: type : (x : Nat) -> (arg : \{x:0} => S {x:0} = S) -> () -LOG gen.auto.arg-deps:0: dependencies: [[], []] +LOG deptycheck.arg-deps:0: type : (x : Nat) -> (arg : \{x:0} => S {x:0} = S) -> () +LOG deptycheck.arg-deps:0: dependencies: [[], []] -LOG gen.auto.arg-deps:0: type : (x : Nat) -> (arg : \{x:0} => \{x:1} => S {x:1} = \{x:0} => S) -> () -LOG gen.auto.arg-deps:0: dependencies: [[], []] +LOG deptycheck.arg-deps:0: type : (x : Nat) -> (arg : \{x:0} => \{x:1} => S {x:1} = \{x:0} => S) -> () +LOG deptycheck.arg-deps:0: dependencies: [[], []] -LOG gen.auto.arg-deps:0: type : (x : Nat) -> (arg : \y => S y = S) -> () -LOG gen.auto.arg-deps:0: dependencies: [[], []] +LOG deptycheck.arg-deps:0: type : (x : Nat) -> (arg : \y => S y = S) -> () +LOG deptycheck.arg-deps:0: dependencies: [[], []] diff --git a/tests/derivation/utils/arg-deps/deps-004-case/expected b/tests/derivation/utils/arg-deps/deps-004-case/expected index 4d53cb966..41d31e3dc 100644 --- a/tests/derivation/utils/arg-deps/deps-004-case/expected +++ b/tests/derivation/utils/arg-deps/deps-004-case/expected @@ -1,8 +1,8 @@ 1/2: Building DepsCheck (DepsCheck.idr) 2/2: Building Infra (Infra.idr) -LOG gen.auto.arg-deps:0: type : (a : Type) -> (xs : List a) -> (v : List a) -> (0 arg : case block in listToCheck a xs v) -> Nat -LOG gen.auto.arg-deps:0: dependencies: [[], [0], [0], [0, 2]] +LOG deptycheck.arg-deps:0: type : (a : Type) -> (xs : List a) -> (v : List a) -> (0 arg : case block in listToCheck a xs v) -> Nat +LOG deptycheck.arg-deps:0: dependencies: [[], [0], [0], [0, 2]] -LOG gen.auto.arg-deps:0: type : (a : Type) -> (xs : List a) -> (v : List a) -> (0 arg : case block in listToCheck a xs v) -> Nat -LOG gen.auto.arg-deps:0: dependencies: [[], [0], [0], [0, 2]] +LOG deptycheck.arg-deps:0: type : (a : Type) -> (xs : List a) -> (v : List a) -> (0 arg : case block in listToCheck a xs v) -> Nat +LOG deptycheck.arg-deps:0: dependencies: [[], [0], [0], [0, 2]] diff --git a/tests/derivation/utils/arg-deps/deps-005-is-fs/DepsCheck.idr b/tests/derivation/utils/arg-deps/deps-005-is-fs/DepsCheck.idr new file mode 100644 index 000000000..d692a28e2 --- /dev/null +++ b/tests/derivation/utils/arg-deps/deps-005-is-fs/DepsCheck.idr @@ -0,0 +1,16 @@ +module DepsCheck + +import Data.Vect + +import Language.Reflection + +%macro +typeOf : Elaboration m => Name -> m $ List Type +typeOf n = map (mapMaybe id) $ for !(getType n) $ catch . check {expected=Type} . snd + +data IsFS : (n : _) -> Fin n -> Type where + ItIsFS : IsFS _ (FS i) + +export +0 listToCheck : List Type +listToCheck = typeOf `{ItIsFS} diff --git a/tests/derivation/utils/arg-deps/deps-005-is-fs/Infra.idr b/tests/derivation/utils/arg-deps/deps-005-is-fs/Infra.idr new file mode 120000 index 000000000..187efccc1 --- /dev/null +++ b/tests/derivation/utils/arg-deps/deps-005-is-fs/Infra.idr @@ -0,0 +1 @@ +../_common/Infra.idr \ No newline at end of file diff --git a/tests/derivation/utils/arg-deps/deps-005-is-fs/arg-deps.ipkg b/tests/derivation/utils/arg-deps/deps-005-is-fs/arg-deps.ipkg new file mode 120000 index 000000000..871cd8929 --- /dev/null +++ b/tests/derivation/utils/arg-deps/deps-005-is-fs/arg-deps.ipkg @@ -0,0 +1 @@ +../_common/arg-deps.ipkg \ No newline at end of file diff --git a/tests/derivation/utils/arg-deps/deps-005-is-fs/expected b/tests/derivation/utils/arg-deps/deps-005-is-fs/expected new file mode 100644 index 000000000..74803608a --- /dev/null +++ b/tests/derivation/utils/arg-deps/deps-005-is-fs/expected @@ -0,0 +1,8 @@ +1/2: Building DepsCheck (DepsCheck.idr) +2/2: Building Infra (Infra.idr) +LOG deptycheck.arg-deps:0: type : (0 k : Nat) -> (0 i : Fin k) -> IsFS (S k) (FS i) +LOG deptycheck.arg-deps:0: dependencies: [[], [0]] + +LOG deptycheck.arg-deps:0: type : id +LOG deptycheck.arg-deps:0: dependencies: [] + diff --git a/tests/derivation/utils/arg-deps/deps-005-is-fs/run b/tests/derivation/utils/arg-deps/deps-005-is-fs/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/utils/arg-deps/deps-005-is-fs/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/utils/canonicsig/_common/Infra.idr b/tests/derivation/utils/canonicsig/_common/Infra.idr index 183e668e0..9fde9fb9c 100644 --- a/tests/derivation/utils/canonicsig/_common/Infra.idr +++ b/tests/derivation/utils/canonicsig/_common/Infra.idr @@ -40,7 +40,7 @@ caseVerdict (desc, given, expected) = do export logCheck : String -> Elab () -logCheck = \s => logMsg "gen.auto.canonic.check-sig" 0 s +logCheck = \s => logMsg "deptycheck.canonic.check-sig" 0 s export checkAndLog : TestCaseDesc -> Elab () diff --git a/tests/derivation/utils/canonicsig/dep-params/expected b/tests/derivation/utils/canonicsig/dep-params/expected index e37eeb869..bf57fd8db 100644 --- a/tests/derivation/utils/canonicsig/dep-params/expected +++ b/tests/derivation/utils/canonicsig/dep-params/expected @@ -1,8 +1,8 @@ 1/2: Building Infra (Infra.idr) 2/2: Building CanonicSigCheck (CanonicSigCheck.idr) -LOG gen.auto.canonic.check-sig:0: dependent type + mixed explicitness; all named; no givens: OKAY -LOG gen.auto.canonic.check-sig:0: dependent type + mixed explicitness; all named; no givens': OKAY -LOG gen.auto.canonic.check-sig:0: dependent type + mixed explicitness; all named; impl `a` given: OKAY -LOG gen.auto.canonic.check-sig:0: dependent type + mixed explicitness; all named; expl `n` given: OKAY -LOG gen.auto.canonic.check-sig:0: dependent type + mixed explicitness; all named; `a` and `n` given: OKAY -LOG gen.auto.canonic.check-sig:0: dependent type + mixed explicitness; all named; all given: OKAY +LOG deptycheck.canonic.check-sig:0: dependent type + mixed explicitness; all named; no givens: OKAY +LOG deptycheck.canonic.check-sig:0: dependent type + mixed explicitness; all named; no givens': OKAY +LOG deptycheck.canonic.check-sig:0: dependent type + mixed explicitness; all named; impl `a` given: OKAY +LOG deptycheck.canonic.check-sig:0: dependent type + mixed explicitness; all named; expl `n` given: OKAY +LOG deptycheck.canonic.check-sig:0: dependent type + mixed explicitness; all named; `a` and `n` given: OKAY +LOG deptycheck.canonic.check-sig:0: dependent type + mixed explicitness; all named; all given: OKAY diff --git a/tests/derivation/utils/canonicsig/nondep-expl-params/expected b/tests/derivation/utils/canonicsig/nondep-expl-params/expected index c1d398135..dc1b7008d 100644 --- a/tests/derivation/utils/canonicsig/nondep-expl-params/expected +++ b/tests/derivation/utils/canonicsig/nondep-expl-params/expected @@ -1,6 +1,6 @@ 1/2: Building Infra (Infra.idr) 2/2: Building CanonicSigCheck (CanonicSigCheck.idr) -LOG gen.auto.canonic.check-sig:0: non-dependent type + expl params; all named; no givens: OKAY -LOG gen.auto.canonic.check-sig:0: non-dependent type + expl params; all named; 1st given: OKAY -LOG gen.auto.canonic.check-sig:0: non-dependent type + expl params; all named; 2nd given: OKAY -LOG gen.auto.canonic.check-sig:0: non-dependent type + expl params; all named; both given: OKAY +LOG deptycheck.canonic.check-sig:0: non-dependent type + expl params; all named; no givens: OKAY +LOG deptycheck.canonic.check-sig:0: non-dependent type + expl params; all named; 1st given: OKAY +LOG deptycheck.canonic.check-sig:0: non-dependent type + expl params; all named; 2nd given: OKAY +LOG deptycheck.canonic.check-sig:0: non-dependent type + expl params; all named; both given: OKAY diff --git a/tests/derivation/utils/canonicsig/nondep-mixed-params/expected b/tests/derivation/utils/canonicsig/nondep-mixed-params/expected index 46c5a692c..fc6a54e01 100644 --- a/tests/derivation/utils/canonicsig/nondep-mixed-params/expected +++ b/tests/derivation/utils/canonicsig/nondep-mixed-params/expected @@ -1,6 +1,6 @@ 1/2: Building Infra (Infra.idr) 2/2: Building CanonicSigCheck (CanonicSigCheck.idr) -LOG gen.auto.canonic.check-sig:0: non-dependent type + mixed explicitness; all named; no givens: OKAY -LOG gen.auto.canonic.check-sig:0: non-dependent type + mixed explicitness; all named; 1st given: OKAY -LOG gen.auto.canonic.check-sig:0: non-dependent type + mixed explicitness; all named; 2nd given: OKAY -LOG gen.auto.canonic.check-sig:0: non-dependent type + mixed explicitness; all named; both given: OKAY +LOG deptycheck.canonic.check-sig:0: non-dependent type + mixed explicitness; all named; no givens: OKAY +LOG deptycheck.canonic.check-sig:0: non-dependent type + mixed explicitness; all named; 1st given: OKAY +LOG deptycheck.canonic.check-sig:0: non-dependent type + mixed explicitness; all named; 2nd given: OKAY +LOG deptycheck.canonic.check-sig:0: non-dependent type + mixed explicitness; all named; both given: OKAY diff --git a/tests/derivation/utils/canonicsig/trivial/expected b/tests/derivation/utils/canonicsig/trivial/expected index 05d6e6842..584179c44 100644 --- a/tests/derivation/utils/canonicsig/trivial/expected +++ b/tests/derivation/utils/canonicsig/trivial/expected @@ -1,3 +1,3 @@ 1/2: Building Infra (Infra.idr) 2/2: Building CanonicSigCheck (CanonicSigCheck.idr) -LOG gen.auto.canonic.check-sig:0: trivial type; no givens: OKAY +LOG deptycheck.canonic.check-sig:0: trivial type; no givens: OKAY diff --git a/tests/derivation/utils/cons-analysis/_common-deep-cons-app/Infra.idr b/tests/derivation/utils/cons-analysis/_common-deep-cons-app/Infra.idr index 2c93f7f49..e66feb66d 100644 --- a/tests/derivation/utils/cons-analysis/_common-deep-cons-app/Infra.idr +++ b/tests/derivation/utils/cons-analysis/_common-deep-cons-app/Infra.idr @@ -12,17 +12,17 @@ import Deriving.DepTyCheck.Gen.Core.Util printDeepConsApp : List Name -> TTImp -> Elab Unit printDeepConsApp freeNames tyExpr = do _ <- getNamesInfoInTypes' tyExpr - logMsg "gen.auto.deep-cons-app" 0 "" - logMsg "gen.auto.deep-cons-app" 0 "given free names: \{show freeNames}" - logSugaredTerm "gen.auto.deep-cons-app" 0 "original expression" tyExpr + logMsg "deptycheck.deep-cons-app" 0 "" + logMsg "deptycheck.deep-cons-app" 0 "given free names: \{show freeNames}" + logSugaredTerm "deptycheck.deep-cons-app" 0 "original expression" tyExpr let Right tyExpr = resolveNamesUniquely (fromList freeNames) tyExpr - | Left (n, alts) => logMsg "gen.auto.deep-cons-app" 0 "fail: name \{n} is not unique, alternatives: \{show alts}" - logSugaredTerm "gen.auto.deep-cons-app" 0 "resolved expression" tyExpr - logMsg "gen.auto.deep-cons-app" 0 "------------------------" + | Left (n, alts) => logMsg "deptycheck.deep-cons-app" 0 "fail: name \{n} is not unique, alternatives: \{show alts}" + logSugaredTerm "deptycheck.deep-cons-app" 0 "resolved expression" tyExpr + logMsg "deptycheck.deep-cons-app" 0 "------------------------" let Right (appliedNames ** bindExprF) = analyseDeepConsApp False (fromList freeNames) tyExpr - | Left err => logMsg "gen.auto.deep-cons-app" 0 "not a (deep) constructor application, reason: \{err}" - logMsg "gen.auto.deep-cons-app" 0 "applied names: \{show appliedNames}" + | Left err => logMsg "deptycheck.deep-cons-app" 0 "not a (deep) constructor application, reason: \{err}" + logMsg "deptycheck.deep-cons-app" 0 "applied names: \{show appliedNames}" let bindExpr = bindExprF $ \idx => bindVar $ show (index' appliedNames idx) ++ show idx - logSugaredTerm "gen.auto.deep-cons-app" 0 "bind expression" bindExpr + logSugaredTerm "deptycheck.deep-cons-app" 0 "bind expression" bindExpr %runElab consApps >>= traverse_ (uncurry printDeepConsApp) diff --git a/tests/derivation/utils/cons-analysis/deep-cons-app-001/expected b/tests/derivation/utils/cons-analysis/deep-cons-app-001/expected index 30022ef5a..75a4839d1 100644 --- a/tests/derivation/utils/cons-analysis/deep-cons-app-001/expected +++ b/tests/derivation/utils/cons-analysis/deep-cons-app-001/expected @@ -1,44 +1,44 @@ 1/2: Building ConsApps (ConsApps.idr) 2/2: Building Infra (Infra.idr) -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [a] -LOG gen.auto.deep-cons-app:0: original expression: a -LOG gen.auto.deep-cons-app:0: resolved expression: a -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: applied names: [a] -LOG gen.auto.deep-cons-app:0: bind expression: a0 -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [] -LOG gen.auto.deep-cons-app:0: original expression: Nat -LOG gen.auto.deep-cons-app:0: resolved expression: Nat -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: applied names: [] -LOG gen.auto.deep-cons-app:0: bind expression: Nat -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [Nat] -LOG gen.auto.deep-cons-app:0: original expression: Nat -LOG gen.auto.deep-cons-app:0: resolved expression: Nat -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: applied names: [Nat] -LOG gen.auto.deep-cons-app:0: bind expression: Nat0 -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [n, a] -LOG gen.auto.deep-cons-app:0: original expression: Vect n a -LOG gen.auto.deep-cons-app:0: resolved expression: Vect n a -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: applied names: [n, a] -LOG gen.auto.deep-cons-app:0: bind expression: Vect n0 a1 -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [a] -LOG gen.auto.deep-cons-app:0: original expression: Either a a -LOG gen.auto.deep-cons-app:0: resolved expression: Either a a -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: applied names: [a, a] -LOG gen.auto.deep-cons-app:0: bind expression: Either a0 a1 -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [a, b] -LOG gen.auto.deep-cons-app:0: original expression: X a a -LOG gen.auto.deep-cons-app:0: resolved expression: X a a -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: applied names: [a, a] -LOG gen.auto.deep-cons-app:0: bind expression: X a0 a1 +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [a] +LOG deptycheck.deep-cons-app:0: original expression: a +LOG deptycheck.deep-cons-app:0: resolved expression: a +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: applied names: [a] +LOG deptycheck.deep-cons-app:0: bind expression: a0 +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [] +LOG deptycheck.deep-cons-app:0: original expression: Nat +LOG deptycheck.deep-cons-app:0: resolved expression: Nat +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: applied names: [] +LOG deptycheck.deep-cons-app:0: bind expression: Nat +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [Nat] +LOG deptycheck.deep-cons-app:0: original expression: Nat +LOG deptycheck.deep-cons-app:0: resolved expression: Nat +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: applied names: [Nat] +LOG deptycheck.deep-cons-app:0: bind expression: Nat0 +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [n, a] +LOG deptycheck.deep-cons-app:0: original expression: Vect n a +LOG deptycheck.deep-cons-app:0: resolved expression: Vect n a +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: applied names: [n, a] +LOG deptycheck.deep-cons-app:0: bind expression: Vect n0 a1 +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [a] +LOG deptycheck.deep-cons-app:0: original expression: Either a a +LOG deptycheck.deep-cons-app:0: resolved expression: Either a a +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: applied names: [a, a] +LOG deptycheck.deep-cons-app:0: bind expression: Either a0 a1 +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [a, b] +LOG deptycheck.deep-cons-app:0: original expression: X a a +LOG deptycheck.deep-cons-app:0: resolved expression: X a a +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: applied names: [a, a] +LOG deptycheck.deep-cons-app:0: bind expression: X a0 a1 diff --git a/tests/derivation/utils/cons-analysis/deep-cons-app-002-neg/expected b/tests/derivation/utils/cons-analysis/deep-cons-app-002-neg/expected index 7ebea5e90..823bc836d 100644 --- a/tests/derivation/utils/cons-analysis/deep-cons-app-002-neg/expected +++ b/tests/derivation/utils/cons-analysis/deep-cons-app-002-neg/expected @@ -1,56 +1,56 @@ 1/2: Building ConsApps (ConsApps.idr) 2/2: Building Infra (Infra.idr) -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [a] -LOG gen.auto.deep-cons-app:0: original expression: b -LOG gen.auto.deep-cons-app:0: resolved expression: b -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: not a (deep) constructor application, reason: name `b` is not a constructor -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [] -LOG gen.auto.deep-cons-app:0: original expression: a -LOG gen.auto.deep-cons-app:0: resolved expression: a -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: not a (deep) constructor application, reason: name `a` is not a constructor -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [] -LOG gen.auto.deep-cons-app:0: original expression: X a a -LOG gen.auto.deep-cons-app:0: resolved expression: X a a -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: not a (deep) constructor application, reason: name `a` is not a constructor -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [b] -LOG gen.auto.deep-cons-app:0: original expression: X a a -LOG gen.auto.deep-cons-app:0: resolved expression: X a a -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: not a (deep) constructor application, reason: name `a` is not a constructor -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [a, b, X] -LOG gen.auto.deep-cons-app:0: original expression: X a a -LOG gen.auto.deep-cons-app:0: resolved expression: X a a -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: not a (deep) constructor application, reason: applying free name to some arguments -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [] -LOG gen.auto.deep-cons-app:0: original expression: Y -LOG gen.auto.deep-cons-app:0: resolved expression: Y -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: not a (deep) constructor application, reason: name `Y` is not a constructor -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [a] -LOG gen.auto.deep-cons-app:0: original expression: Y -LOG gen.auto.deep-cons-app:0: resolved expression: Y -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: not a (deep) constructor application, reason: name `Y` is not a constructor -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [a] -LOG gen.auto.deep-cons-app:0: original expression: Y a -LOG gen.auto.deep-cons-app:0: resolved expression: Y a -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: not a (deep) constructor application, reason: name `Y` is not a constructor -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [a] -LOG gen.auto.deep-cons-app:0: original expression: Y a b -LOG gen.auto.deep-cons-app:0: resolved expression: Y a b -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: not a (deep) constructor application, reason: name `Y` is not a constructor +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [a] +LOG deptycheck.deep-cons-app:0: original expression: b +LOG deptycheck.deep-cons-app:0: resolved expression: b +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: not a (deep) constructor application, reason: name `b` is not a constructor +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [] +LOG deptycheck.deep-cons-app:0: original expression: a +LOG deptycheck.deep-cons-app:0: resolved expression: a +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: not a (deep) constructor application, reason: name `a` is not a constructor +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [] +LOG deptycheck.deep-cons-app:0: original expression: X a a +LOG deptycheck.deep-cons-app:0: resolved expression: X a a +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: not a (deep) constructor application, reason: name `a` is not a constructor +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [b] +LOG deptycheck.deep-cons-app:0: original expression: X a a +LOG deptycheck.deep-cons-app:0: resolved expression: X a a +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: not a (deep) constructor application, reason: name `a` is not a constructor +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [a, b, X] +LOG deptycheck.deep-cons-app:0: original expression: X a a +LOG deptycheck.deep-cons-app:0: resolved expression: X a a +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: not a (deep) constructor application, reason: applying free name to some arguments +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [] +LOG deptycheck.deep-cons-app:0: original expression: Y +LOG deptycheck.deep-cons-app:0: resolved expression: Y +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: not a (deep) constructor application, reason: name `Y` is not a constructor +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [a] +LOG deptycheck.deep-cons-app:0: original expression: Y +LOG deptycheck.deep-cons-app:0: resolved expression: Y +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: not a (deep) constructor application, reason: name `Y` is not a constructor +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [a] +LOG deptycheck.deep-cons-app:0: original expression: Y a +LOG deptycheck.deep-cons-app:0: resolved expression: Y a +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: not a (deep) constructor application, reason: name `Y` is not a constructor +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [a] +LOG deptycheck.deep-cons-app:0: original expression: Y a b +LOG deptycheck.deep-cons-app:0: resolved expression: Y a b +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: not a (deep) constructor application, reason: name `Y` is not a constructor diff --git a/tests/derivation/utils/cons-analysis/deep-cons-app-003/expected b/tests/derivation/utils/cons-analysis/deep-cons-app-003/expected index 873792ce1..6e8722ad6 100644 --- a/tests/derivation/utils/cons-analysis/deep-cons-app-003/expected +++ b/tests/derivation/utils/cons-analysis/deep-cons-app-003/expected @@ -1,44 +1,44 @@ 1/2: Building ConsApps (ConsApps.idr) 2/2: Building Infra (Infra.idr) -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [n, a] -LOG gen.auto.deep-cons-app:0: original expression: Vect n Nat -LOG gen.auto.deep-cons-app:0: resolved expression: Vect n Nat -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: applied names: [n] -LOG gen.auto.deep-cons-app:0: bind expression: Vect n0 Nat -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [n] -LOG gen.auto.deep-cons-app:0: original expression: Vect n Nat -LOG gen.auto.deep-cons-app:0: resolved expression: Vect n Nat -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: applied names: [n] -LOG gen.auto.deep-cons-app:0: bind expression: Vect n0 Nat -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [n, a, b] -LOG gen.auto.deep-cons-app:0: original expression: Vect n (Either a b) -LOG gen.auto.deep-cons-app:0: resolved expression: Vect n (Either a b) -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: applied names: [n, a, b] -LOG gen.auto.deep-cons-app:0: bind expression: Vect n0 (Either a1 b2) -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [n, a, b] -LOG gen.auto.deep-cons-app:0: original expression: Vect (S n) (Either a b) -LOG gen.auto.deep-cons-app:0: resolved expression: Vect (S n) (Either a b) -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: applied names: [n, a, b] -LOG gen.auto.deep-cons-app:0: bind expression: Vect (S n0) (Either a1 b2) -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [n, a, b] -LOG gen.auto.deep-cons-app:0: original expression: Vect (S n) (Either a a) -LOG gen.auto.deep-cons-app:0: resolved expression: Vect (S n) (Either a a) -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: applied names: [n, a, a] -LOG gen.auto.deep-cons-app:0: bind expression: Vect (S n0) (Either a1 a2) -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [n, a, b] -LOG gen.auto.deep-cons-app:0: original expression: Vect (S (S n)) (Either a (X a a)) -LOG gen.auto.deep-cons-app:0: resolved expression: Vect (S (S n)) (Either a (X a a)) -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: applied names: [n, a, a, a] -LOG gen.auto.deep-cons-app:0: bind expression: Vect (S (S n0)) (Either a1 (X a2 a3)) +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [n, a] +LOG deptycheck.deep-cons-app:0: original expression: Vect n Nat +LOG deptycheck.deep-cons-app:0: resolved expression: Vect n Nat +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: applied names: [n] +LOG deptycheck.deep-cons-app:0: bind expression: Vect n0 Nat +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [n] +LOG deptycheck.deep-cons-app:0: original expression: Vect n Nat +LOG deptycheck.deep-cons-app:0: resolved expression: Vect n Nat +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: applied names: [n] +LOG deptycheck.deep-cons-app:0: bind expression: Vect n0 Nat +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [n, a, b] +LOG deptycheck.deep-cons-app:0: original expression: Vect n (Either a b) +LOG deptycheck.deep-cons-app:0: resolved expression: Vect n (Either a b) +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: applied names: [n, a, b] +LOG deptycheck.deep-cons-app:0: bind expression: Vect n0 (Either a1 b2) +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [n, a, b] +LOG deptycheck.deep-cons-app:0: original expression: Vect (S n) (Either a b) +LOG deptycheck.deep-cons-app:0: resolved expression: Vect (S n) (Either a b) +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: applied names: [n, a, b] +LOG deptycheck.deep-cons-app:0: bind expression: Vect (S n0) (Either a1 b2) +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [n, a, b] +LOG deptycheck.deep-cons-app:0: original expression: Vect (S n) (Either a a) +LOG deptycheck.deep-cons-app:0: resolved expression: Vect (S n) (Either a a) +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: applied names: [n, a, a] +LOG deptycheck.deep-cons-app:0: bind expression: Vect (S n0) (Either a1 a2) +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [n, a, b] +LOG deptycheck.deep-cons-app:0: original expression: Vect (S (S n)) (Either a (X a a)) +LOG deptycheck.deep-cons-app:0: resolved expression: Vect (S (S n)) (Either a (X a a)) +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: applied names: [n, a, a, a] +LOG deptycheck.deep-cons-app:0: bind expression: Vect (S (S n0)) (Either a1 (X a2 a3)) diff --git a/tests/derivation/utils/cons-analysis/deep-cons-app-004/expected b/tests/derivation/utils/cons-analysis/deep-cons-app-004/expected index cbbadb300..25ccd991a 100644 --- a/tests/derivation/utils/cons-analysis/deep-cons-app-004/expected +++ b/tests/derivation/utils/cons-analysis/deep-cons-app-004/expected @@ -1,65 +1,65 @@ 1/2: Building ConsApps (ConsApps.idr) 2/2: Building Infra (Infra.idr) -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [] -LOG gen.auto.deep-cons-app:0: original expression: XX (Right Unit) -LOG gen.auto.deep-cons-app:0: resolved expression: XX (Right ()) -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: applied names: [] -LOG gen.auto.deep-cons-app:0: bind expression: XX (Right ()) -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [a] -LOG gen.auto.deep-cons-app:0: original expression: XX (Right a) -LOG gen.auto.deep-cons-app:0: resolved expression: XX (Right a) -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: applied names: [a] -LOG gen.auto.deep-cons-app:0: bind expression: XX (Right a0) -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [] -LOG gen.auto.deep-cons-app:0: original expression: XX (Right MkUnit) -LOG gen.auto.deep-cons-app:0: resolved expression: XX (Right ()) -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: applied names: [] -LOG gen.auto.deep-cons-app:0: bind expression: XX (Right ()) -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [] -LOG gen.auto.deep-cons-app:0: original expression: XX (Right []) -LOG gen.auto.deep-cons-app:0: resolved expression: XX (Right []) -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: applied names: [] -LOG gen.auto.deep-cons-app:0: bind expression: XX (Right []) -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [n, a, b] -LOG gen.auto.deep-cons-app:0: original expression: XX (Left (S Z `MC` (S (S Z) `MC` (S (S (S Z)) `MC` MM)))) -LOG gen.auto.deep-cons-app:0: resolved expression: XX (Left (1 `MC` (2 `MC` (3 `MC` MM)))) -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: applied names: [] -LOG gen.auto.deep-cons-app:0: bind expression: XX (Left (1 `MC` (2 `MC` (3 `MC` MM)))) -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [n, a, b] -LOG gen.auto.deep-cons-app:0: original expression: XX (Left (S Z `MC` (S (S n) `MC` (S (S (S Z)) `MC` MM)))) -LOG gen.auto.deep-cons-app:0: resolved expression: XX (Left (1 `MC` (S (S n) `MC` (3 `MC` MM)))) -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: applied names: [n] -LOG gen.auto.deep-cons-app:0: bind expression: XX (Left (1 `MC` (S (S n0) `MC` (3 `MC` MM)))) -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [] -LOG gen.auto.deep-cons-app:0: original expression: XX (Left (S Z `MC` (S (S Z) `MC` (S (S (S Z)) `MC` MM)))) -LOG gen.auto.deep-cons-app:0: resolved expression: XX (Left (1 `MC` (2 `MC` (3 `MC` MM)))) -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: applied names: [] -LOG gen.auto.deep-cons-app:0: bind expression: XX (Left (1 `MC` (2 `MC` (3 `MC` MM)))) -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [n, a, b, c] -LOG gen.auto.deep-cons-app:0: original expression: XX (Left (a `MC` (b `MC` (c `MC` MM)))) -LOG gen.auto.deep-cons-app:0: resolved expression: XX (Left (a `MC` (b `MC` (c `MC` MM)))) -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: applied names: [a, b, c] -LOG gen.auto.deep-cons-app:0: bind expression: XX (Left (a0 `MC` (b1 `MC` (c2 `MC` MM)))) -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [n, a, b, c] -LOG gen.auto.deep-cons-app:0: original expression: XX (Left (a `MC` (Z `MC` (c `MC` MM)))) -LOG gen.auto.deep-cons-app:0: resolved expression: XX (Left (a `MC` (0 `MC` (c `MC` MM)))) -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: applied names: [a, c] -LOG gen.auto.deep-cons-app:0: bind expression: XX (Left (a0 `MC` (0 `MC` (c1 `MC` MM)))) +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [] +LOG deptycheck.deep-cons-app:0: original expression: XX (Right Unit) +LOG deptycheck.deep-cons-app:0: resolved expression: XX (Right ()) +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: applied names: [] +LOG deptycheck.deep-cons-app:0: bind expression: XX (Right ()) +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [a] +LOG deptycheck.deep-cons-app:0: original expression: XX (Right a) +LOG deptycheck.deep-cons-app:0: resolved expression: XX (Right a) +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: applied names: [a] +LOG deptycheck.deep-cons-app:0: bind expression: XX (Right a0) +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [] +LOG deptycheck.deep-cons-app:0: original expression: XX (Right MkUnit) +LOG deptycheck.deep-cons-app:0: resolved expression: XX (Right ()) +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: applied names: [] +LOG deptycheck.deep-cons-app:0: bind expression: XX (Right ()) +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [] +LOG deptycheck.deep-cons-app:0: original expression: XX (Right []) +LOG deptycheck.deep-cons-app:0: resolved expression: XX (Right []) +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: applied names: [] +LOG deptycheck.deep-cons-app:0: bind expression: XX (Right []) +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [n, a, b] +LOG deptycheck.deep-cons-app:0: original expression: XX (Left (S Z `MC` (S (S Z) `MC` (S (S (S Z)) `MC` MM)))) +LOG deptycheck.deep-cons-app:0: resolved expression: XX (Left (1 `MC` (2 `MC` (3 `MC` MM)))) +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: applied names: [] +LOG deptycheck.deep-cons-app:0: bind expression: XX (Left (1 `MC` (2 `MC` (3 `MC` MM)))) +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [n, a, b] +LOG deptycheck.deep-cons-app:0: original expression: XX (Left (S Z `MC` (S (S n) `MC` (S (S (S Z)) `MC` MM)))) +LOG deptycheck.deep-cons-app:0: resolved expression: XX (Left (1 `MC` (S (S n) `MC` (3 `MC` MM)))) +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: applied names: [n] +LOG deptycheck.deep-cons-app:0: bind expression: XX (Left (1 `MC` (S (S n0) `MC` (3 `MC` MM)))) +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [] +LOG deptycheck.deep-cons-app:0: original expression: XX (Left (S Z `MC` (S (S Z) `MC` (S (S (S Z)) `MC` MM)))) +LOG deptycheck.deep-cons-app:0: resolved expression: XX (Left (1 `MC` (2 `MC` (3 `MC` MM)))) +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: applied names: [] +LOG deptycheck.deep-cons-app:0: bind expression: XX (Left (1 `MC` (2 `MC` (3 `MC` MM)))) +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [n, a, b, c] +LOG deptycheck.deep-cons-app:0: original expression: XX (Left (a `MC` (b `MC` (c `MC` MM)))) +LOG deptycheck.deep-cons-app:0: resolved expression: XX (Left (a `MC` (b `MC` (c `MC` MM)))) +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: applied names: [a, b, c] +LOG deptycheck.deep-cons-app:0: bind expression: XX (Left (a0 `MC` (b1 `MC` (c2 `MC` MM)))) +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [n, a, b, c] +LOG deptycheck.deep-cons-app:0: original expression: XX (Left (a `MC` (Z `MC` (c `MC` MM)))) +LOG deptycheck.deep-cons-app:0: resolved expression: XX (Left (a `MC` (0 `MC` (c `MC` MM)))) +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: applied names: [a, c] +LOG deptycheck.deep-cons-app:0: bind expression: XX (Left (a0 `MC` (0 `MC` (c1 `MC` MM)))) diff --git a/tests/derivation/utils/cons-analysis/deep-cons-app-005-neg/expected b/tests/derivation/utils/cons-analysis/deep-cons-app-005-neg/expected index 694cb784e..1e3d0fefa 100644 --- a/tests/derivation/utils/cons-analysis/deep-cons-app-005-neg/expected +++ b/tests/derivation/utils/cons-analysis/deep-cons-app-005-neg/expected @@ -1,50 +1,50 @@ 1/2: Building ConsApps (ConsApps.idr) 2/2: Building Infra (Infra.idr) -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [] -LOG gen.auto.deep-cons-app:0: original expression: XX (Rigt Unit) -LOG gen.auto.deep-cons-app:0: resolved expression: XX (Rigt ()) -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: not a (deep) constructor application, reason: name `Rigt` is not a constructor -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [a] -LOG gen.auto.deep-cons-app:0: original expression: XX (Rigt a) -LOG gen.auto.deep-cons-app:0: resolved expression: XX (Rigt a) -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: not a (deep) constructor application, reason: name `Rigt` is not a constructor -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [] -LOG gen.auto.deep-cons-app:0: original expression: XX (Rigt MkUnit) -LOG gen.auto.deep-cons-app:0: resolved expression: XX (Rigt ()) -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: not a (deep) constructor application, reason: name `Rigt` is not a constructor -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [] -LOG gen.auto.deep-cons-app:0: original expression: XX (Rigt []) -LOG gen.auto.deep-cons-app:0: resolved expression: XX (Rigt []) -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: not a (deep) constructor application, reason: name `Rigt` is not a constructor -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [n, a, b] -LOG gen.auto.deep-cons-app:0: original expression: XX (Left (S Z `MC` (S (S Z) `MC` (S (S (S m)) `MC` MM)))) -LOG gen.auto.deep-cons-app:0: resolved expression: XX (Left (1 `MC` (2 `MC` (S (S (S m)) `MC` MM)))) -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: not a (deep) constructor application, reason: name `m` is not a constructor -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [] -LOG gen.auto.deep-cons-app:0: original expression: XX (Left (S Z `MC` (S (S Z) `MC` (S (S (S Z)) `MC` MX)))) -LOG gen.auto.deep-cons-app:0: resolved expression: XX (Left (1 `MC` (2 `MC` (3 `MC` MX)))) -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: not a (deep) constructor application, reason: name `MX` is not a constructor -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [n, a, b] -LOG gen.auto.deep-cons-app:0: original expression: XX (Left (a `MC` (b `MC` (c `MC` MM)))) -LOG gen.auto.deep-cons-app:0: resolved expression: XX (Left (a `MC` (b `MC` (c `MC` MM)))) -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: not a (deep) constructor application, reason: name `c` is not a constructor -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [n, a, b] -LOG gen.auto.deep-cons-app:0: original expression: XX (Left (a `MC` (Z `MC` (c `MC` MM)))) -LOG gen.auto.deep-cons-app:0: resolved expression: XX (Left (a `MC` (0 `MC` (c `MC` MM)))) -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: not a (deep) constructor application, reason: name `c` is not a constructor +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [] +LOG deptycheck.deep-cons-app:0: original expression: XX (Rigt Unit) +LOG deptycheck.deep-cons-app:0: resolved expression: XX (Rigt ()) +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: not a (deep) constructor application, reason: name `Rigt` is not a constructor +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [a] +LOG deptycheck.deep-cons-app:0: original expression: XX (Rigt a) +LOG deptycheck.deep-cons-app:0: resolved expression: XX (Rigt a) +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: not a (deep) constructor application, reason: name `Rigt` is not a constructor +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [] +LOG deptycheck.deep-cons-app:0: original expression: XX (Rigt MkUnit) +LOG deptycheck.deep-cons-app:0: resolved expression: XX (Rigt ()) +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: not a (deep) constructor application, reason: name `Rigt` is not a constructor +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [] +LOG deptycheck.deep-cons-app:0: original expression: XX (Rigt []) +LOG deptycheck.deep-cons-app:0: resolved expression: XX (Rigt []) +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: not a (deep) constructor application, reason: name `Rigt` is not a constructor +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [n, a, b] +LOG deptycheck.deep-cons-app:0: original expression: XX (Left (S Z `MC` (S (S Z) `MC` (S (S (S m)) `MC` MM)))) +LOG deptycheck.deep-cons-app:0: resolved expression: XX (Left (1 `MC` (2 `MC` (S (S (S m)) `MC` MM)))) +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: not a (deep) constructor application, reason: name `m` is not a constructor +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [] +LOG deptycheck.deep-cons-app:0: original expression: XX (Left (S Z `MC` (S (S Z) `MC` (S (S (S Z)) `MC` MX)))) +LOG deptycheck.deep-cons-app:0: resolved expression: XX (Left (1 `MC` (2 `MC` (3 `MC` MX)))) +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: not a (deep) constructor application, reason: name `MX` is not a constructor +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [n, a, b] +LOG deptycheck.deep-cons-app:0: original expression: XX (Left (a `MC` (b `MC` (c `MC` MM)))) +LOG deptycheck.deep-cons-app:0: resolved expression: XX (Left (a `MC` (b `MC` (c `MC` MM)))) +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: not a (deep) constructor application, reason: name `c` is not a constructor +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [n, a, b] +LOG deptycheck.deep-cons-app:0: original expression: XX (Left (a `MC` (Z `MC` (c `MC` MM)))) +LOG deptycheck.deep-cons-app:0: resolved expression: XX (Left (a `MC` (0 `MC` (c `MC` MM)))) +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: not a (deep) constructor application, reason: name `c` is not a constructor diff --git a/tests/derivation/utils/cons-analysis/deep-cons-app-006/expected b/tests/derivation/utils/cons-analysis/deep-cons-app-006/expected index c8e0b07de..04f68f468 100644 --- a/tests/derivation/utils/cons-analysis/deep-cons-app-006/expected +++ b/tests/derivation/utils/cons-analysis/deep-cons-app-006/expected @@ -1,64 +1,64 @@ 1/2: Building ConsApps (ConsApps.idr) 2/2: Building Infra (Infra.idr) -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [] -LOG gen.auto.deep-cons-app:0: original expression: Nat -LOG gen.auto.deep-cons-app:0: resolved expression: Nat -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: applied names: [] -LOG gen.auto.deep-cons-app:0: bind expression: Nat -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [{arg:1}] -LOG gen.auto.deep-cons-app:0: original expression: Nat -LOG gen.auto.deep-cons-app:0: resolved expression: Nat -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: applied names: [] -LOG gen.auto.deep-cons-app:0: bind expression: Nat -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [elem] -LOG gen.auto.deep-cons-app:0: original expression: Vect 0 elem -LOG gen.auto.deep-cons-app:0: resolved expression: Vect 0 elem -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: applied names: [elem] -LOG gen.auto.deep-cons-app:0: bind expression: Vect 0 elem0 -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [len, elem, x, xs] -LOG gen.auto.deep-cons-app:0: original expression: Vect (S len) elem -LOG gen.auto.deep-cons-app:0: resolved expression: Vect (S len) elem -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: applied names: [len, elem] -LOG gen.auto.deep-cons-app:0: bind expression: Vect (S len0) elem1 -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [{a:1053}] -LOG gen.auto.deep-cons-app:0: original expression: Split [] -LOG gen.auto.deep-cons-app:0: resolved expression: Split [] -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: applied names: [{a:1053}, {a:1053}] -LOG gen.auto.deep-cons-app:0: bind expression: Split [] -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [a, x] -LOG gen.auto.deep-cons-app:0: original expression: Split [x] -LOG gen.auto.deep-cons-app:0: resolved expression: Split [x] -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: applied names: [a, a, x, a] -LOG gen.auto.deep-cons-app:0: bind expression: Split [x2] -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [a, x, xs, y, ys] -LOG gen.auto.deep-cons-app:0: original expression: Split (x :: (xs ++ (y :: ys))) -LOG gen.auto.deep-cons-app:0: resolved expression: Split (x :: (xs ++ (y :: ys))) -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: not a (deep) constructor application, reason: name `Prelude.Types.List.(++)` is not a constructor -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [a, x] -LOG gen.auto.deep-cons-app:0: original expression: x = x -LOG gen.auto.deep-cons-app:0: resolved expression: x = x -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: applied names: [a, a, x, x] -LOG gen.auto.deep-cons-app:0: bind expression: x2 = x3 -LOG gen.auto.deep-cons-app:0: -LOG gen.auto.deep-cons-app:0: given free names: [a, x] -LOG gen.auto.deep-cons-app:0: original expression: EqExp a a x x -LOG gen.auto.deep-cons-app:0: resolved expression: EqExp a a x x -LOG gen.auto.deep-cons-app:0: ------------------------ -LOG gen.auto.deep-cons-app:0: applied names: [a, a, x, x] -LOG gen.auto.deep-cons-app:0: bind expression: EqExp a0 a1 x2 x3 +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [] +LOG deptycheck.deep-cons-app:0: original expression: Nat +LOG deptycheck.deep-cons-app:0: resolved expression: Nat +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: applied names: [] +LOG deptycheck.deep-cons-app:0: bind expression: Nat +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [{arg:1}] +LOG deptycheck.deep-cons-app:0: original expression: Nat +LOG deptycheck.deep-cons-app:0: resolved expression: Nat +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: applied names: [] +LOG deptycheck.deep-cons-app:0: bind expression: Nat +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [elem] +LOG deptycheck.deep-cons-app:0: original expression: Vect 0 elem +LOG deptycheck.deep-cons-app:0: resolved expression: Vect 0 elem +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: applied names: [elem] +LOG deptycheck.deep-cons-app:0: bind expression: Vect 0 elem0 +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [len, elem, x, xs] +LOG deptycheck.deep-cons-app:0: original expression: Vect (S len) elem +LOG deptycheck.deep-cons-app:0: resolved expression: Vect (S len) elem +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: applied names: [len, elem] +LOG deptycheck.deep-cons-app:0: bind expression: Vect (S len0) elem1 +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [{a:1053}] +LOG deptycheck.deep-cons-app:0: original expression: Split [] +LOG deptycheck.deep-cons-app:0: resolved expression: Split [] +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: applied names: [{a:1053}, {a:1053}] +LOG deptycheck.deep-cons-app:0: bind expression: Split [] +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [a, x] +LOG deptycheck.deep-cons-app:0: original expression: Split [x] +LOG deptycheck.deep-cons-app:0: resolved expression: Split [x] +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: applied names: [a, a, x, a] +LOG deptycheck.deep-cons-app:0: bind expression: Split [x2] +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [a, x, xs, y, ys] +LOG deptycheck.deep-cons-app:0: original expression: Split (x :: (xs ++ (y :: ys))) +LOG deptycheck.deep-cons-app:0: resolved expression: Split (x :: (xs ++ (y :: ys))) +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: not a (deep) constructor application, reason: name `Prelude.Types.List.(++)` is not a constructor +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [a, x] +LOG deptycheck.deep-cons-app:0: original expression: x = x +LOG deptycheck.deep-cons-app:0: resolved expression: x = x +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: applied names: [a, a, x, x] +LOG deptycheck.deep-cons-app:0: bind expression: x2 = x3 +LOG deptycheck.deep-cons-app:0: +LOG deptycheck.deep-cons-app:0: given free names: [a, x] +LOG deptycheck.deep-cons-app:0: original expression: EqExp a a x x +LOG deptycheck.deep-cons-app:0: resolved expression: EqExp a a x x +LOG deptycheck.deep-cons-app:0: ------------------------ +LOG deptycheck.deep-cons-app:0: applied names: [a, a, x, x] +LOG deptycheck.deep-cons-app:0: bind expression: EqExp a0 a1 x2 x3 diff --git a/tests/derivation/utils/fusion/print/depsolver/001 one var match/DerivedGen.idr b/tests/derivation/utils/fusion/print/depsolver/001 one var match/DerivedGen.idr new file mode 100644 index 000000000..ed358fde0 --- /dev/null +++ b/tests/derivation/utils/fusion/print/depsolver/001 one var match/DerivedGen.idr @@ -0,0 +1,14 @@ +module DerivedGen + +import public Deriving.DepTyCheck.Util.Fusion +import public Deriving.DepTyCheck.Gen.Core + +%default total + + +deps : List Arg +deps = [MkArg MW ExplicitArg Nothing (var "X" .$ bindVar "a"), MkArg MW ExplicitArg Nothing (var "Y" .$ bindVar "a")] + + +main : IO () +main = putPretty $ solveDependencies deps diff --git a/tests/derivation/utils/fusion/print/depsolver/001 one var match/derive.ipkg b/tests/derivation/utils/fusion/print/depsolver/001 one var match/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/utils/fusion/print/depsolver/001 one var match/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/depsolver/001 one var match/expected b/tests/derivation/utils/fusion/print/depsolver/001 one var match/expected new file mode 100644 index 000000000..fce161db9 --- /dev/null +++ b/tests/derivation/utils/fusion/print/depsolver/001 one var match/expected @@ -0,0 +1,2 @@ +1/1: Building DerivedGen (DerivedGen.idr) +[[("X", ["a"]), ("Y", ["a"])]] diff --git a/tests/derivation/utils/fusion/print/depsolver/001 one var match/run b/tests/derivation/utils/fusion/print/depsolver/001 one var match/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/utils/fusion/print/depsolver/001 one var match/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/depsolver/002 one var no match/DerivedGen.idr b/tests/derivation/utils/fusion/print/depsolver/002 one var no match/DerivedGen.idr new file mode 100644 index 000000000..8f019efb4 --- /dev/null +++ b/tests/derivation/utils/fusion/print/depsolver/002 one var no match/DerivedGen.idr @@ -0,0 +1,14 @@ +module DerivedGen + +import public Deriving.DepTyCheck.Util.Fusion +import public Deriving.DepTyCheck.Gen.Core + +%default total + + +deps : List Arg +deps = [MkArg MW ExplicitArg Nothing (var "X" .$ bindVar "a"), MkArg MW ExplicitArg Nothing (var "Y" .$ bindVar "b")] + + +main : IO () +main = putPretty $ solveDependencies deps diff --git a/tests/derivation/utils/fusion/print/depsolver/002 one var no match/derive.ipkg b/tests/derivation/utils/fusion/print/depsolver/002 one var no match/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/utils/fusion/print/depsolver/002 one var no match/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/depsolver/002 one var no match/expected b/tests/derivation/utils/fusion/print/depsolver/002 one var no match/expected new file mode 100644 index 000000000..daad2582c --- /dev/null +++ b/tests/derivation/utils/fusion/print/depsolver/002 one var no match/expected @@ -0,0 +1,2 @@ +1/1: Building DerivedGen (DerivedGen.idr) +[[("X", ["a"])], [("Y", ["b"])]] diff --git a/tests/derivation/utils/fusion/print/depsolver/002 one var no match/run b/tests/derivation/utils/fusion/print/depsolver/002 one var no match/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/utils/fusion/print/depsolver/002 one var no match/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/depsolver/003 two vars one match/DerivedGen.idr b/tests/derivation/utils/fusion/print/depsolver/003 two vars one match/DerivedGen.idr new file mode 100644 index 000000000..eb3946929 --- /dev/null +++ b/tests/derivation/utils/fusion/print/depsolver/003 two vars one match/DerivedGen.idr @@ -0,0 +1,14 @@ +module DerivedGen + +import public Deriving.DepTyCheck.Util.Fusion +import public Deriving.DepTyCheck.Gen.Core + +%default total + + +deps : List Arg +deps = [MkArg MW ExplicitArg Nothing (var "X" .$ bindVar "a" .$ bindVar "b"), MkArg MW ExplicitArg Nothing (var "Y" .$ bindVar "b" .$ bindVar "c")] + + +main : IO () +main = putPretty $ solveDependencies deps diff --git a/tests/derivation/utils/fusion/print/depsolver/003 two vars one match/derive.ipkg b/tests/derivation/utils/fusion/print/depsolver/003 two vars one match/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/utils/fusion/print/depsolver/003 two vars one match/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/depsolver/003 two vars one match/expected b/tests/derivation/utils/fusion/print/depsolver/003 two vars one match/expected new file mode 100644 index 000000000..80f2ce404 --- /dev/null +++ b/tests/derivation/utils/fusion/print/depsolver/003 two vars one match/expected @@ -0,0 +1,2 @@ +1/1: Building DerivedGen (DerivedGen.idr) +[[("X", ["a", "b"]), ("Y", ["b", "c"])]] diff --git a/tests/derivation/utils/fusion/print/depsolver/003 two vars one match/run b/tests/derivation/utils/fusion/print/depsolver/003 two vars one match/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/utils/fusion/print/depsolver/003 two vars one match/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/depsolver/004 three types one match/DerivedGen.idr b/tests/derivation/utils/fusion/print/depsolver/004 three types one match/DerivedGen.idr new file mode 100644 index 000000000..00f8e84ad --- /dev/null +++ b/tests/derivation/utils/fusion/print/depsolver/004 three types one match/DerivedGen.idr @@ -0,0 +1,16 @@ +module DerivedGen + +import public Deriving.DepTyCheck.Util.Fusion +import public Deriving.DepTyCheck.Gen.Core + +%default total + + +deps : List Arg +deps = [ MkArg MW ExplicitArg Nothing (var "X" .$ bindVar "a") + , MkArg MW ExplicitArg Nothing (var "Y" .$ bindVar "a") + , MkArg MW ExplicitArg Nothing (var "Z" .$ bindVar "b") ] + + +main : IO () +main = putPretty $ solveDependencies deps diff --git a/tests/derivation/utils/fusion/print/depsolver/004 three types one match/derive.ipkg b/tests/derivation/utils/fusion/print/depsolver/004 three types one match/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/utils/fusion/print/depsolver/004 three types one match/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/depsolver/004 three types one match/expected b/tests/derivation/utils/fusion/print/depsolver/004 three types one match/expected new file mode 100644 index 000000000..ad6c26e1c --- /dev/null +++ b/tests/derivation/utils/fusion/print/depsolver/004 three types one match/expected @@ -0,0 +1,2 @@ +1/1: Building DerivedGen (DerivedGen.idr) +[[("X", ["a"]), ("Y", ["a"])], [("Z", ["b"])]] diff --git a/tests/derivation/utils/fusion/print/depsolver/004 three types one match/run b/tests/derivation/utils/fusion/print/depsolver/004 three types one match/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/utils/fusion/print/depsolver/004 three types one match/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/depsolver/_common/derive.ipkg b/tests/derivation/utils/fusion/print/depsolver/_common/derive.ipkg new file mode 100644 index 000000000..762febf26 --- /dev/null +++ b/tests/derivation/utils/fusion/print/depsolver/_common/derive.ipkg @@ -0,0 +1,7 @@ +package derive-test + +authors = "Simon Tsirikov" + +opts = "--no-color --console-width 0" + +depends = deptycheck diff --git a/tests/derivation/utils/fusion/print/depsolver/_common/run b/tests/derivation/utils/fusion/print/depsolver/_common/run new file mode 100644 index 000000000..2a6b6401c --- /dev/null +++ b/tests/derivation/utils/fusion/print/depsolver/_common/run @@ -0,0 +1,9 @@ +rm -rf build + +NAMES_CLEANER="$(dirname "$(dirname "$(realpath "$1")")")"/.clean-names + +flock "$1" pack -q install-deps derive.ipkg && \ +idris2 --check --no-color --console-width 0 --no-banner --find-ipkg DerivedGen.idr && \ +pack exec DerivedGen.idr | "$NAMES_CLEANER" + +rm -rf build diff --git a/tests/derivation/utils/fusion/print/generator/001 one var match/DerivedGen.idr b/tests/derivation/utils/fusion/print/generator/001 one var match/DerivedGen.idr new file mode 100644 index 000000000..eaa8c5901 --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/001 one var match/DerivedGen.idr @@ -0,0 +1,23 @@ +module DerivedGen + +import public Deriving.DepTyCheck.Util.Fusion +import public Deriving.DepTyCheck.Gen.Core + +%default total + +data X : Type -> Type where + MkX : X n + +data Y : Type -> Type where + MkY : Y n + +data Z : Type where + MkZ : (n : Type) -> X n -> Y n -> Z + +%language ElabReflection + +decl : Maybe FusionDecl +decl = %runElab runFusion `{X} [`{n}] `{Y} [`{n}] + +main : IO () +main = putPretty $ getGen decl `{genZ_ultimate} `{genXY} `{MkZ} diff --git a/tests/derivation/utils/fusion/print/generator/001 one var match/derive.ipkg b/tests/derivation/utils/fusion/print/generator/001 one var match/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/001 one var match/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/generator/001 one var match/expected b/tests/derivation/utils/fusion/print/generator/001 one var match/expected new file mode 100644 index 000000000..e57ae900e --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/001 one var match/expected @@ -0,0 +1,58 @@ +1/1: Building DerivedGen (DerivedGen.idr) +[ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "genXY" + , type = + MkArg MW ExplicitArg Nothing (var "Fuel") + .-> var "Gen" + .$ var "MaybeEmpty" + .$ ( var "DPair" + .$ type + .$ ( MkArg MW ExplicitArg (Just "n") type + .=> var "XY" .$ var "n")) + }) +, IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "genZ_ultimate" + , type = + MkArg MW ExplicitArg Nothing (var "Fuel") + .-> var "Gen" .$ var "MaybeEmpty" .$ var "Z" + }) +, IDef + emptyFC + "genZ_ultimate" + [ var "genZ_ultimate" .$ bindVar "fl" + .= var ">>=" + .$ (var "genXY" .$ var "fl") + .$ ( MkArg MW ExplicitArg (Just "{lamc:0}") implicitFalse + .=> iCase + { sc = var "{lamc:0}" + , ty = implicitFalse + , clauses = + [ var "MkDPair" .$ bindVar "n" .$ bindVar "xy" + .= iCase + { sc = var "splitXY" .$ var "xy" + , ty = implicitTrue + , clauses = + [ var "Builtin.MkPair" + .$ bindVar "x" + .$ bindVar "y" + .= var "pure" + .$ ( var "MkZ" + .$ var "n" + .$ var "x" + .$ var "y") + ] + } + ] + }) + ] +] diff --git a/tests/derivation/utils/fusion/print/generator/001 one var match/run b/tests/derivation/utils/fusion/print/generator/001 one var match/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/001 one var match/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/generator/002 two var ordered match/DerivedGen.idr b/tests/derivation/utils/fusion/print/generator/002 two var ordered match/DerivedGen.idr new file mode 100644 index 000000000..e12a9609f --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/002 two var ordered match/DerivedGen.idr @@ -0,0 +1,26 @@ +module DerivedGen + +import public Deriving.DepTyCheck.Util.Fusion +import public Deriving.DepTyCheck.Gen.Core + + +%default total + +data X : Type -> Type -> Type where + MkX : X m n + +data Y : Type -> Type -> Type where + MkY : Y m n + +data Z : Type where + MkZ : (m : Type) -> (n : Type) -> X m n -> Y m n -> Z + +%language ElabReflection + + +decl : Maybe FusionDecl +decl = %runElab runFusion `{X} [`{m}, `{n}] `{Y} [`{m}, `{n}] + +main : IO () +main = putPretty $ getGen decl `{genZ_ultimate} `{genXY} `{MkZ} + diff --git a/tests/derivation/utils/fusion/print/generator/002 two var ordered match/derive.ipkg b/tests/derivation/utils/fusion/print/generator/002 two var ordered match/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/002 two var ordered match/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/generator/002 two var ordered match/expected b/tests/derivation/utils/fusion/print/generator/002 two var ordered match/expected new file mode 100644 index 000000000..8917d2a46 --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/002 two var ordered match/expected @@ -0,0 +1,64 @@ +1/1: Building DerivedGen (DerivedGen.idr) +[ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "genXY" + , type = + MkArg MW ExplicitArg Nothing (var "Fuel") + .-> var "Gen" + .$ var "MaybeEmpty" + .$ ( var "DPair" + .$ type + .$ ( MkArg MW ExplicitArg (Just "m") type + .=> var "DPair" + .$ type + .$ ( MkArg MW ExplicitArg (Just "n") type + .=> var "XY" .$ var "m" .$ var "n"))) + }) +, IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "genZ_ultimate" + , type = + MkArg MW ExplicitArg Nothing (var "Fuel") + .-> var "Gen" .$ var "MaybeEmpty" .$ var "Z" + }) +, IDef + emptyFC + "genZ_ultimate" + [ var "genZ_ultimate" .$ bindVar "fl" + .= var ">>=" + .$ (var "genXY" .$ var "fl") + .$ ( MkArg MW ExplicitArg (Just "{lamc:0}") implicitFalse + .=> iCase + { sc = var "{lamc:0}" + , ty = implicitFalse + , clauses = + [ var "MkDPair" + .$ bindVar "m" + .$ (var "MkDPair" .$ bindVar "n" .$ bindVar "xy") + .= iCase + { sc = var "splitXY" .$ var "xy" + , ty = implicitTrue + , clauses = + [ var "Builtin.MkPair" + .$ bindVar "x" + .$ bindVar "y" + .= var "pure" + .$ ( var "MkZ" + .$ var "m" + .$ var "n" + .$ var "x" + .$ var "y") + ] + } + ] + }) + ] +] diff --git a/tests/derivation/utils/fusion/print/generator/002 two var ordered match/run b/tests/derivation/utils/fusion/print/generator/002 two var ordered match/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/002 two var ordered match/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/generator/003 two var unordered match/DerivedGen.idr b/tests/derivation/utils/fusion/print/generator/003 two var unordered match/DerivedGen.idr new file mode 100644 index 000000000..e747cb703 --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/003 two var unordered match/DerivedGen.idr @@ -0,0 +1,24 @@ +module DerivedGen + +import public Deriving.DepTyCheck.Util.Fusion +import public Deriving.DepTyCheck.Gen.Core + + +%default total + +data X : Type -> Type -> Type where + MkX : X m n + +data Y : Type -> Type -> Type where + MkY : Y m n + +data Z : Type where + MkZ : (m : Type) -> (n : Type) -> X m n -> Y n m -> Z + +%language ElabReflection + +decl : Maybe FusionDecl +decl = %runElab runFusion `{X} [`{m}, `{n}] `{Y} [`{n}, `{m}] + +main : IO () +main = putPretty $ getGen decl `{genZ_ultimate} `{genXY} `{MkZ} diff --git a/tests/derivation/utils/fusion/print/generator/003 two var unordered match/derive.ipkg b/tests/derivation/utils/fusion/print/generator/003 two var unordered match/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/003 two var unordered match/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/generator/003 two var unordered match/expected b/tests/derivation/utils/fusion/print/generator/003 two var unordered match/expected new file mode 100644 index 000000000..8917d2a46 --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/003 two var unordered match/expected @@ -0,0 +1,64 @@ +1/1: Building DerivedGen (DerivedGen.idr) +[ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "genXY" + , type = + MkArg MW ExplicitArg Nothing (var "Fuel") + .-> var "Gen" + .$ var "MaybeEmpty" + .$ ( var "DPair" + .$ type + .$ ( MkArg MW ExplicitArg (Just "m") type + .=> var "DPair" + .$ type + .$ ( MkArg MW ExplicitArg (Just "n") type + .=> var "XY" .$ var "m" .$ var "n"))) + }) +, IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "genZ_ultimate" + , type = + MkArg MW ExplicitArg Nothing (var "Fuel") + .-> var "Gen" .$ var "MaybeEmpty" .$ var "Z" + }) +, IDef + emptyFC + "genZ_ultimate" + [ var "genZ_ultimate" .$ bindVar "fl" + .= var ">>=" + .$ (var "genXY" .$ var "fl") + .$ ( MkArg MW ExplicitArg (Just "{lamc:0}") implicitFalse + .=> iCase + { sc = var "{lamc:0}" + , ty = implicitFalse + , clauses = + [ var "MkDPair" + .$ bindVar "m" + .$ (var "MkDPair" .$ bindVar "n" .$ bindVar "xy") + .= iCase + { sc = var "splitXY" .$ var "xy" + , ty = implicitTrue + , clauses = + [ var "Builtin.MkPair" + .$ bindVar "x" + .$ bindVar "y" + .= var "pure" + .$ ( var "MkZ" + .$ var "m" + .$ var "n" + .$ var "x" + .$ var "y") + ] + } + ] + }) + ] +] diff --git a/tests/derivation/utils/fusion/print/generator/003 two var unordered match/run b/tests/derivation/utils/fusion/print/generator/003 two var unordered match/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/003 two var unordered match/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/generator/004 var-const match/DerivedGen.idr b/tests/derivation/utils/fusion/print/generator/004 var-const match/DerivedGen.idr new file mode 100644 index 000000000..1c6961fab --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/004 var-const match/DerivedGen.idr @@ -0,0 +1,24 @@ +module DerivedGen + +import public Deriving.DepTyCheck.Util.Fusion +import public Deriving.DepTyCheck.Gen.Core + + +%default total + +data X : Nat -> Type where + MkX : X n + +data Y : Nat -> Type where + MkY : Y 1 -- unexpected behaviour for 0 + +data Z : Type where + MkZ : (m : Nat) -> X m -> Y m -> Z + +%language ElabReflection + +decl : Maybe FusionDecl +decl = %runElab runFusion `{X} [`{n}] `{Y} [`{n}] + +main : IO () +main = putPretty $ getGen decl `{genZ_ultimate} `{genXY} `{MkZ} diff --git a/tests/derivation/utils/fusion/print/generator/004 var-const match/derive.ipkg b/tests/derivation/utils/fusion/print/generator/004 var-const match/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/004 var-const match/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/generator/004 var-const match/expected b/tests/derivation/utils/fusion/print/generator/004 var-const match/expected new file mode 100644 index 000000000..69e292ebd --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/004 var-const match/expected @@ -0,0 +1,62 @@ +1/1: Building DerivedGen (DerivedGen.idr) +[ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "genXY" + , type = + MkArg MW ExplicitArg Nothing (var "Fuel") + .-> var "Gen" + .$ var "MaybeEmpty" + .$ ( var "DPair" + .$ var "Prelude.Types.Nat" + .$ ( MkArg + MW + ExplicitArg + (Just "n") + (var "Prelude.Types.Nat") + .=> var "XY" .$ var "n")) + }) +, IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "genZ_ultimate" + , type = + MkArg MW ExplicitArg Nothing (var "Fuel") + .-> var "Gen" .$ var "MaybeEmpty" .$ var "Z" + }) +, IDef + emptyFC + "genZ_ultimate" + [ var "genZ_ultimate" .$ bindVar "fl" + .= var ">>=" + .$ (var "genXY" .$ var "fl") + .$ ( MkArg MW ExplicitArg (Just "{lamc:0}") implicitFalse + .=> iCase + { sc = var "{lamc:0}" + , ty = implicitFalse + , clauses = + [ var "MkDPair" .$ bindVar "n" .$ bindVar "xy" + .= iCase + { sc = var "splitXY" .$ var "xy" + , ty = implicitTrue + , clauses = + [ var "Builtin.MkPair" + .$ bindVar "x" + .$ bindVar "y" + .= var "pure" + .$ ( var "MkZ" + .$ var "n" + .$ var "x" + .$ var "y") + ] + } + ] + }) + ] +] diff --git a/tests/derivation/utils/fusion/print/generator/004 var-const match/run b/tests/derivation/utils/fusion/print/generator/004 var-const match/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/004 var-const match/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/generator/005 const-const match/DerivedGen.idr b/tests/derivation/utils/fusion/print/generator/005 const-const match/DerivedGen.idr new file mode 100644 index 000000000..fb34f78d4 --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/005 const-const match/DerivedGen.idr @@ -0,0 +1,24 @@ +module DerivedGen + +import public Deriving.DepTyCheck.Util.Fusion +import public Deriving.DepTyCheck.Gen.Core + + +%default total + +data X : Nat -> Type where + MkX : X 1 + +data Y : Nat -> Type where + MkY : Y 1 + +data Z : Type where + MkZ : (m : Nat) -> X m -> Y m -> Z + +%language ElabReflection + +decl : Maybe FusionDecl +decl = %runElab runFusion `{X} [`{n}] `{Y} [`{n}] + +main : IO () +main = putPretty $ getGen decl `{genZ_ultimate} `{genXY} `{MkZ} diff --git a/tests/derivation/utils/fusion/print/generator/005 const-const match/derive.ipkg b/tests/derivation/utils/fusion/print/generator/005 const-const match/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/005 const-const match/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/generator/005 const-const match/expected b/tests/derivation/utils/fusion/print/generator/005 const-const match/expected new file mode 100644 index 000000000..69e292ebd --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/005 const-const match/expected @@ -0,0 +1,62 @@ +1/1: Building DerivedGen (DerivedGen.idr) +[ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "genXY" + , type = + MkArg MW ExplicitArg Nothing (var "Fuel") + .-> var "Gen" + .$ var "MaybeEmpty" + .$ ( var "DPair" + .$ var "Prelude.Types.Nat" + .$ ( MkArg + MW + ExplicitArg + (Just "n") + (var "Prelude.Types.Nat") + .=> var "XY" .$ var "n")) + }) +, IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "genZ_ultimate" + , type = + MkArg MW ExplicitArg Nothing (var "Fuel") + .-> var "Gen" .$ var "MaybeEmpty" .$ var "Z" + }) +, IDef + emptyFC + "genZ_ultimate" + [ var "genZ_ultimate" .$ bindVar "fl" + .= var ">>=" + .$ (var "genXY" .$ var "fl") + .$ ( MkArg MW ExplicitArg (Just "{lamc:0}") implicitFalse + .=> iCase + { sc = var "{lamc:0}" + , ty = implicitFalse + , clauses = + [ var "MkDPair" .$ bindVar "n" .$ bindVar "xy" + .= iCase + { sc = var "splitXY" .$ var "xy" + , ty = implicitTrue + , clauses = + [ var "Builtin.MkPair" + .$ bindVar "x" + .$ bindVar "y" + .= var "pure" + .$ ( var "MkZ" + .$ var "n" + .$ var "x" + .$ var "y") + ] + } + ] + }) + ] +] diff --git a/tests/derivation/utils/fusion/print/generator/005 const-const match/run b/tests/derivation/utils/fusion/print/generator/005 const-const match/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/005 const-const match/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/generator/006 const-const no match/DerivedGen.idr b/tests/derivation/utils/fusion/print/generator/006 const-const no match/DerivedGen.idr new file mode 100644 index 000000000..184281f48 --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/006 const-const no match/DerivedGen.idr @@ -0,0 +1,24 @@ +module DerivedGen + +import public Deriving.DepTyCheck.Util.Fusion +import public Deriving.DepTyCheck.Gen.Core + + +%default total + +data X : Nat -> Type where + MkX : X 1 + +data Y : Nat -> Type where + MkY : Y 2 + +data Z : Type where + MkZ : (m : Nat) -> X m -> Y m -> Z + +%language ElabReflection + +decl : Maybe FusionDecl +decl = %runElab runFusion `{X} [`{n}] `{Y} [`{n}] + +main : IO () +main = putPretty $ getGen decl `{genZ_ultimate} `{genXY} `{MkZ} diff --git a/tests/derivation/utils/fusion/print/generator/006 const-const no match/derive.ipkg b/tests/derivation/utils/fusion/print/generator/006 const-const no match/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/006 const-const no match/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/generator/006 const-const no match/expected b/tests/derivation/utils/fusion/print/generator/006 const-const no match/expected new file mode 100644 index 000000000..69e292ebd --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/006 const-const no match/expected @@ -0,0 +1,62 @@ +1/1: Building DerivedGen (DerivedGen.idr) +[ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "genXY" + , type = + MkArg MW ExplicitArg Nothing (var "Fuel") + .-> var "Gen" + .$ var "MaybeEmpty" + .$ ( var "DPair" + .$ var "Prelude.Types.Nat" + .$ ( MkArg + MW + ExplicitArg + (Just "n") + (var "Prelude.Types.Nat") + .=> var "XY" .$ var "n")) + }) +, IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "genZ_ultimate" + , type = + MkArg MW ExplicitArg Nothing (var "Fuel") + .-> var "Gen" .$ var "MaybeEmpty" .$ var "Z" + }) +, IDef + emptyFC + "genZ_ultimate" + [ var "genZ_ultimate" .$ bindVar "fl" + .= var ">>=" + .$ (var "genXY" .$ var "fl") + .$ ( MkArg MW ExplicitArg (Just "{lamc:0}") implicitFalse + .=> iCase + { sc = var "{lamc:0}" + , ty = implicitFalse + , clauses = + [ var "MkDPair" .$ bindVar "n" .$ bindVar "xy" + .= iCase + { sc = var "splitXY" .$ var "xy" + , ty = implicitTrue + , clauses = + [ var "Builtin.MkPair" + .$ bindVar "x" + .$ bindVar "y" + .= var "pure" + .$ ( var "MkZ" + .$ var "n" + .$ var "x" + .$ var "y") + ] + } + ] + }) + ] +] diff --git a/tests/derivation/utils/fusion/print/generator/006 const-const no match/run b/tests/derivation/utils/fusion/print/generator/006 const-const no match/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/006 const-const no match/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/generator/007 prim-prim match/DerivedGen.idr b/tests/derivation/utils/fusion/print/generator/007 prim-prim match/DerivedGen.idr new file mode 100644 index 000000000..d6c574f03 --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/007 prim-prim match/DerivedGen.idr @@ -0,0 +1,24 @@ +module DerivedGen + +import public Deriving.DepTyCheck.Util.Fusion +import public Deriving.DepTyCheck.Gen.Core + + +%default total + +data X : String -> Type where + MkX : X "0" + +data Y : String -> Type where + MkY : Y "0" + +data Z : Type where + MkZ : (m : String) -> X m -> Y m -> Z + +%language ElabReflection + +decl : Maybe FusionDecl +decl = %runElab runFusion `{X} [`{n}] `{Y} [`{n}] + +main : IO () +main = putPretty $ getGen decl `{genZ_ultimate} `{genXY} `{MkZ} diff --git a/tests/derivation/utils/fusion/print/generator/007 prim-prim match/derive.ipkg b/tests/derivation/utils/fusion/print/generator/007 prim-prim match/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/007 prim-prim match/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/generator/007 prim-prim match/expected b/tests/derivation/utils/fusion/print/generator/007 prim-prim match/expected new file mode 100644 index 000000000..ba604ed24 --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/007 prim-prim match/expected @@ -0,0 +1,62 @@ +1/1: Building DerivedGen (DerivedGen.idr) +[ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "genXY" + , type = + MkArg MW ExplicitArg Nothing (var "Fuel") + .-> var "Gen" + .$ var "MaybeEmpty" + .$ ( var "DPair" + .$ primVal (PrT StringType) + .$ ( MkArg + MW + ExplicitArg + (Just "n") + (primVal (PrT StringType)) + .=> var "XY" .$ var "n")) + }) +, IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "genZ_ultimate" + , type = + MkArg MW ExplicitArg Nothing (var "Fuel") + .-> var "Gen" .$ var "MaybeEmpty" .$ var "Z" + }) +, IDef + emptyFC + "genZ_ultimate" + [ var "genZ_ultimate" .$ bindVar "fl" + .= var ">>=" + .$ (var "genXY" .$ var "fl") + .$ ( MkArg MW ExplicitArg (Just "{lamc:0}") implicitFalse + .=> iCase + { sc = var "{lamc:0}" + , ty = implicitFalse + , clauses = + [ var "MkDPair" .$ bindVar "n" .$ bindVar "xy" + .= iCase + { sc = var "splitXY" .$ var "xy" + , ty = implicitTrue + , clauses = + [ var "Builtin.MkPair" + .$ bindVar "x" + .$ bindVar "y" + .= var "pure" + .$ ( var "MkZ" + .$ var "n" + .$ var "x" + .$ var "y") + ] + } + ] + }) + ] +] diff --git a/tests/derivation/utils/fusion/print/generator/007 prim-prim match/run b/tests/derivation/utils/fusion/print/generator/007 prim-prim match/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/007 prim-prim match/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/generator/008 non-shared var/DerivedGen.idr b/tests/derivation/utils/fusion/print/generator/008 non-shared var/DerivedGen.idr new file mode 100644 index 000000000..cc3bac84d --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/008 non-shared var/DerivedGen.idr @@ -0,0 +1,24 @@ +module DerivedGen + +import public Deriving.DepTyCheck.Util.Fusion +import public Deriving.DepTyCheck.Gen.Core + + +%default total + +data X : Type -> Type -> Type where + MkX : X m n + +data Y : Type -> Type -> Type where + MkY : Y m n + +data Z : Type where + MkZ : (k : Type) -> (m : Type) -> (n : Type) -> X k m -> Y m n -> Z + +%language ElabReflection + +decl : Maybe FusionDecl +decl = %runElab runFusion `{X} [`{k}, `{m}] `{Y} [`{m}, `{n}] + +main : IO () +main = putPretty $ getGen decl `{genZ_ultimate} `{genXY} `{MkZ} diff --git a/tests/derivation/utils/fusion/print/generator/008 non-shared var/derive.ipkg b/tests/derivation/utils/fusion/print/generator/008 non-shared var/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/008 non-shared var/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/generator/008 non-shared var/expected b/tests/derivation/utils/fusion/print/generator/008 non-shared var/expected new file mode 100644 index 000000000..dae530cab --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/008 non-shared var/expected @@ -0,0 +1,79 @@ +1/1: Building DerivedGen (DerivedGen.idr) +[ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "genXY" + , type = + MkArg MW ExplicitArg Nothing (var "Fuel") + .-> var "Gen" + .$ var "MaybeEmpty" + .$ ( var "DPair" + .$ type + .$ ( MkArg MW ExplicitArg (Just "k") type + .=> var "DPair" + .$ type + .$ ( MkArg MW ExplicitArg (Just "m") type + .=> var "DPair" + .$ type + .$ ( MkArg + MW + ExplicitArg + (Just "n") + type + .=> var "XY" + .$ var "k" + .$ var "m" + .$ var "n")))) + }) +, IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "genZ_ultimate" + , type = + MkArg MW ExplicitArg Nothing (var "Fuel") + .-> var "Gen" .$ var "MaybeEmpty" .$ var "Z" + }) +, IDef + emptyFC + "genZ_ultimate" + [ var "genZ_ultimate" .$ bindVar "fl" + .= var ">>=" + .$ (var "genXY" .$ var "fl") + .$ ( MkArg MW ExplicitArg (Just "{lamc:0}") implicitFalse + .=> iCase + { sc = var "{lamc:0}" + , ty = implicitFalse + , clauses = + [ var "MkDPair" + .$ bindVar "k" + .$ ( var "MkDPair" + .$ bindVar "m" + .$ ( var "MkDPair" + .$ bindVar "n" + .$ bindVar "xy")) + .= iCase + { sc = var "splitXY" .$ var "xy" + , ty = implicitTrue + , clauses = + [ var "Builtin.MkPair" + .$ bindVar "x" + .$ bindVar "y" + .= var "pure" + .$ ( var "MkZ" + .$ var "k" + .$ var "m" + .$ var "n" + .$ var "x" + .$ var "y") + ] + } + ] + }) + ] +] diff --git a/tests/derivation/utils/fusion/print/generator/008 non-shared var/run b/tests/derivation/utils/fusion/print/generator/008 non-shared var/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/008 non-shared var/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/generator/009 three types fusion/DerivedGen.idr b/tests/derivation/utils/fusion/print/generator/009 three types fusion/DerivedGen.idr new file mode 100644 index 000000000..ebc0f227d --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/009 three types fusion/DerivedGen.idr @@ -0,0 +1,27 @@ +module DerivedGen + +import public Deriving.DepTyCheck.Util.Fusion +import public Deriving.DepTyCheck.Gen.Core + +%default total + +data X : Type -> Type where + MkX : X n + +data Y : Type -> Type where + MkY : Y n + +data W : Type -> Type where + MkW : W n + + +data Z : Type where + MkZ : (m : Type) -> X m -> Y m -> W m -> Z + +%language ElabReflection + +decl : Maybe FusionDecl +decl = %runElab runFusionList [(`{X}, [`{n}]), (`{Y}, [`{n}]), (`{W}, [`{n}])] + +main : IO () +main = putPretty $ getGen decl `{genZ_ultimate} `{genXYW} `{MkZ} diff --git a/tests/derivation/utils/fusion/print/generator/009 three types fusion/derive.ipkg b/tests/derivation/utils/fusion/print/generator/009 three types fusion/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/009 three types fusion/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/generator/009 three types fusion/expected b/tests/derivation/utils/fusion/print/generator/009 three types fusion/expected new file mode 100644 index 000000000..418a75ae0 --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/009 three types fusion/expected @@ -0,0 +1,61 @@ +1/1: Building DerivedGen (DerivedGen.idr) +[ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "genXYW" + , type = + MkArg MW ExplicitArg Nothing (var "Fuel") + .-> var "Gen" + .$ var "MaybeEmpty" + .$ ( var "DPair" + .$ type + .$ ( MkArg MW ExplicitArg (Just "n") type + .=> var "XYW" .$ var "n")) + }) +, IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "genZ_ultimate" + , type = + MkArg MW ExplicitArg Nothing (var "Fuel") + .-> var "Gen" .$ var "MaybeEmpty" .$ var "Z" + }) +, IDef + emptyFC + "genZ_ultimate" + [ var "genZ_ultimate" .$ bindVar "fl" + .= var ">>=" + .$ (var "genXYW" .$ var "fl") + .$ ( MkArg MW ExplicitArg (Just "{lamc:0}") implicitFalse + .=> iCase + { sc = var "{lamc:0}" + , ty = implicitFalse + , clauses = + [ var "MkDPair" .$ bindVar "n" .$ bindVar "xyw" + .= iCase + { sc = var "splitXYW" .$ var "xyw" + , ty = implicitTrue + , clauses = + [ var "Builtin.MkPair" + .$ bindVar "x" + .$ ( var "Builtin.MkPair" + .$ bindVar "y" + .$ bindVar "w") + .= var "pure" + .$ ( var "MkZ" + .$ var "n" + .$ var "x" + .$ var "y" + .$ var "w") + ] + } + ] + }) + ] +] diff --git a/tests/derivation/utils/fusion/print/generator/009 three types fusion/run b/tests/derivation/utils/fusion/print/generator/009 three types fusion/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/009 three types fusion/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/generator/010 three types two args/DerivedGen.idr b/tests/derivation/utils/fusion/print/generator/010 three types two args/DerivedGen.idr new file mode 100644 index 000000000..971416408 --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/010 three types two args/DerivedGen.idr @@ -0,0 +1,26 @@ +module DerivedGen + +import public Deriving.DepTyCheck.Util.Fusion +import public Deriving.DepTyCheck.Gen.Core + +%default total + +data X : Type -> Type -> Type where + MkX : X n m + +data Y : Type -> Type -> Type where + MkY : Y n m + +data W : Type -> Type -> Type where + MkW : W n m + +data Z : Type where + MkZ : (k : Type) -> (m : Type) -> (n : Type) -> X k m -> Y m n -> W n k -> Z + +%language ElabReflection + +decl : Maybe FusionDecl +decl = %runElab runFusionList [(`{X}, [`{k}, `{m}]), (`{Y}, [`{m}, `{n}]), (`{W}, [`{n}, `{k}])] + +main : IO () +main = putPretty $ getGen decl `{genZ_ultimate} `{genXYW} `{MkZ} diff --git a/tests/derivation/utils/fusion/print/generator/010 three types two args/derive.ipkg b/tests/derivation/utils/fusion/print/generator/010 three types two args/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/010 three types two args/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/generator/010 three types two args/expected b/tests/derivation/utils/fusion/print/generator/010 three types two args/expected new file mode 100644 index 000000000..5da629478 --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/010 three types two args/expected @@ -0,0 +1,82 @@ +1/1: Building DerivedGen (DerivedGen.idr) +[ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "genXYW" + , type = + MkArg MW ExplicitArg Nothing (var "Fuel") + .-> var "Gen" + .$ var "MaybeEmpty" + .$ ( var "DPair" + .$ type + .$ ( MkArg MW ExplicitArg (Just "k") type + .=> var "DPair" + .$ type + .$ ( MkArg MW ExplicitArg (Just "m") type + .=> var "DPair" + .$ type + .$ ( MkArg + MW + ExplicitArg + (Just "n") + type + .=> var "XYW" + .$ var "k" + .$ var "m" + .$ var "n")))) + }) +, IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "genZ_ultimate" + , type = + MkArg MW ExplicitArg Nothing (var "Fuel") + .-> var "Gen" .$ var "MaybeEmpty" .$ var "Z" + }) +, IDef + emptyFC + "genZ_ultimate" + [ var "genZ_ultimate" .$ bindVar "fl" + .= var ">>=" + .$ (var "genXYW" .$ var "fl") + .$ ( MkArg MW ExplicitArg (Just "{lamc:0}") implicitFalse + .=> iCase + { sc = var "{lamc:0}" + , ty = implicitFalse + , clauses = + [ var "MkDPair" + .$ bindVar "k" + .$ ( var "MkDPair" + .$ bindVar "m" + .$ ( var "MkDPair" + .$ bindVar "n" + .$ bindVar "xyw")) + .= iCase + { sc = var "splitXYW" .$ var "xyw" + , ty = implicitTrue + , clauses = + [ var "Builtin.MkPair" + .$ bindVar "x" + .$ ( var "Builtin.MkPair" + .$ bindVar "y" + .$ bindVar "w") + .= var "pure" + .$ ( var "MkZ" + .$ var "k" + .$ var "m" + .$ var "n" + .$ var "x" + .$ var "y" + .$ var "w") + ] + } + ] + }) + ] +] diff --git a/tests/derivation/utils/fusion/print/generator/010 three types two args/run b/tests/derivation/utils/fusion/print/generator/010 three types two args/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/010 three types two args/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/generator/011 simple gen signature/DerivedGen.idr b/tests/derivation/utils/fusion/print/generator/011 simple gen signature/DerivedGen.idr new file mode 100644 index 000000000..16ee2b97f --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/011 simple gen signature/DerivedGen.idr @@ -0,0 +1,31 @@ +module DerivedGen + +import public Deriving.DepTyCheck.Util.Fusion +import public Deriving.DepTyCheck.Gen.Core + +%default total + +data X : Type -> Type where + MkX : X n + +data Y : Type -> Type where + MkY : Y n + +data Z : Type where + MkZ : (n : Type) -> X n -> Y n -> Z + +%language ElabReflection + +decl : Maybe FusionDecl +decl = %runElab runFusion `{X} [`{n}] `{Y} [`{n}] + +declared : () +declared = %runElab declare $ getFusion decl + +sign : Maybe GenSignature +sign = %runElab createGenSignature `{XY} + +main : IO () +main = case sign of + Nothing => printLn "no signature generated" + Just x => printLn "signature generated" diff --git a/tests/derivation/utils/fusion/print/generator/011 simple gen signature/derive.ipkg b/tests/derivation/utils/fusion/print/generator/011 simple gen signature/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/011 simple gen signature/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/generator/011 simple gen signature/expected b/tests/derivation/utils/fusion/print/generator/011 simple gen signature/expected new file mode 100644 index 000000000..a7dbe393a --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/011 simple gen signature/expected @@ -0,0 +1,2 @@ +1/1: Building DerivedGen (DerivedGen.idr) +"signature generated" diff --git a/tests/derivation/utils/fusion/print/generator/011 simple gen signature/run b/tests/derivation/utils/fusion/print/generator/011 simple gen signature/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/011 simple gen signature/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/generator/_common/derive.ipkg b/tests/derivation/utils/fusion/print/generator/_common/derive.ipkg new file mode 100644 index 000000000..762febf26 --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/_common/derive.ipkg @@ -0,0 +1,7 @@ +package derive-test + +authors = "Simon Tsirikov" + +opts = "--no-color --console-width 0" + +depends = deptycheck diff --git a/tests/derivation/utils/fusion/print/generator/_common/run b/tests/derivation/utils/fusion/print/generator/_common/run new file mode 100644 index 000000000..2a6b6401c --- /dev/null +++ b/tests/derivation/utils/fusion/print/generator/_common/run @@ -0,0 +1,9 @@ +rm -rf build + +NAMES_CLEANER="$(dirname "$(dirname "$(realpath "$1")")")"/.clean-names + +flock "$1" pack -q install-deps derive.ipkg && \ +idris2 --check --no-color --console-width 0 --no-banner --find-ipkg DerivedGen.idr && \ +pack exec DerivedGen.idr | "$NAMES_CLEANER" + +rm -rf build diff --git a/tests/derivation/utils/fusion/print/merger/001 one var match/DerivedGen.idr b/tests/derivation/utils/fusion/print/merger/001 one var match/DerivedGen.idr new file mode 100644 index 000000000..19629eca9 --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/001 one var match/DerivedGen.idr @@ -0,0 +1,20 @@ +module DerivedGen + +import public Deriving.DepTyCheck.Util.Fusion +import public Deriving.DepTyCheck.Gen.Core + +%default total + +data X : Type -> Type where + MkX : X n + +data Y : Type -> Type where + MkY : Y n + +%language ElabReflection + +decl : Maybe FusionDecl +decl = %runElab runFusion `{X} [`{n}] `{Y} [`{n}] + +main : IO () +main = putPretty $ getFusion decl diff --git a/tests/derivation/utils/fusion/print/merger/001 one var match/derive.ipkg b/tests/derivation/utils/fusion/print/merger/001 one var match/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/001 one var match/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/merger/001 one var match/expected b/tests/derivation/utils/fusion/print/merger/001 one var match/expected new file mode 100644 index 000000000..8a8f43860 --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/001 one var match/expected @@ -0,0 +1,12 @@ +1/1: Building DerivedGen (DerivedGen.idr) +[ IData + emptyFC + (specified Export) + Nothing + (MkData + emptyFC + "XY" + (Just (MkArg MW ExplicitArg (Just "n") type .-> type)) + [] + [mkTy {name = "MkX_MkY", type = var "XY" .$ bindVar "n"}]) +] diff --git a/tests/derivation/utils/fusion/print/merger/001 one var match/run b/tests/derivation/utils/fusion/print/merger/001 one var match/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/001 one var match/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/merger/002 two var ordered match/DerivedGen.idr b/tests/derivation/utils/fusion/print/merger/002 two var ordered match/DerivedGen.idr new file mode 100644 index 000000000..240c465bf --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/002 two var ordered match/DerivedGen.idr @@ -0,0 +1,23 @@ +module DerivedGen + +import public Deriving.DepTyCheck.Util.Fusion +import public Deriving.DepTyCheck.Gen.Core + + +%default total + +data X : Type -> Type -> Type where + MkX : X m n + +data Y : Type -> Type -> Type where + MkY : Y m n + +%language ElabReflection + + +decl : Maybe FusionDecl +decl = %runElab runFusion `{X} [`{m}, `{n}] `{Y} [`{m}, `{n}] + +main : IO () +main = putPretty $ getFusion decl + diff --git a/tests/derivation/utils/fusion/print/merger/002 two var ordered match/derive.ipkg b/tests/derivation/utils/fusion/print/merger/002 two var ordered match/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/002 two var ordered match/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/merger/002 two var ordered match/expected b/tests/derivation/utils/fusion/print/merger/002 two var ordered match/expected new file mode 100644 index 000000000..2f1021e2c --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/002 two var ordered match/expected @@ -0,0 +1,15 @@ +1/1: Building DerivedGen (DerivedGen.idr) +[ IData + emptyFC + (specified Export) + Nothing + (MkData + emptyFC + "XY" + (Just + ( MkArg MW ExplicitArg (Just "m") type + .-> MkArg MW ExplicitArg (Just "n") type + .-> type)) + [] + [mkTy {name = "MkX_MkY", type = var "XY" .$ bindVar "m" .$ bindVar "n"}]) +] diff --git a/tests/derivation/utils/fusion/print/merger/002 two var ordered match/run b/tests/derivation/utils/fusion/print/merger/002 two var ordered match/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/002 two var ordered match/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/merger/003 two var unordered match/DerivedGen.idr b/tests/derivation/utils/fusion/print/merger/003 two var unordered match/DerivedGen.idr new file mode 100644 index 000000000..ee535357b --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/003 two var unordered match/DerivedGen.idr @@ -0,0 +1,21 @@ +module DerivedGen + +import public Deriving.DepTyCheck.Util.Fusion +import public Deriving.DepTyCheck.Gen.Core + + +%default total + +data X : Type -> Type -> Type where + MkX : X m n + +data Y : Type -> Type -> Type where + MkY : Y m n + +%language ElabReflection + +decl : Maybe FusionDecl +decl = %runElab runFusion `{X} [`{m}, `{n}] `{Y} [`{n}, `{m}] + +main : IO () +main = putPretty $ getFusion decl diff --git a/tests/derivation/utils/fusion/print/merger/003 two var unordered match/derive.ipkg b/tests/derivation/utils/fusion/print/merger/003 two var unordered match/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/003 two var unordered match/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/merger/003 two var unordered match/expected b/tests/derivation/utils/fusion/print/merger/003 two var unordered match/expected new file mode 100644 index 000000000..2f1021e2c --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/003 two var unordered match/expected @@ -0,0 +1,15 @@ +1/1: Building DerivedGen (DerivedGen.idr) +[ IData + emptyFC + (specified Export) + Nothing + (MkData + emptyFC + "XY" + (Just + ( MkArg MW ExplicitArg (Just "m") type + .-> MkArg MW ExplicitArg (Just "n") type + .-> type)) + [] + [mkTy {name = "MkX_MkY", type = var "XY" .$ bindVar "m" .$ bindVar "n"}]) +] diff --git a/tests/derivation/utils/fusion/print/merger/003 two var unordered match/run b/tests/derivation/utils/fusion/print/merger/003 two var unordered match/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/003 two var unordered match/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/merger/004 var-const match/DerivedGen.idr b/tests/derivation/utils/fusion/print/merger/004 var-const match/DerivedGen.idr new file mode 100644 index 000000000..80c200ef4 --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/004 var-const match/DerivedGen.idr @@ -0,0 +1,21 @@ +module DerivedGen + +import public Deriving.DepTyCheck.Util.Fusion +import public Deriving.DepTyCheck.Gen.Core + + +%default total + +data X : Nat -> Type where + MkX : X n + +data Y : Nat -> Type where + MkY : Y 1 -- unexpected behaviour for 0 + +%language ElabReflection + +decl : Maybe FusionDecl +decl = %runElab runFusion `{X} [`{n}] `{Y} [`{n}] + +main : IO () +main = putPretty $ getFusion decl diff --git a/tests/derivation/utils/fusion/print/merger/004 var-const match/derive.ipkg b/tests/derivation/utils/fusion/print/merger/004 var-const match/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/004 var-const match/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/merger/004 var-const match/expected b/tests/derivation/utils/fusion/print/merger/004 var-const match/expected new file mode 100644 index 000000000..1728ff26b --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/004 var-const match/expected @@ -0,0 +1,18 @@ +1/1: Building DerivedGen (DerivedGen.idr) +[ IData + emptyFC + (specified Export) + Nothing + (MkData + emptyFC + "XY" + (Just + (MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") .-> type)) + [] + [ mkTy + { name = "MkX_MkY" + , type = + var "XY" .$ (var "Prelude.Types.S" .$ var "Prelude.Types.Z") + } + ]) +] diff --git a/tests/derivation/utils/fusion/print/merger/004 var-const match/run b/tests/derivation/utils/fusion/print/merger/004 var-const match/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/004 var-const match/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/merger/005 const-const match/DerivedGen.idr b/tests/derivation/utils/fusion/print/merger/005 const-const match/DerivedGen.idr new file mode 100644 index 000000000..b3de39f07 --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/005 const-const match/DerivedGen.idr @@ -0,0 +1,21 @@ +module DerivedGen + +import public Deriving.DepTyCheck.Util.Fusion +import public Deriving.DepTyCheck.Gen.Core + + +%default total + +data X : Nat -> Type where + MkX : X 1 + +data Y : Nat -> Type where + MkY : Y 1 + +%language ElabReflection + +decl : Maybe FusionDecl +decl = %runElab runFusion `{X} [`{n}] `{Y} [`{n}] + +main : IO () +main = putPretty $ getFusion decl diff --git a/tests/derivation/utils/fusion/print/merger/005 const-const match/derive.ipkg b/tests/derivation/utils/fusion/print/merger/005 const-const match/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/005 const-const match/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/merger/005 const-const match/expected b/tests/derivation/utils/fusion/print/merger/005 const-const match/expected new file mode 100644 index 000000000..1728ff26b --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/005 const-const match/expected @@ -0,0 +1,18 @@ +1/1: Building DerivedGen (DerivedGen.idr) +[ IData + emptyFC + (specified Export) + Nothing + (MkData + emptyFC + "XY" + (Just + (MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") .-> type)) + [] + [ mkTy + { name = "MkX_MkY" + , type = + var "XY" .$ (var "Prelude.Types.S" .$ var "Prelude.Types.Z") + } + ]) +] diff --git a/tests/derivation/utils/fusion/print/merger/005 const-const match/run b/tests/derivation/utils/fusion/print/merger/005 const-const match/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/005 const-const match/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/merger/006 const-const no match/DerivedGen.idr b/tests/derivation/utils/fusion/print/merger/006 const-const no match/DerivedGen.idr new file mode 100644 index 000000000..40888bd38 --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/006 const-const no match/DerivedGen.idr @@ -0,0 +1,21 @@ +module DerivedGen + +import public Deriving.DepTyCheck.Util.Fusion +import public Deriving.DepTyCheck.Gen.Core + + +%default total + +data X : Nat -> Type where + MkX : X 1 + +data Y : Nat -> Type where + MkY : Y 2 + +%language ElabReflection + +decl : Maybe FusionDecl +decl = %runElab runFusion `{X} [`{n}] `{Y} [`{n}] + +main : IO () +main = putPretty $ getFusion decl diff --git a/tests/derivation/utils/fusion/print/merger/006 const-const no match/derive.ipkg b/tests/derivation/utils/fusion/print/merger/006 const-const no match/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/006 const-const no match/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/merger/006 const-const no match/expected b/tests/derivation/utils/fusion/print/merger/006 const-const no match/expected new file mode 100644 index 000000000..04bb36376 --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/006 const-const no match/expected @@ -0,0 +1,13 @@ +1/1: Building DerivedGen (DerivedGen.idr) +[ IData + emptyFC + (specified Export) + Nothing + (MkData + emptyFC + "XY" + (Just + (MkArg MW ExplicitArg (Just "n") (var "Prelude.Types.Nat") .-> type)) + [] + []) +] diff --git a/tests/derivation/utils/fusion/print/merger/006 const-const no match/run b/tests/derivation/utils/fusion/print/merger/006 const-const no match/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/006 const-const no match/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/merger/007 prim-prim match/DerivedGen.idr b/tests/derivation/utils/fusion/print/merger/007 prim-prim match/DerivedGen.idr new file mode 100644 index 000000000..a8905c0e5 --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/007 prim-prim match/DerivedGen.idr @@ -0,0 +1,21 @@ +module DerivedGen + +import public Deriving.DepTyCheck.Util.Fusion +import public Deriving.DepTyCheck.Gen.Core + + +%default total + +data X : String -> Type where + MkX : X "0" + +data Y : String -> Type where + MkY : Y "0" + +%language ElabReflection + +decl : Maybe FusionDecl +decl = %runElab runFusion `{X} [`{n}] `{Y} [`{n}] + +main : IO () +main = putPretty $ getFusion decl diff --git a/tests/derivation/utils/fusion/print/merger/007 prim-prim match/derive.ipkg b/tests/derivation/utils/fusion/print/merger/007 prim-prim match/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/007 prim-prim match/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/merger/007 prim-prim match/expected b/tests/derivation/utils/fusion/print/merger/007 prim-prim match/expected new file mode 100644 index 000000000..4b434edf9 --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/007 prim-prim match/expected @@ -0,0 +1,14 @@ +1/1: Building DerivedGen (DerivedGen.idr) +[ IData + emptyFC + (specified Export) + Nothing + (MkData + emptyFC + "XY" + (Just + ( MkArg MW ExplicitArg (Just "n") (primVal (PrT StringType)) + .-> type)) + [] + [mkTy {name = "MkX_MkY", type = var "XY" .$ primVal (Str "0")}]) +] diff --git a/tests/derivation/utils/fusion/print/merger/007 prim-prim match/run b/tests/derivation/utils/fusion/print/merger/007 prim-prim match/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/007 prim-prim match/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/merger/008 non-shared var/DerivedGen.idr b/tests/derivation/utils/fusion/print/merger/008 non-shared var/DerivedGen.idr new file mode 100644 index 000000000..7d7cab4d9 --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/008 non-shared var/DerivedGen.idr @@ -0,0 +1,21 @@ +module DerivedGen + +import public Deriving.DepTyCheck.Util.Fusion +import public Deriving.DepTyCheck.Gen.Core + + +%default total + +data X : Type -> Type -> Type where + MkX : X m n + +data Y : Type -> Type -> Type where + MkY : Y m n + +%language ElabReflection + +decl : Maybe FusionDecl +decl = %runElab runFusion `{X} [`{m}, `{n}] `{Y} [`{n}, `{k}] + +main : IO () +main = putPretty $ getFusion decl diff --git a/tests/derivation/utils/fusion/print/merger/008 non-shared var/derive.ipkg b/tests/derivation/utils/fusion/print/merger/008 non-shared var/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/008 non-shared var/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/merger/008 non-shared var/expected b/tests/derivation/utils/fusion/print/merger/008 non-shared var/expected new file mode 100644 index 000000000..399ab9d89 --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/008 non-shared var/expected @@ -0,0 +1,20 @@ +1/1: Building DerivedGen (DerivedGen.idr) +[ IData + emptyFC + (specified Export) + Nothing + (MkData + emptyFC + "XY" + (Just + ( MkArg MW ExplicitArg (Just "m") type + .-> MkArg MW ExplicitArg (Just "n") type + .-> MkArg MW ExplicitArg (Just "k") type + .-> type)) + [] + [ mkTy + { name = "MkX_MkY" + , type = var "XY" .$ bindVar "m" .$ bindVar "n" .$ bindVar "k" + } + ]) +] diff --git a/tests/derivation/utils/fusion/print/merger/008 non-shared var/run b/tests/derivation/utils/fusion/print/merger/008 non-shared var/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/008 non-shared var/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/merger/009 three types fusion/DerivedGen.idr b/tests/derivation/utils/fusion/print/merger/009 three types fusion/DerivedGen.idr new file mode 100644 index 000000000..8516bdf52 --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/009 three types fusion/DerivedGen.idr @@ -0,0 +1,23 @@ +module DerivedGen + +import public Deriving.DepTyCheck.Util.Fusion +import public Deriving.DepTyCheck.Gen.Core + +%default total + +data X : Type -> Type where + MkX : X n + +data Y : Type -> Type where + MkY : Y n + +data Z : Type -> Type where + MkZ : Z n + +%language ElabReflection + +decl : Maybe FusionDecl +decl = %runElab runFusionList [(`{X}, [`{n}]), (`{Y}, [`{n}]), (`{Z}, [`{n}])] + +main : IO () +main = putPretty $ getFusion decl diff --git a/tests/derivation/utils/fusion/print/merger/009 three types fusion/derive.ipkg b/tests/derivation/utils/fusion/print/merger/009 three types fusion/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/009 three types fusion/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/merger/009 three types fusion/expected b/tests/derivation/utils/fusion/print/merger/009 three types fusion/expected new file mode 100644 index 000000000..3201cc8a3 --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/009 three types fusion/expected @@ -0,0 +1,12 @@ +1/1: Building DerivedGen (DerivedGen.idr) +[ IData + emptyFC + (specified Export) + Nothing + (MkData + emptyFC + "XYZ" + (Just (MkArg MW ExplicitArg (Just "n") type .-> type)) + [] + [mkTy {name = "MkX_MkY_MkZ", type = var "XYZ" .$ bindVar "n"}]) +] diff --git a/tests/derivation/utils/fusion/print/merger/009 three types fusion/run b/tests/derivation/utils/fusion/print/merger/009 three types fusion/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/009 three types fusion/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/merger/010 three types two args/DerivedGen.idr b/tests/derivation/utils/fusion/print/merger/010 three types two args/DerivedGen.idr new file mode 100644 index 000000000..0291869d5 --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/010 three types two args/DerivedGen.idr @@ -0,0 +1,23 @@ +module DerivedGen + +import public Deriving.DepTyCheck.Util.Fusion +import public Deriving.DepTyCheck.Gen.Core + +%default total + +data X : Type -> Type -> Type where + MkX : X n m + +data Y : Type -> Type -> Type where + MkY : Y n m + +data Z : Type -> Type -> Type where + MkZ : Z n m + +%language ElabReflection + +decl : Maybe FusionDecl +decl = %runElab runFusionList [(`{X}, [`{n}, `{m}]), (`{Y}, [`{m}, `{k}]), (`{Z}, [`{k}, `{n}])] + +main : IO () +main = putPretty $ getFusion decl diff --git a/tests/derivation/utils/fusion/print/merger/010 three types two args/derive.ipkg b/tests/derivation/utils/fusion/print/merger/010 three types two args/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/010 three types two args/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/merger/010 three types two args/expected b/tests/derivation/utils/fusion/print/merger/010 three types two args/expected new file mode 100644 index 000000000..86eaaba54 --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/010 three types two args/expected @@ -0,0 +1,16 @@ +1/1: Building DerivedGen (DerivedGen.idr) +[ IData + emptyFC + (specified Export) + Nothing + (MkData + emptyFC + "XYZ" + (Just + ( MkArg MW ExplicitArg (Just "n") type + .-> MkArg MW ExplicitArg (Just "m") type + .-> MkArg MW ExplicitArg (Just "k") type + .-> type)) + [] + [mkTy {name = "MkX_MkY_MkZ", type = var "XYZ" .$ bindVar "k"}]) +] diff --git a/tests/derivation/utils/fusion/print/merger/010 three types two args/run b/tests/derivation/utils/fusion/print/merger/010 three types two args/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/010 three types two args/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/merger/_common/derive.ipkg b/tests/derivation/utils/fusion/print/merger/_common/derive.ipkg new file mode 100644 index 000000000..762febf26 --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/_common/derive.ipkg @@ -0,0 +1,7 @@ +package derive-test + +authors = "Simon Tsirikov" + +opts = "--no-color --console-width 0" + +depends = deptycheck diff --git a/tests/derivation/utils/fusion/print/merger/_common/run b/tests/derivation/utils/fusion/print/merger/_common/run new file mode 100644 index 000000000..2a6b6401c --- /dev/null +++ b/tests/derivation/utils/fusion/print/merger/_common/run @@ -0,0 +1,9 @@ +rm -rf build + +NAMES_CLEANER="$(dirname "$(dirname "$(realpath "$1")")")"/.clean-names + +flock "$1" pack -q install-deps derive.ipkg && \ +idris2 --check --no-color --console-width 0 --no-banner --find-ipkg DerivedGen.idr && \ +pack exec DerivedGen.idr | "$NAMES_CLEANER" + +rm -rf build diff --git a/tests/derivation/utils/fusion/print/splitter/001 one var match/DerivedGen.idr b/tests/derivation/utils/fusion/print/splitter/001 one var match/DerivedGen.idr new file mode 100644 index 000000000..fec14da88 --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/001 one var match/DerivedGen.idr @@ -0,0 +1,20 @@ +module DerivedGen + +import public Deriving.DepTyCheck.Util.Fusion +import public Deriving.DepTyCheck.Gen.Core + +%default total + +data X : Type -> Type where + MkX : X n + +data Y : Type -> Type where + MkY : Y n + +%language ElabReflection + +decl : Maybe FusionDecl +decl = %runElab runFusion `{X} [`{n}] `{Y} [`{n}] + +main : IO () +main = putPretty $ getSplit decl diff --git a/tests/derivation/utils/fusion/print/splitter/001 one var match/derive.ipkg b/tests/derivation/utils/fusion/print/splitter/001 one var match/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/001 one var match/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/splitter/001 one var match/expected b/tests/derivation/utils/fusion/print/splitter/001 one var match/expected new file mode 100644 index 000000000..2b2cd79ca --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/001 one var match/expected @@ -0,0 +1,21 @@ +1/1: Building DerivedGen (DerivedGen.idr) +[ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "splitXY" + , type = + MkArg MW ExplicitArg Nothing (var "XY" .$ bindVar "n") + .-> var "Builtin.Pair" + .$ (var "X" .$ bindVar "n") + .$ (var "Y" .$ bindVar "n") + }) +, IDef + emptyFC + "splitXY" + [ var "splitXY" .$ var "MkX_MkY" + .= var "Builtin.MkPair" .$ var "MkX" .$ var "MkY" + ] +] diff --git a/tests/derivation/utils/fusion/print/splitter/001 one var match/run b/tests/derivation/utils/fusion/print/splitter/001 one var match/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/001 one var match/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/splitter/002 two var ordered match/DerivedGen.idr b/tests/derivation/utils/fusion/print/splitter/002 two var ordered match/DerivedGen.idr new file mode 100644 index 000000000..b60348b96 --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/002 two var ordered match/DerivedGen.idr @@ -0,0 +1,23 @@ +module DerivedGen + +import public Deriving.DepTyCheck.Util.Fusion +import public Deriving.DepTyCheck.Gen.Core + + +%default total + +data X : Type -> Type -> Type where + MkX : X m n + +data Y : Type -> Type -> Type where + MkY : Y m n + +%language ElabReflection + + +decl : Maybe FusionDecl +decl = %runElab runFusion `{X} [`{m}, `{n}] `{Y} [`{m}, `{n}] + +main : IO () +main = putPretty $ getSplit decl + diff --git a/tests/derivation/utils/fusion/print/splitter/002 two var ordered match/derive.ipkg b/tests/derivation/utils/fusion/print/splitter/002 two var ordered match/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/002 two var ordered match/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/splitter/002 two var ordered match/expected b/tests/derivation/utils/fusion/print/splitter/002 two var ordered match/expected new file mode 100644 index 000000000..51c574c3a --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/002 two var ordered match/expected @@ -0,0 +1,25 @@ +1/1: Building DerivedGen (DerivedGen.idr) +[ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "splitXY" + , type = + MkArg + MW + ExplicitArg + Nothing + (var "XY" .$ bindVar "m" .$ bindVar "n") + .-> var "Builtin.Pair" + .$ (var "X" .$ bindVar "m" .$ bindVar "n") + .$ (var "Y" .$ bindVar "m" .$ bindVar "n") + }) +, IDef + emptyFC + "splitXY" + [ var "splitXY" .$ var "MkX_MkY" + .= var "Builtin.MkPair" .$ var "MkX" .$ var "MkY" + ] +] diff --git a/tests/derivation/utils/fusion/print/splitter/002 two var ordered match/run b/tests/derivation/utils/fusion/print/splitter/002 two var ordered match/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/002 two var ordered match/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/splitter/003 two var unordered match/DerivedGen.idr b/tests/derivation/utils/fusion/print/splitter/003 two var unordered match/DerivedGen.idr new file mode 100644 index 000000000..2dec6cbc8 --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/003 two var unordered match/DerivedGen.idr @@ -0,0 +1,21 @@ +module DerivedGen + +import public Deriving.DepTyCheck.Util.Fusion +import public Deriving.DepTyCheck.Gen.Core + + +%default total + +data X : Type -> Type -> Type where + MkX : X m n + +data Y : Type -> Type -> Type where + MkY : Y m n + +%language ElabReflection + +decl : Maybe FusionDecl +decl = %runElab runFusion `{X} [`{m}, `{n}] `{Y} [`{n}, `{m}] + +main : IO () +main = putPretty $ getSplit decl diff --git a/tests/derivation/utils/fusion/print/splitter/003 two var unordered match/derive.ipkg b/tests/derivation/utils/fusion/print/splitter/003 two var unordered match/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/003 two var unordered match/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/splitter/003 two var unordered match/expected b/tests/derivation/utils/fusion/print/splitter/003 two var unordered match/expected new file mode 100644 index 000000000..f5304c0b2 --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/003 two var unordered match/expected @@ -0,0 +1,25 @@ +1/1: Building DerivedGen (DerivedGen.idr) +[ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "splitXY" + , type = + MkArg + MW + ExplicitArg + Nothing + (var "XY" .$ bindVar "m" .$ bindVar "n") + .-> var "Builtin.Pair" + .$ (var "X" .$ bindVar "m" .$ bindVar "n") + .$ (var "Y" .$ bindVar "n" .$ bindVar "m") + }) +, IDef + emptyFC + "splitXY" + [ var "splitXY" .$ var "MkX_MkY" + .= var "Builtin.MkPair" .$ var "MkX" .$ var "MkY" + ] +] diff --git a/tests/derivation/utils/fusion/print/splitter/003 two var unordered match/run b/tests/derivation/utils/fusion/print/splitter/003 two var unordered match/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/003 two var unordered match/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/splitter/004 var-const match/DerivedGen.idr b/tests/derivation/utils/fusion/print/splitter/004 var-const match/DerivedGen.idr new file mode 100644 index 000000000..73734ed42 --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/004 var-const match/DerivedGen.idr @@ -0,0 +1,21 @@ +module DerivedGen + +import public Deriving.DepTyCheck.Util.Fusion +import public Deriving.DepTyCheck.Gen.Core + + +%default total + +data X : Nat -> Type where + MkX : X n + +data Y : Nat -> Type where + MkY : Y 1 -- unexpected behaviour for 0 + +%language ElabReflection + +decl : Maybe FusionDecl +decl = %runElab runFusion `{X} [`{n}] `{Y} [`{n}] + +main : IO () +main = putPretty $ getSplit decl diff --git a/tests/derivation/utils/fusion/print/splitter/004 var-const match/derive.ipkg b/tests/derivation/utils/fusion/print/splitter/004 var-const match/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/004 var-const match/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/splitter/004 var-const match/expected b/tests/derivation/utils/fusion/print/splitter/004 var-const match/expected new file mode 100644 index 000000000..2b2cd79ca --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/004 var-const match/expected @@ -0,0 +1,21 @@ +1/1: Building DerivedGen (DerivedGen.idr) +[ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "splitXY" + , type = + MkArg MW ExplicitArg Nothing (var "XY" .$ bindVar "n") + .-> var "Builtin.Pair" + .$ (var "X" .$ bindVar "n") + .$ (var "Y" .$ bindVar "n") + }) +, IDef + emptyFC + "splitXY" + [ var "splitXY" .$ var "MkX_MkY" + .= var "Builtin.MkPair" .$ var "MkX" .$ var "MkY" + ] +] diff --git a/tests/derivation/utils/fusion/print/splitter/004 var-const match/run b/tests/derivation/utils/fusion/print/splitter/004 var-const match/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/004 var-const match/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/splitter/005 const-const match/DerivedGen.idr b/tests/derivation/utils/fusion/print/splitter/005 const-const match/DerivedGen.idr new file mode 100644 index 000000000..dc39cb8a3 --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/005 const-const match/DerivedGen.idr @@ -0,0 +1,21 @@ +module DerivedGen + +import public Deriving.DepTyCheck.Util.Fusion +import public Deriving.DepTyCheck.Gen.Core + + +%default total + +data X : Nat -> Type where + MkX : X 1 + +data Y : Nat -> Type where + MkY : Y 1 + +%language ElabReflection + +decl : Maybe FusionDecl +decl = %runElab runFusion `{X} [`{n}] `{Y} [`{n}] + +main : IO () +main = putPretty $ getSplit decl diff --git a/tests/derivation/utils/fusion/print/splitter/005 const-const match/derive.ipkg b/tests/derivation/utils/fusion/print/splitter/005 const-const match/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/005 const-const match/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/splitter/005 const-const match/expected b/tests/derivation/utils/fusion/print/splitter/005 const-const match/expected new file mode 100644 index 000000000..2b2cd79ca --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/005 const-const match/expected @@ -0,0 +1,21 @@ +1/1: Building DerivedGen (DerivedGen.idr) +[ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "splitXY" + , type = + MkArg MW ExplicitArg Nothing (var "XY" .$ bindVar "n") + .-> var "Builtin.Pair" + .$ (var "X" .$ bindVar "n") + .$ (var "Y" .$ bindVar "n") + }) +, IDef + emptyFC + "splitXY" + [ var "splitXY" .$ var "MkX_MkY" + .= var "Builtin.MkPair" .$ var "MkX" .$ var "MkY" + ] +] diff --git a/tests/derivation/utils/fusion/print/splitter/005 const-const match/run b/tests/derivation/utils/fusion/print/splitter/005 const-const match/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/005 const-const match/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/splitter/006 const-const no match/DerivedGen.idr b/tests/derivation/utils/fusion/print/splitter/006 const-const no match/DerivedGen.idr new file mode 100644 index 000000000..addb061fe --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/006 const-const no match/DerivedGen.idr @@ -0,0 +1,21 @@ +module DerivedGen + +import public Deriving.DepTyCheck.Util.Fusion +import public Deriving.DepTyCheck.Gen.Core + + +%default total + +data X : Nat -> Type where + MkX : X 1 + +data Y : Nat -> Type where + MkY : Y 2 + +%language ElabReflection + +decl : Maybe FusionDecl +decl = %runElab runFusion `{X} [`{n}] `{Y} [`{n}] + +main : IO () +main = putPretty $ getSplit decl diff --git a/tests/derivation/utils/fusion/print/splitter/006 const-const no match/derive.ipkg b/tests/derivation/utils/fusion/print/splitter/006 const-const no match/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/006 const-const no match/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/splitter/006 const-const no match/expected b/tests/derivation/utils/fusion/print/splitter/006 const-const no match/expected new file mode 100644 index 000000000..40a1b3fa5 --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/006 const-const no match/expected @@ -0,0 +1,16 @@ +1/1: Building DerivedGen (DerivedGen.idr) +[ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "splitXY" + , type = + MkArg MW ExplicitArg Nothing (var "XY" .$ bindVar "n") + .-> var "Builtin.Pair" + .$ (var "X" .$ bindVar "n") + .$ (var "Y" .$ bindVar "n") + }) +, IDef emptyFC "splitXY" [impossibleClause (var "splitXY" .$ implicitTrue)] +] diff --git a/tests/derivation/utils/fusion/print/splitter/006 const-const no match/run b/tests/derivation/utils/fusion/print/splitter/006 const-const no match/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/006 const-const no match/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/splitter/007 prim-prim match/DerivedGen.idr b/tests/derivation/utils/fusion/print/splitter/007 prim-prim match/DerivedGen.idr new file mode 100644 index 000000000..9b6e86fa2 --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/007 prim-prim match/DerivedGen.idr @@ -0,0 +1,21 @@ +module DerivedGen + +import public Deriving.DepTyCheck.Util.Fusion +import public Deriving.DepTyCheck.Gen.Core + + +%default total + +data X : String -> Type where + MkX : X "0" + +data Y : String -> Type where + MkY : Y "0" + +%language ElabReflection + +decl : Maybe FusionDecl +decl = %runElab runFusion `{X} [`{n}] `{Y} [`{n}] + +main : IO () +main = putPretty $ getSplit decl diff --git a/tests/derivation/utils/fusion/print/splitter/007 prim-prim match/derive.ipkg b/tests/derivation/utils/fusion/print/splitter/007 prim-prim match/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/007 prim-prim match/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/splitter/007 prim-prim match/expected b/tests/derivation/utils/fusion/print/splitter/007 prim-prim match/expected new file mode 100644 index 000000000..2b2cd79ca --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/007 prim-prim match/expected @@ -0,0 +1,21 @@ +1/1: Building DerivedGen (DerivedGen.idr) +[ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "splitXY" + , type = + MkArg MW ExplicitArg Nothing (var "XY" .$ bindVar "n") + .-> var "Builtin.Pair" + .$ (var "X" .$ bindVar "n") + .$ (var "Y" .$ bindVar "n") + }) +, IDef + emptyFC + "splitXY" + [ var "splitXY" .$ var "MkX_MkY" + .= var "Builtin.MkPair" .$ var "MkX" .$ var "MkY" + ] +] diff --git a/tests/derivation/utils/fusion/print/splitter/007 prim-prim match/run b/tests/derivation/utils/fusion/print/splitter/007 prim-prim match/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/007 prim-prim match/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/splitter/008 non-shared var/DerivedGen.idr b/tests/derivation/utils/fusion/print/splitter/008 non-shared var/DerivedGen.idr new file mode 100644 index 000000000..8d3353c5b --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/008 non-shared var/DerivedGen.idr @@ -0,0 +1,21 @@ +module DerivedGen + +import public Deriving.DepTyCheck.Util.Fusion +import public Deriving.DepTyCheck.Gen.Core + + +%default total + +data X : Type -> Type -> Type where + MkX : X m n + +data Y : Type -> Type -> Type where + MkY : Y m n + +%language ElabReflection + +decl : Maybe FusionDecl +decl = %runElab runFusion `{X} [`{m}, `{n}] `{Y} [`{n}, `{k}] + +main : IO () +main = putPretty $ getSplit decl diff --git a/tests/derivation/utils/fusion/print/splitter/008 non-shared var/derive.ipkg b/tests/derivation/utils/fusion/print/splitter/008 non-shared var/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/008 non-shared var/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/splitter/008 non-shared var/expected b/tests/derivation/utils/fusion/print/splitter/008 non-shared var/expected new file mode 100644 index 000000000..e106b4cee --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/008 non-shared var/expected @@ -0,0 +1,25 @@ +1/1: Building DerivedGen (DerivedGen.idr) +[ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "splitXY" + , type = + MkArg + MW + ExplicitArg + Nothing + (var "XY" .$ bindVar "m" .$ bindVar "n" .$ bindVar "k") + .-> var "Builtin.Pair" + .$ (var "X" .$ bindVar "m" .$ bindVar "n") + .$ (var "Y" .$ bindVar "n" .$ bindVar "k") + }) +, IDef + emptyFC + "splitXY" + [ var "splitXY" .$ var "MkX_MkY" + .= var "Builtin.MkPair" .$ var "MkX" .$ var "MkY" + ] +] diff --git a/tests/derivation/utils/fusion/print/splitter/008 non-shared var/run b/tests/derivation/utils/fusion/print/splitter/008 non-shared var/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/008 non-shared var/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/splitter/009 three types fusion/DerivedGen.idr b/tests/derivation/utils/fusion/print/splitter/009 three types fusion/DerivedGen.idr new file mode 100644 index 000000000..9538e51aa --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/009 three types fusion/DerivedGen.idr @@ -0,0 +1,23 @@ +module DerivedGen + +import public Deriving.DepTyCheck.Util.Fusion +import public Deriving.DepTyCheck.Gen.Core + +%default total + +data X : Type -> Type where + MkX : X n + +data Y : Type -> Type where + MkY : Y n + +data Z : Type -> Type where + MkZ : Z n + +%language ElabReflection + +decl : Maybe FusionDecl +decl = %runElab runFusionList [(`{X}, [`{n}]), (`{Y}, [`{n}]), (`{Z}, [`{n}])] + +main : IO () +main = putPretty $ getSplit decl diff --git a/tests/derivation/utils/fusion/print/splitter/009 three types fusion/derive.ipkg b/tests/derivation/utils/fusion/print/splitter/009 three types fusion/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/009 three types fusion/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/splitter/009 three types fusion/expected b/tests/derivation/utils/fusion/print/splitter/009 three types fusion/expected new file mode 100644 index 000000000..947c0470b --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/009 three types fusion/expected @@ -0,0 +1,25 @@ +1/1: Building DerivedGen (DerivedGen.idr) +[ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "splitXYZ" + , type = + MkArg MW ExplicitArg Nothing (var "XYZ" .$ bindVar "n") + .-> var "Builtin.Pair" + .$ (var "X" .$ bindVar "n") + .$ ( var "Builtin.Pair" + .$ (var "Y" .$ bindVar "n") + .$ (var "Z" .$ bindVar "n")) + }) +, IDef + emptyFC + "splitXYZ" + [ var "splitXYZ" .$ var "MkX_MkY_MkZ" + .= var "Builtin.MkPair" + .$ var "MkX" + .$ (var "Builtin.MkPair" .$ var "MkY" .$ var "MkZ") + ] +] diff --git a/tests/derivation/utils/fusion/print/splitter/009 three types fusion/run b/tests/derivation/utils/fusion/print/splitter/009 three types fusion/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/009 three types fusion/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/splitter/010 three types two args/DerivedGen.idr b/tests/derivation/utils/fusion/print/splitter/010 three types two args/DerivedGen.idr new file mode 100644 index 000000000..3f74e83c1 --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/010 three types two args/DerivedGen.idr @@ -0,0 +1,23 @@ +module DerivedGen + +import public Deriving.DepTyCheck.Util.Fusion +import public Deriving.DepTyCheck.Gen.Core + +%default total + +data X : Type -> Type -> Type where + MkX : X n m + +data Y : Type -> Type -> Type where + MkY : Y n m + +data Z : Type -> Type -> Type where + MkZ : Z n m + +%language ElabReflection + +decl : Maybe FusionDecl +decl = %runElab runFusionList [(`{X}, [`{n}, `{m}]), (`{Y}, [`{m}, `{k}]), (`{Z}, [`{k}, `{n}])] + +main : IO () +main = putPretty $ getSplit decl diff --git a/tests/derivation/utils/fusion/print/splitter/010 three types two args/derive.ipkg b/tests/derivation/utils/fusion/print/splitter/010 three types two args/derive.ipkg new file mode 120000 index 000000000..ff0da46fe --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/010 three types two args/derive.ipkg @@ -0,0 +1 @@ +../_common/derive.ipkg \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/splitter/010 three types two args/expected b/tests/derivation/utils/fusion/print/splitter/010 three types two args/expected new file mode 100644 index 000000000..dd6f66bdc --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/010 three types two args/expected @@ -0,0 +1,29 @@ +1/1: Building DerivedGen (DerivedGen.idr) +[ IClaim + emptyFC + MW + Export + [] + (mkTy + { name = "splitXYZ" + , type = + MkArg + MW + ExplicitArg + Nothing + (var "XYZ" .$ bindVar "n" .$ bindVar "m" .$ bindVar "k") + .-> var "Builtin.Pair" + .$ (var "X" .$ bindVar "n" .$ bindVar "m") + .$ ( var "Builtin.Pair" + .$ (var "Y" .$ bindVar "m" .$ bindVar "k") + .$ (var "Z" .$ bindVar "k" .$ bindVar "n")) + }) +, IDef + emptyFC + "splitXYZ" + [ var "splitXYZ" .$ var "MkX_MkY_MkZ" + .= var "Builtin.MkPair" + .$ var "MkX" + .$ (var "Builtin.MkPair" .$ var "MkY" .$ var "MkZ") + ] +] diff --git a/tests/derivation/utils/fusion/print/splitter/010 three types two args/run b/tests/derivation/utils/fusion/print/splitter/010 three types two args/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/010 three types two args/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/derivation/utils/fusion/print/splitter/_common/derive.ipkg b/tests/derivation/utils/fusion/print/splitter/_common/derive.ipkg new file mode 100644 index 000000000..762febf26 --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/_common/derive.ipkg @@ -0,0 +1,7 @@ +package derive-test + +authors = "Simon Tsirikov" + +opts = "--no-color --console-width 0" + +depends = deptycheck diff --git a/tests/derivation/utils/fusion/print/splitter/_common/run b/tests/derivation/utils/fusion/print/splitter/_common/run new file mode 100644 index 000000000..2a6b6401c --- /dev/null +++ b/tests/derivation/utils/fusion/print/splitter/_common/run @@ -0,0 +1,9 @@ +rm -rf build + +NAMES_CLEANER="$(dirname "$(dirname "$(realpath "$1")")")"/.clean-names + +flock "$1" pack -q install-deps derive.ipkg && \ +idris2 --check --no-color --console-width 0 --no-banner --find-ipkg DerivedGen.idr && \ +pack exec DerivedGen.idr | "$NAMES_CLEANER" + +rm -rf build diff --git a/tests/derivation/utils/involved-types/_common-involved-types/Infra.idr b/tests/derivation/utils/involved-types/_common-involved-types/Infra.idr index 79f30f9c2..b8e74ec17 100644 --- a/tests/derivation/utils/involved-types/_common-involved-types/Infra.idr +++ b/tests/derivation/utils/involved-types/_common-involved-types/Infra.idr @@ -8,14 +8,14 @@ import Deriving.DepTyCheck.Gen.Core.Util printInvolvedTypesVerdict : Name -> Count -> List Name -> Elab Unit printInvolvedTypesVerdict tyName minRig expected = do - logMsg "gen.auto.involved-types" 0 "given type: \{show tyName}" + logMsg "deptycheck.involved-types" 0 "given type: \{show tyName}" invTys <- allInvolvedTypes minRig !(getInfo' tyName) let invTys = sortBy (comparing show) $ invTys <&> name expected <- for expected $ map TypeInfo.name . getInfo' let expected = sortBy (comparing show) expected when (invTys /= expected) $ do - logMsg "gen.auto.involved-types" 0 "-------- !!! --------" - logMsg "gen.auto.involved-types" 0 "found : \{show invTys}" - logMsg "gen.auto.involved-types" 0 "expected: \{show expected}" + logMsg "deptycheck.involved-types" 0 "-------- !!! --------" + logMsg "deptycheck.involved-types" 0 "found : \{show invTys}" + logMsg "deptycheck.involved-types" 0 "expected: \{show expected}" %runElab for_ typesAndInvolved $ \(n, r, ns) => printInvolvedTypesVerdict n r ns diff --git a/tests/derivation/utils/involved-types/norec-001/expected b/tests/derivation/utils/involved-types/norec-001/expected index 0c87999b2..03efd5349 100644 --- a/tests/derivation/utils/involved-types/norec-001/expected +++ b/tests/derivation/utils/involved-types/norec-001/expected @@ -1,10 +1,10 @@ 1/2: Building TypesAndInvolved (TypesAndInvolved.idr) 2/2: Building Infra (Infra.idr) -LOG gen.auto.involved-types:0: given type: Bool -LOG gen.auto.involved-types:0: given type: Bool -LOG gen.auto.involved-types:0: given type: Bool -LOG gen.auto.involved-types:0: given type: Bool -LOG gen.auto.involved-types:0: given type: X -LOG gen.auto.involved-types:0: given type: X -LOG gen.auto.involved-types:0: given type: X -LOG gen.auto.involved-types:0: given type: X +LOG deptycheck.involved-types:0: given type: Bool +LOG deptycheck.involved-types:0: given type: Bool +LOG deptycheck.involved-types:0: given type: Bool +LOG deptycheck.involved-types:0: given type: Bool +LOG deptycheck.involved-types:0: given type: X +LOG deptycheck.involved-types:0: given type: X +LOG deptycheck.involved-types:0: given type: X +LOG deptycheck.involved-types:0: given type: X diff --git a/tests/derivation/utils/involved-types/rec-001/expected b/tests/derivation/utils/involved-types/rec-001/expected index 3ee689d0f..719477608 100644 --- a/tests/derivation/utils/involved-types/rec-001/expected +++ b/tests/derivation/utils/involved-types/rec-001/expected @@ -1,6 +1,6 @@ 1/2: Building TypesAndInvolved (TypesAndInvolved.idr) 2/2: Building Infra (Infra.idr) -LOG gen.auto.involved-types:0: given type: Nat -LOG gen.auto.involved-types:0: given type: List -LOG gen.auto.involved-types:0: given type: Vect -LOG gen.auto.involved-types:0: given type: Vect +LOG deptycheck.involved-types:0: given type: Nat +LOG deptycheck.involved-types:0: given type: List +LOG deptycheck.involved-types:0: given type: Vect +LOG deptycheck.involved-types:0: given type: Vect diff --git a/tests/derivation/utils/involved-types/rec-002/expected b/tests/derivation/utils/involved-types/rec-002/expected index d5edff34f..d424e6131 100644 --- a/tests/derivation/utils/involved-types/rec-002/expected +++ b/tests/derivation/utils/involved-types/rec-002/expected @@ -1,4 +1,4 @@ 1/2: Building TypesAndInvolved (TypesAndInvolved.idr) 2/2: Building Infra (Infra.idr) -LOG gen.auto.involved-types:0: given type: X -LOG gen.auto.involved-types:0: given type: TTImp +LOG deptycheck.involved-types:0: given type: X +LOG deptycheck.involved-types:0: given type: TTImp diff --git a/tests/derivation/utils/up-to-renaming-ttimp-eq/_common/Infra.idr b/tests/derivation/utils/up-to-renaming-ttimp-eq/_common/Infra.idr index 236029a07..5a85f57a8 100644 --- a/tests/derivation/utils/up-to-renaming-ttimp-eq/_common/Infra.idr +++ b/tests/derivation/utils/up-to-renaming-ttimp-eq/_common/Infra.idr @@ -23,16 +23,6 @@ export So (NotTTImp a) => GivesTTImp a where toTTImp x = quote x --- `NotTTImp` does not reduce on `Type` and functions - -export -GivesTTImp Type where - toTTImp x = quote x - -export -GivesTTImp a => GivesTTImp b => GivesTTImp (a -> b) where - toTTImp x = quote x - export checkEq : GivesTTImp expr1 => GivesTTImp expr2 => String -> Bool -> expr1 -> expr2 -> Elab Unit checkEq desc res e1 e2 = do @@ -40,7 +30,7 @@ checkEq desc res e1 e2 = do e2 <- toTTImp e2 let ch1 : String -> TTImp -> TTImp -> Elab Unit ch1 desc l r = do - logMsg "gen.auto.reflection.ttimp-eq-up-to-renamings" 0 $ if (l == r) @{UpToRenaming} == res + logMsg "deptycheck.reflection.ttimp-eq-up-to-renamings" 0 $ if (l == r) @{UpToRenaming} == res then "\{desc}: OKAY" else """ \{desc}: FAILED diff --git a/tests/derivation/utils/up-to-renaming-ttimp-eq/renaming/expected b/tests/derivation/utils/up-to-renaming-ttimp-eq/renaming/expected index 7144c165e..e7b4781a2 100644 --- a/tests/derivation/utils/up-to-renaming-ttimp-eq/renaming/expected +++ b/tests/derivation/utils/up-to-renaming-ttimp-eq/renaming/expected @@ -1,130 +1,130 @@ 1/2: Building Infra (Infra.idr) 2/2: Building RenamingTTImpEqCheck (RenamingTTImpEqCheck.idr) -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: fst, rename, diff names (plain) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: fst, rename, diff names (plain) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: fst, rename, diff names (ap z) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: fst, rename, diff names (ap z) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: fst, rename, diff names (ap cross) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: fst, rename, diff names (ap cross) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: fst, rename, diff names (wrap case) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: fst, rename, diff names (wrap case) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: fst, rename, same names (plain) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: fst, rename, same names (plain) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: fst, rename, same names (ap z) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: fst, rename, same names (ap z) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: fst, rename, same names (ap cross) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: fst, rename, same names (ap cross) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: fst, rename, same names (wrap case) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: fst, rename, same names (wrap case) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: snd, rename, diff names (plain) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: snd, rename, diff names (plain) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: snd, rename, diff names (ap z) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: snd, rename, diff names (ap z) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: snd, rename, diff names (ap cross) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: snd, rename, diff names (ap cross) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: snd, rename, diff names (wrap case) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: snd, rename, diff names (wrap case) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: snd, rename, same names (plain) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: snd, rename, same names (plain) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: snd, rename, same names (ap z) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: snd, rename, same names (ap z) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: snd, rename, same names (ap cross) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: snd, rename, same names (ap cross) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: snd, rename, same names (wrap case) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: snd, rename, same names (wrap case) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: flipped lambda (plain) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: flipped lambda (plain) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: flipped lambda (ap z) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: flipped lambda (ap z) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: flipped lambda (ap cross) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: flipped lambda (ap cross) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: flipped lambda (wrap case) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: flipped lambda (wrap case) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, `_` q (plain) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, `_` q (plain) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, `_` q (ap z) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, `_` q (ap z) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, `_` q (ap cross) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, `_` q (ap cross) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, `_` q (wrap case) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, `_` q (wrap case) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, `_` e (plain) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, `_` e (plain) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, `_` e (ap z) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, `_` e (ap z) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, `_` e (ap cross) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, `_` e (ap cross) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, `_` e (wrap case) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, `_` e (wrap case) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, unnamed (plain) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, unnamed (plain) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, unnamed (ap z) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, unnamed (ap z) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, unnamed (ap cross) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, unnamed (ap cross) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, unnamed (wrap case) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, unnamed (wrap case) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: snd, shadow (plain) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: snd, shadow (plain) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: snd, shadow (ap z) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: snd, shadow (ap z) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: snd, shadow (ap cross) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: snd, shadow (ap cross) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: snd, shadow (wrap case) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: snd, shadow (wrap case) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: snd, shadow, rename (plain) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: snd, shadow, rename (plain) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: snd, shadow, rename (ap z) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: snd, shadow, rename (ap z) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: snd, shadow, rename (ap cross) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: snd, shadow, rename (ap cross) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: snd, shadow, rename (wrap case) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: snd, shadow, rename (wrap case) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unnamed unused (plain) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unnamed unused (plain) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unnamed unused (ap z) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unnamed unused (ap z) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unnamed unused (ap cross) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unnamed unused (ap cross) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unnamed unused (wrap case) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unnamed unused (wrap case) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: _ unused e (plain) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: _ unused e (plain) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: _ unused e (ap z) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: _ unused e (ap z) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: _ unused e (ap cross) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: _ unused e (ap cross) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: _ unused e (wrap case) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: _ unused e (wrap case) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: _ unused q (plain) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: _ unused q (plain) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: _ unused q (ap z) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: _ unused q (ap z) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: _ unused q (ap cross) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: _ unused q (ap cross) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: _ unused q (wrap case) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: _ unused q (wrap case) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unnamed unused' (plain) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unnamed unused' (plain) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unnamed unused' (ap z) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unnamed unused' (ap z) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unnamed unused' (ap cross) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unnamed unused' (ap cross) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unnamed unused' (wrap case) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unnamed unused' (wrap case) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: _ unused' e (plain) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: _ unused' e (plain) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: _ unused' e (ap z) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: _ unused' e (ap z) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: _ unused' e (ap cross) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: _ unused' e (ap cross) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: _ unused' e (wrap case) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: _ unused' e (wrap case) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: _ unused' q (plain) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: _ unused' q (plain) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: _ unused' q (ap z) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: _ unused' q (ap z) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: _ unused' q (ap cross) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: _ unused' q (ap cross) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: _ unused' q (wrap case) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: _ unused' q (wrap case) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: fst, rename, diff names (plain) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: fst, rename, diff names (plain) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: fst, rename, diff names (ap z) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: fst, rename, diff names (ap z) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: fst, rename, diff names (ap cross) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: fst, rename, diff names (ap cross) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: fst, rename, diff names (wrap case) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: fst, rename, diff names (wrap case) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: fst, rename, same names (plain) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: fst, rename, same names (plain) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: fst, rename, same names (ap z) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: fst, rename, same names (ap z) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: fst, rename, same names (ap cross) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: fst, rename, same names (ap cross) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: fst, rename, same names (wrap case) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: fst, rename, same names (wrap case) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: snd, rename, diff names (plain) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: snd, rename, diff names (plain) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: snd, rename, diff names (ap z) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: snd, rename, diff names (ap z) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: snd, rename, diff names (ap cross) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: snd, rename, diff names (ap cross) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: snd, rename, diff names (wrap case) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: snd, rename, diff names (wrap case) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: snd, rename, same names (plain) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: snd, rename, same names (plain) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: snd, rename, same names (ap z) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: snd, rename, same names (ap z) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: snd, rename, same names (ap cross) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: snd, rename, same names (ap cross) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: snd, rename, same names (wrap case) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: snd, rename, same names (wrap case) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: flipped lambda (plain) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: flipped lambda (plain) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: flipped lambda (ap z) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: flipped lambda (ap z) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: flipped lambda (ap cross) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: flipped lambda (ap cross) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: flipped lambda (wrap case) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: flipped lambda (wrap case) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, `_` q (plain) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, `_` q (plain) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, `_` q (ap z) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, `_` q (ap z) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, `_` q (ap cross) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, `_` q (ap cross) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, `_` q (wrap case) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, `_` q (wrap case) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, `_` e (plain) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, `_` e (plain) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, `_` e (ap z) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, `_` e (ap z) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, `_` e (ap cross) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, `_` e (ap cross) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, `_` e (wrap case) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, `_` e (wrap case) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, unnamed (plain) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, unnamed (plain) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, unnamed (ap z) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, unnamed (ap z) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, unnamed (ap cross) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, unnamed (ap cross) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, unnamed (wrap case) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: flipped lambda, unnamed (wrap case) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: snd, shadow (plain) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: snd, shadow (plain) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: snd, shadow (ap z) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: snd, shadow (ap z) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: snd, shadow (ap cross) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: snd, shadow (ap cross) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: snd, shadow (wrap case) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: snd, shadow (wrap case) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: snd, shadow, rename (plain) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: snd, shadow, rename (plain) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: snd, shadow, rename (ap z) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: snd, shadow, rename (ap z) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: snd, shadow, rename (ap cross) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: snd, shadow, rename (ap cross) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: snd, shadow, rename (wrap case) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: snd, shadow, rename (wrap case) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unnamed unused (plain) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unnamed unused (plain) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unnamed unused (ap z) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unnamed unused (ap z) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unnamed unused (ap cross) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unnamed unused (ap cross) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unnamed unused (wrap case) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unnamed unused (wrap case) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: _ unused e (plain) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: _ unused e (plain) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: _ unused e (ap z) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: _ unused e (ap z) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: _ unused e (ap cross) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: _ unused e (ap cross) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: _ unused e (wrap case) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: _ unused e (wrap case) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: _ unused q (plain) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: _ unused q (plain) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: _ unused q (ap z) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: _ unused q (ap z) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: _ unused q (ap cross) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: _ unused q (ap cross) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: _ unused q (wrap case) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: _ unused q (wrap case) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unnamed unused' (plain) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unnamed unused' (plain) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unnamed unused' (ap z) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unnamed unused' (ap z) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unnamed unused' (ap cross) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unnamed unused' (ap cross) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unnamed unused' (wrap case) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unnamed unused' (wrap case) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: _ unused' e (plain) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: _ unused' e (plain) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: _ unused' e (ap z) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: _ unused' e (ap z) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: _ unused' e (ap cross) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: _ unused' e (ap cross) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: _ unused' e (wrap case) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: _ unused' e (wrap case) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: _ unused' q (plain) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: _ unused' q (plain) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: _ unused' q (ap z) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: _ unused' q (ap z) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: _ unused' q (ap cross) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: _ unused' q (ap cross) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: _ unused' q (wrap case) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: _ unused' q (wrap case) <<: OKAY diff --git a/tests/derivation/utils/up-to-renaming-ttimp-eq/simple/expected b/tests/derivation/utils/up-to-renaming-ttimp-eq/simple/expected index 8caaa4265..eb593aca5 100644 --- a/tests/derivation/utils/up-to-renaming-ttimp-eq/simple/expected +++ b/tests/derivation/utils/up-to-renaming-ttimp-eq/simple/expected @@ -1,146 +1,146 @@ 1/2: Building Infra (Infra.idr) 2/2: Building RenamingTTImpEqCheck (RenamingTTImpEqCheck.idr) -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unit is unit (plain) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unit is unit (plain) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unit is unit (ap z) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unit is unit (ap z) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unit is unit (ap cross) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unit is unit (ap cross) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unit is unit (wrap case) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unit is unit (wrap case) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unit is not its value (plain) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unit is not its value (plain) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unit is not its value (ap z) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unit is not its value (ap z) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unit is not its value (ap cross) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unit is not its value (ap cross) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unit is not its value (wrap case) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unit is not its value (wrap case) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: zero is zero (plain) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: zero is zero (plain) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: zero is zero (ap z) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: zero is zero (ap z) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: zero is zero (ap cross) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: zero is zero (ap cross) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: zero is zero (wrap case) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: zero is zero (wrap case) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: zero is not one (plain) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: zero is not one (plain) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: zero is not one (ap z) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: zero is not one (ap z) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: zero is not one (ap cross) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: zero is not one (ap cross) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: zero is not one (wrap case) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: zero is not one (wrap case) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: one (cons) is one (nat lit) (plain) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: one (cons) is one (nat lit) (plain) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: one (cons) is one (nat lit) (ap z) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: one (cons) is one (nat lit) (ap z) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: one (cons) is one (nat lit) (ap cross) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: one (cons) is one (nat lit) (ap cross) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: one (cons) is one (nat lit) (wrap case) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: one (cons) is one (nat lit) (wrap case) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: nat one is not integer one (plain) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: nat one is not integer one (plain) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: nat one is not integer one (ap z) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: nat one is not integer one (ap z) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: nat one is not integer one (ap cross) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: nat one is not integer one (ap cross) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: nat one is not integer one (wrap case) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: nat one is not integer one (wrap case) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: list is list (plain) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: list is list (plain) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: list is list (ap z) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: list is list (ap z) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: list is list (ap cross) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: list is list (ap cross) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: list is list (wrap case) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: list is list (wrap case) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: list is not vect (plain) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: list is not vect (plain) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: list is not vect (ap z) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: list is not vect (ap z) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: list is not vect (ap cross) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: list is not vect (ap cross) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: list is not vect (wrap case) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: list is not vect (wrap case) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: succ is succ (plain) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: succ is succ (plain) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: succ is succ (ap z) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: succ is succ (ap z) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: succ is succ (ap cross) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: succ is succ (ap cross) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: succ is succ (wrap case) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: succ is succ (wrap case) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: succ is not zero (plain) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: succ is not zero (plain) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: succ is not zero (ap z) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: succ is not zero (ap z) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: succ is not zero (ap cross) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: succ is not zero (ap cross) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: succ is not zero (wrap case) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: succ is not zero (wrap case) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unit is unit (ttimp) (plain) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unit is unit (ttimp) (plain) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unit is unit (ttimp) (ap z) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unit is unit (ttimp) (ap z) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unit is unit (ttimp) (ap cross) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unit is unit (ttimp) (ap cross) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unit is unit (ttimp) (wrap case) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unit is unit (ttimp) (wrap case) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unit is not some other `Unit` (plain) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unit is not some other `Unit` (plain) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unit is not some other `Unit` (ap z) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unit is not some other `Unit` (ap z) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unit is not some other `Unit` (ap cross) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unit is not some other `Unit` (ap cross) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unit is not some other `Unit` (wrap case) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: unit is not some other `Unit` (wrap case) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: nat id is nat id (plain) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: nat id is nat id (plain) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: nat id is nat id (ap z) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: nat id is nat id (ap z) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: nat id is nat id (ap cross) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: nat id is nat id (ap cross) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: nat id is nat id (wrap case) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: nat id is nat id (wrap case) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: nat id is not string id (plain) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: nat id is not string id (plain) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: nat id is not string id (ap z) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: nat id is not string id (ap z) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: nat id is not string id (ap cross) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: nat id is not string id (ap cross) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: nat id is not string id (wrap case) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: nat id is not string id (wrap case) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: nat fun ty is nat fun ty (plain) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: nat fun ty is nat fun ty (plain) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: nat fun ty is nat fun ty (ap z) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: nat fun ty is nat fun ty (ap z) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: nat fun ty is nat fun ty (ap cross) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: nat fun ty is nat fun ty (ap cross) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: nat fun ty is nat fun ty (wrap case) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: nat fun ty is nat fun ty (wrap case) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: nat fun ty is not string fun ty (plain) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: nat fun ty is not string fun ty (plain) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: nat fun ty is not string fun ty (ap z) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: nat fun ty is not string fun ty (ap z) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: nat fun ty is not string fun ty (ap cross) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: nat fun ty is not string fun ty (ap cross) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: nat fun ty is not string fun ty (wrap case) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: nat fun ty is not string fun ty (wrap case) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: dep ty fun is itself (plain) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: dep ty fun is itself (plain) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: dep ty fun is itself (ap z) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: dep ty fun is itself (ap z) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: dep ty fun is itself (ap cross) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: dep ty fun is itself (ap cross) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: dep ty fun is itself (wrap case) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: dep ty fun is itself (wrap case) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: dep ty fun is not another one (plain) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: dep ty fun is not another one (plain) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: dep ty fun is not another one (ap z) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: dep ty fun is not another one (ap z) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: dep ty fun is not another one (ap cross) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: dep ty fun is not another one (ap cross) <<: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: dep ty fun is not another one (wrap case) >>: OKAY -LOG gen.auto.reflection.ttimp-eq-up-to-renamings:0: dep ty fun is not another one (wrap case) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unit is unit (plain) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unit is unit (plain) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unit is unit (ap z) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unit is unit (ap z) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unit is unit (ap cross) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unit is unit (ap cross) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unit is unit (wrap case) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unit is unit (wrap case) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unit is not its value (plain) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unit is not its value (plain) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unit is not its value (ap z) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unit is not its value (ap z) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unit is not its value (ap cross) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unit is not its value (ap cross) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unit is not its value (wrap case) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unit is not its value (wrap case) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: zero is zero (plain) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: zero is zero (plain) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: zero is zero (ap z) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: zero is zero (ap z) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: zero is zero (ap cross) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: zero is zero (ap cross) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: zero is zero (wrap case) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: zero is zero (wrap case) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: zero is not one (plain) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: zero is not one (plain) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: zero is not one (ap z) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: zero is not one (ap z) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: zero is not one (ap cross) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: zero is not one (ap cross) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: zero is not one (wrap case) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: zero is not one (wrap case) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: one (cons) is one (nat lit) (plain) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: one (cons) is one (nat lit) (plain) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: one (cons) is one (nat lit) (ap z) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: one (cons) is one (nat lit) (ap z) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: one (cons) is one (nat lit) (ap cross) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: one (cons) is one (nat lit) (ap cross) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: one (cons) is one (nat lit) (wrap case) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: one (cons) is one (nat lit) (wrap case) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: nat one is not integer one (plain) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: nat one is not integer one (plain) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: nat one is not integer one (ap z) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: nat one is not integer one (ap z) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: nat one is not integer one (ap cross) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: nat one is not integer one (ap cross) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: nat one is not integer one (wrap case) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: nat one is not integer one (wrap case) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: list is list (plain) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: list is list (plain) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: list is list (ap z) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: list is list (ap z) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: list is list (ap cross) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: list is list (ap cross) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: list is list (wrap case) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: list is list (wrap case) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: list is not vect (plain) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: list is not vect (plain) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: list is not vect (ap z) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: list is not vect (ap z) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: list is not vect (ap cross) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: list is not vect (ap cross) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: list is not vect (wrap case) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: list is not vect (wrap case) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: succ is succ (plain) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: succ is succ (plain) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: succ is succ (ap z) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: succ is succ (ap z) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: succ is succ (ap cross) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: succ is succ (ap cross) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: succ is succ (wrap case) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: succ is succ (wrap case) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: succ is not zero (plain) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: succ is not zero (plain) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: succ is not zero (ap z) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: succ is not zero (ap z) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: succ is not zero (ap cross) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: succ is not zero (ap cross) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: succ is not zero (wrap case) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: succ is not zero (wrap case) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unit is unit (ttimp) (plain) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unit is unit (ttimp) (plain) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unit is unit (ttimp) (ap z) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unit is unit (ttimp) (ap z) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unit is unit (ttimp) (ap cross) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unit is unit (ttimp) (ap cross) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unit is unit (ttimp) (wrap case) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unit is unit (ttimp) (wrap case) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unit is not some other `Unit` (plain) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unit is not some other `Unit` (plain) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unit is not some other `Unit` (ap z) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unit is not some other `Unit` (ap z) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unit is not some other `Unit` (ap cross) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unit is not some other `Unit` (ap cross) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unit is not some other `Unit` (wrap case) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: unit is not some other `Unit` (wrap case) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: nat id is nat id (plain) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: nat id is nat id (plain) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: nat id is nat id (ap z) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: nat id is nat id (ap z) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: nat id is nat id (ap cross) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: nat id is nat id (ap cross) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: nat id is nat id (wrap case) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: nat id is nat id (wrap case) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: nat id is not string id (plain) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: nat id is not string id (plain) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: nat id is not string id (ap z) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: nat id is not string id (ap z) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: nat id is not string id (ap cross) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: nat id is not string id (ap cross) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: nat id is not string id (wrap case) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: nat id is not string id (wrap case) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: nat fun ty is nat fun ty (plain) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: nat fun ty is nat fun ty (plain) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: nat fun ty is nat fun ty (ap z) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: nat fun ty is nat fun ty (ap z) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: nat fun ty is nat fun ty (ap cross) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: nat fun ty is nat fun ty (ap cross) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: nat fun ty is nat fun ty (wrap case) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: nat fun ty is nat fun ty (wrap case) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: nat fun ty is not string fun ty (plain) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: nat fun ty is not string fun ty (plain) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: nat fun ty is not string fun ty (ap z) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: nat fun ty is not string fun ty (ap z) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: nat fun ty is not string fun ty (ap cross) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: nat fun ty is not string fun ty (ap cross) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: nat fun ty is not string fun ty (wrap case) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: nat fun ty is not string fun ty (wrap case) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: dep ty fun is itself (plain) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: dep ty fun is itself (plain) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: dep ty fun is itself (ap z) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: dep ty fun is itself (ap z) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: dep ty fun is itself (ap cross) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: dep ty fun is itself (ap cross) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: dep ty fun is itself (wrap case) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: dep ty fun is itself (wrap case) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: dep ty fun is not another one (plain) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: dep ty fun is not another one (plain) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: dep ty fun is not another one (ap z) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: dep ty fun is not another one (ap z) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: dep ty fun is not another one (ap cross) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: dep ty fun is not another one (ap cross) <<: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: dep ty fun is not another one (wrap case) >>: OKAY +LOG deptycheck.reflection.ttimp-eq-up-to-renamings:0: dep ty fun is not another one (wrap case) <<: OKAY diff --git a/tests/lib/coverage/ty-and-con-derived-001/PrintCoverage.idr b/tests/lib/coverage/ty-and-con-derived-001/PrintCoverage.idr index 8834fedf2..d0d2e0b1f 100644 --- a/tests/lib/coverage/ty-and-con-derived-001/PrintCoverage.idr +++ b/tests/lib/coverage/ty-and-con-derived-001/PrintCoverage.idr @@ -15,10 +15,6 @@ export %hint smallStrs : Fuel -> Gen MaybeEmpty String smallStrs _ = elements ["", "a", "bc"] -export %hint -UsedConstructorDerivator : ConstructorDerivator -UsedConstructorDerivator = LeastEffort - data X = X1 | X2 Nat | X3 String data Y = Y1 | Y2 X | Y3 X X diff --git a/tests/lib/coverage/ty-and-con-derived-002/PrintCoverage.idr b/tests/lib/coverage/ty-and-con-derived-002/PrintCoverage.idr index 4f5807e08..41d346c6d 100644 --- a/tests/lib/coverage/ty-and-con-derived-002/PrintCoverage.idr +++ b/tests/lib/coverage/ty-and-con-derived-002/PrintCoverage.idr @@ -15,10 +15,6 @@ export %hint smallStrs : Fuel -> Gen MaybeEmpty String smallStrs _ = elements ["", "a", "bc"] -export %hint -UsedConstructorDerivator : ConstructorDerivator -UsedConstructorDerivator = LeastEffort - data X = X1 | X2 Nat | X3 String data Y : Nat -> Type where diff --git a/tests/lib/coverage/ty-and-con-derived-003/PrintCoverage.idr b/tests/lib/coverage/ty-and-con-derived-003/PrintCoverage.idr index 6bc4905f7..77bbac0dd 100644 --- a/tests/lib/coverage/ty-and-con-derived-003/PrintCoverage.idr +++ b/tests/lib/coverage/ty-and-con-derived-003/PrintCoverage.idr @@ -11,10 +11,6 @@ import System.Random.Pure.StdGen %language ElabReflection -export %hint -UsedConstructorDerivator : ConstructorDerivator -UsedConstructorDerivator = LeastEffort - data X : Bool -> Type where XT : X True XF : X False diff --git a/tests/lib/coverage/ty-and-con-withCov-010/PrintCoverage.idr b/tests/lib/coverage/ty-and-con-withCov-010/PrintCoverage.idr new file mode 100644 index 000000000..f2086d6f8 --- /dev/null +++ b/tests/lib/coverage/ty-and-con-withCov-010/PrintCoverage.idr @@ -0,0 +1,43 @@ +module PrintCoverage + +import Test.DepTyCheck.Gen +import Test.DepTyCheck.Gen.Coverage + +import Deriving.DepTyCheck.Gen + +import Control.Monad.Random +import System.Random.Pure.StdGen + +%default total + +%language ElabReflection + +export +smallStrs : Fuel -> Gen NonEmpty String +smallStrs _ = elements ["", "a", "bc"] + +data X = X1 | X2 Nat | X3 String + +genX : Fuel -> Gen NonEmpty X +genX fl = oneOf + [ pure X1 + , X3 <$> smallStrs fl + ] + +data Y = Y1 | Y2 X | Y3 X X + +genY : Fuel -> Gen NonEmpty Y +genY fl = withCoverage $ oneOf + [ [| Y1 |] + , [| Y3 (genX fl) (genX fl) |] + ] + +main : IO () +main = do + let ci = initCoverageInfo genY + (Right v) <- runEitherT {e = ()} {m = IO} $ evalRandomT someStdGen $ unGenD $ genY $ limit 5 + | Left err => putStrLn "Impossible!" + let mc = fst v + let ci = registerCoverage mc ci + putStrLn $ show ci + diff --git a/tests/lib/coverage/ty-and-con-withCov-010/expected b/tests/lib/coverage/ty-and-con-withCov-010/expected new file mode 100644 index 000000000..3413cf1ef --- /dev/null +++ b/tests/lib/coverage/ty-and-con-withCov-010/expected @@ -0,0 +1,16 @@ +1/1: Building PrintCoverage (PrintCoverage.idr) + +Prelude.Types.Nat not covered + - S: not covered + - Z: not covered + +PrintCoverage.X not covered + - X1: not covered + - X2: not covered + - X3: not covered + +PrintCoverage.Y covered partially (1 time) + - Y1: not covered + - Y2: not covered + - Y3: covered (1 time) + diff --git a/tests/lib/coverage/ty-and-con-withCov-010/run b/tests/lib/coverage/ty-and-con-withCov-010/run new file mode 100755 index 000000000..9706b3375 --- /dev/null +++ b/tests/lib/coverage/ty-and-con-withCov-010/run @@ -0,0 +1,8 @@ +rm -rf build + +flock "$1" pack -q install-deps test.ipkg && \ +idris2 --no-color --console-width 0 --no-banner --find-ipkg --check PrintCoverage.idr && \ +echo && \ +pack exec PrintCoverage.idr + +rm -rf build diff --git a/tests/lib/coverage/ty-and-con-withCov-010/test.ipkg b/tests/lib/coverage/ty-and-con-withCov-010/test.ipkg new file mode 100644 index 000000000..879278361 --- /dev/null +++ b/tests/lib/coverage/ty-and-con-withCov-010/test.ipkg @@ -0,0 +1,6 @@ +package a-test +executable = a-test + +depends = deptycheck + +main = PrintCoverage diff --git a/tests/lib/coverage/ty-and-con-withCov-011/PrintCoverage.idr b/tests/lib/coverage/ty-and-con-withCov-011/PrintCoverage.idr new file mode 100644 index 000000000..dc7c17521 --- /dev/null +++ b/tests/lib/coverage/ty-and-con-withCov-011/PrintCoverage.idr @@ -0,0 +1,57 @@ +module PrintCoverage + +import Test.DepTyCheck.Gen +import Test.DepTyCheck.Gen.Coverage + +import Deriving.DepTyCheck.Gen + +import Control.Monad.Random +import System.Random.Pure.StdGen + +%default total + +%language ElabReflection + +export +smallStrs : Fuel -> Gen NonEmpty String +smallStrs _ = elements ["", "a", "bc"] + +data X = X1 | X2 Nat | X3 String + +genX : Fuel -> Gen NonEmpty X +genX fl = withCoverage $ oneOf + [ pure X1 + , X3 <$> smallStrs fl + ] + +data Y : Nat -> Type where + Y1 : Y 0 + Y2 : X -> Y 1 + Y3 : X -> X -> Y n + +genY : Fuel -> (n : _) -> Gen NonEmpty $ Y n +genY fl Z = withCoverage $ oneOf + [ [| Y1 |] + , [| Y3 (genX fl) (genX fl) |] + ] +genY fl 1 = withCoverage [| Y2 (genX fl) |] +genY fl n = withCoverage [| Y3 (genX fl) (genX fl) |] + +try : (CoverageGenInfo g) -> (n : Nat) -> IO () +try ci n = do + (Right v) <- runEitherT {e = ()} {m = IO} $ evalRandomT someStdGen $ unGenD $ genY (limit 5) n + | Left err => putStrLn "Impossible!" + let mc = fst v + let ci = registerCoverage mc ci + putStrLn $ show ci + + +main : IO () +main = do + let ci = initCoverageInfo genY + try ci 0 + putStrLn "--------\n" + try ci 1 + putStrLn "--------\n" + try ci 3 + diff --git a/tests/lib/coverage/ty-and-con-withCov-011/expected b/tests/lib/coverage/ty-and-con-withCov-011/expected new file mode 100644 index 000000000..040d63c93 --- /dev/null +++ b/tests/lib/coverage/ty-and-con-withCov-011/expected @@ -0,0 +1,48 @@ +1/1: Building PrintCoverage (PrintCoverage.idr) + +Prelude.Types.Nat not covered + - S: not covered + - Z: not covered + +PrintCoverage.X covered partially (2 times) + - X1: covered (2 times) + - X2: not covered + - X3: not covered + +PrintCoverage.Y covered partially (1 time) + - Y1: not covered + - Y2: not covered + - Y3: covered (1 time) + +-------- + +Prelude.Types.Nat not covered + - S: not covered + - Z: not covered + +PrintCoverage.X covered partially (1 time) + - X1: not covered + - X2: not covered + - X3: covered (1 time) + +PrintCoverage.Y covered partially (1 time) + - Y1: not covered + - Y2: covered (1 time) + - Y3: not covered + +-------- + +Prelude.Types.Nat not covered + - S: not covered + - Z: not covered + +PrintCoverage.X covered partially (2 times) + - X1: covered (1 time) + - X2: not covered + - X3: covered (1 time) + +PrintCoverage.Y covered partially (1 time) + - Y1: not covered + - Y2: not covered + - Y3: covered (1 time) + diff --git a/tests/lib/coverage/ty-and-con-withCov-011/run b/tests/lib/coverage/ty-and-con-withCov-011/run new file mode 100755 index 000000000..9706b3375 --- /dev/null +++ b/tests/lib/coverage/ty-and-con-withCov-011/run @@ -0,0 +1,8 @@ +rm -rf build + +flock "$1" pack -q install-deps test.ipkg && \ +idris2 --no-color --console-width 0 --no-banner --find-ipkg --check PrintCoverage.idr && \ +echo && \ +pack exec PrintCoverage.idr + +rm -rf build diff --git a/tests/lib/coverage/ty-and-con-withCov-011/test.ipkg b/tests/lib/coverage/ty-and-con-withCov-011/test.ipkg new file mode 100644 index 000000000..879278361 --- /dev/null +++ b/tests/lib/coverage/ty-and-con-withCov-011/test.ipkg @@ -0,0 +1,6 @@ +package a-test +executable = a-test + +depends = deptycheck + +main = PrintCoverage diff --git a/tests/lib/distribution/_common/DistrCheckCommon.idr b/tests/lib/distribution/_common/DistrCheckCommon.idr index 3f4421c44..b66f524ca 100644 --- a/tests/lib/distribution/_common/DistrCheckCommon.idr +++ b/tests/lib/distribution/_common/DistrCheckCommon.idr @@ -4,6 +4,7 @@ import Data.List.Lazy import public Test.DepTyCheck.Gen +import public Statistics.Norm.Precise import public Statistics.Confidence import System.Random.Pure.StdGen @@ -16,12 +17,12 @@ find (x::xs) = case force xs of [] => Just x xs => if all isOk x then Just x else assert_total $ find xs -verdict : Vect n (CoverageTest a) -> Gen MaybeEmpty a -> Maybe $ Vect n SignificantBounds +verdict : Vect n (CoverageTest a) -> Gen em a -> Maybe $ Vect n SignificantBounds verdict conds = find . mapMaybe sequence . checkCoverageConditions conds . unGenTryN 10000000 someStdGen Show SignificantBounds where show = interpolate export -printVerdict : HasIO m => Gen MaybeEmpty a -> Vect n (CoverageTest a) -> m () +printVerdict : HasIO m => Gen em a -> Vect n (CoverageTest a) -> m () printVerdict = putStrLn .: show .: flip verdict diff --git a/tests/lib/distribution/with-alts-deep-001/CheckDistribution.idr b/tests/lib/distribution/with-alts-deep-001/CheckDistribution.idr new file mode 100644 index 000000000..5dec965ee --- /dev/null +++ b/tests/lib/distribution/with-alts-deep-001/CheckDistribution.idr @@ -0,0 +1,35 @@ +module CheckDistribution + +import Data.Either + +import DistrCheckCommon + +%default total + +g1 : Gen NonEmpty Nat +g1 = oneOf + [ elements [0, 1, 2, 3] + , elements [4, 5] + ] + +g2 : Gen NonEmpty Nat +g2 = elements [10, 11, 12, 13, 14, 15] + +g12 : Gen NonEmpty Nat +g12 = withDeepAlts 2 g1 g2 + +main : IO () +main = printVerdict g12 + [ coverWith 8.3.percent (== 0) + , coverWith 8.3.percent (== 1) + , coverWith 8.3.percent (== 2) + , coverWith 8.3.percent (== 3) + , coverWith 8.3.percent (== 4) + , coverWith 8.3.percent (== 5) + , coverWith 8.3.percent (== 10) + , coverWith 8.3.percent (== 11) + , coverWith 8.3.percent (== 12) + , coverWith 8.3.percent (== 13) + , coverWith 8.3.percent (== 14) + , coverWith 8.3.percent (== 15) + ] diff --git a/tests/lib/distribution/with-alts-deep-001/DistrCheckCommon.idr b/tests/lib/distribution/with-alts-deep-001/DistrCheckCommon.idr new file mode 120000 index 000000000..97b34ad55 --- /dev/null +++ b/tests/lib/distribution/with-alts-deep-001/DistrCheckCommon.idr @@ -0,0 +1 @@ +../_common/DistrCheckCommon.idr \ No newline at end of file diff --git a/tests/lib/distribution/with-alts-deep-001/expected b/tests/lib/distribution/with-alts-deep-001/expected new file mode 100644 index 000000000..672c4e48d --- /dev/null +++ b/tests/lib/distribution/with-alts-deep-001/expected @@ -0,0 +1 @@ +Just [ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok] diff --git a/tests/lib/distribution/with-alts-deep-001/run b/tests/lib/distribution/with-alts-deep-001/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/lib/distribution/with-alts-deep-001/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/lib/distribution/with-alts-deep-001/test.ipkg b/tests/lib/distribution/with-alts-deep-001/test.ipkg new file mode 120000 index 000000000..7297aae9f --- /dev/null +++ b/tests/lib/distribution/with-alts-deep-001/test.ipkg @@ -0,0 +1 @@ +../_common/test.ipkg \ No newline at end of file diff --git a/tests/lib/distribution/with-alts-shallow-001/CheckDistribution.idr b/tests/lib/distribution/with-alts-shallow-001/CheckDistribution.idr new file mode 100644 index 000000000..d19c4605e --- /dev/null +++ b/tests/lib/distribution/with-alts-shallow-001/CheckDistribution.idr @@ -0,0 +1,37 @@ +module CheckDistribution + +import Data.Either + +import DistrCheckCommon + +%default total + +g1 : Gen NonEmpty Nat +g1 = oneOf + [ elements [0, 1, 2, 3] + , elements [4, 5] + ] + +g2 : Gen NonEmpty Nat +g2 = elements [10, 11, 12, 13, 14, 15] + +g12 : Gen NonEmpty Nat +g12 = g1 `withAlts` g2 + +main : IO () +main = printVerdict g12 + [ coverWith 3.125.percent (== 0) + , coverWith 3.125.percent (== 1) + , coverWith 3.125.percent (== 2) + , coverWith 3.125.percent (== 3) + + , coverWith 6.25.percent (== 4) + , coverWith 6.25.percent (== 5) + + , coverWith 12.5.percent (== 10) + , coverWith 12.5.percent (== 11) + , coverWith 12.5.percent (== 12) + , coverWith 12.5.percent (== 13) + , coverWith 12.5.percent (== 14) + , coverWith 12.5.percent (== 15) + ] diff --git a/tests/lib/distribution/with-alts-shallow-001/DistrCheckCommon.idr b/tests/lib/distribution/with-alts-shallow-001/DistrCheckCommon.idr new file mode 120000 index 000000000..97b34ad55 --- /dev/null +++ b/tests/lib/distribution/with-alts-shallow-001/DistrCheckCommon.idr @@ -0,0 +1 @@ +../_common/DistrCheckCommon.idr \ No newline at end of file diff --git a/tests/lib/distribution/with-alts-shallow-001/expected b/tests/lib/distribution/with-alts-shallow-001/expected new file mode 100644 index 000000000..672c4e48d --- /dev/null +++ b/tests/lib/distribution/with-alts-shallow-001/expected @@ -0,0 +1 @@ +Just [ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok] diff --git a/tests/lib/distribution/with-alts-shallow-001/run b/tests/lib/distribution/with-alts-shallow-001/run new file mode 120000 index 000000000..805165988 --- /dev/null +++ b/tests/lib/distribution/with-alts-shallow-001/run @@ -0,0 +1 @@ +../_common/run \ No newline at end of file diff --git a/tests/lib/distribution/with-alts-shallow-001/test.ipkg b/tests/lib/distribution/with-alts-shallow-001/test.ipkg new file mode 120000 index 000000000..7297aae9f --- /dev/null +++ b/tests/lib/distribution/with-alts-shallow-001/test.ipkg @@ -0,0 +1 @@ +../_common/test.ipkg \ No newline at end of file diff --git a/tests/lib/gen-monad/pick-001/UseGen.idr b/tests/lib/gen-monad/pick-001/UseGen.idr new file mode 100644 index 000000000..4debe9caf --- /dev/null +++ b/tests/lib/gen-monad/pick-001/UseGen.idr @@ -0,0 +1,17 @@ +module UseGen + +import Test.DepTyCheck.Gen + +import System.Random.Pure.StdGen + +%default total + +gen : Gen MaybeEmpty (Nat, Nat) +gen = do + a <- elements [1 .. 100] + b <- elements [1 .. 100] + if a == b then pure () else empty + pure (a, b) + +main : IO Unit +main = printLn . map (\(a, b) => a == b) =<< pick gen diff --git a/tests/lib/gen-monad/pick-001/expected b/tests/lib/gen-monad/pick-001/expected new file mode 100644 index 000000000..3e69f58e1 --- /dev/null +++ b/tests/lib/gen-monad/pick-001/expected @@ -0,0 +1 @@ +Just True diff --git a/tests/lib/gen-monad/pick-001/run b/tests/lib/gen-monad/pick-001/run new file mode 100755 index 000000000..55f2037b5 --- /dev/null +++ b/tests/lib/gen-monad/pick-001/run @@ -0,0 +1,6 @@ +rm -rf build + +flock "$1" pack -q install-deps use-gen.ipkg && \ +pack exec UseGen.idr + +rm -rf build diff --git a/tests/lib/gen-monad/pick-001/use-gen.ipkg b/tests/lib/gen-monad/pick-001/use-gen.ipkg new file mode 100644 index 000000000..d71bc8f30 --- /dev/null +++ b/tests/lib/gen-monad/pick-001/use-gen.ipkg @@ -0,0 +1,8 @@ +package dummy + +authors = "Denis Buzdalov" + +main = UseGen +executable = use-gen + +depends = deptycheck diff --git a/tests/lib/john-hughes/rgen-001/UseGen.idr b/tests/lib/john-hughes/rgen-001/UseGen.idr new file mode 100644 index 000000000..a87b84188 --- /dev/null +++ b/tests/lib/john-hughes/rgen-001/UseGen.idr @@ -0,0 +1,25 @@ +module UseGen + +import Data.List.Lazy + +import Test.DepTyCheck.Gen + +import System.Random.Pure.StdGen + +%default total + +%cg chez lazy=weakMemo + +fun : Gen0 $ List Int +fun = do + let nums = elements [1 .. 100] + a <- nums + b <- nums + c <- nums + d <- nums + e <- nums + f <- nums + pure [a, b, c, d, e, f] + +main : IO Unit +main = Lazy.traverse_ printLn $ unGenTryN 10 someStdGen fun diff --git a/tests/lib/john-hughes/rgen-001/expected b/tests/lib/john-hughes/rgen-001/expected new file mode 100644 index 000000000..db414ea77 --- /dev/null +++ b/tests/lib/john-hughes/rgen-001/expected @@ -0,0 +1,10 @@ +[2, 73, 21, 57, 6, 66] +[68, 94, 42, 45, 8, 25] +[75, 58, 86, 80, 74, 38] +[33, 69, 37, 18, 1, 21] +[99, 74, 42, 24, 41, 48] +[46, 64, 2, 60, 35, 72] +[75, 54, 46, 85, 76, 35] +[75, 39, 3, 51, 15, 78] +[14, 87, 51, 33, 19, 80] +[42, 21, 20, 56, 99, 29] diff --git a/tests/lib/john-hughes/rgen-001/run b/tests/lib/john-hughes/rgen-001/run new file mode 100755 index 000000000..55f2037b5 --- /dev/null +++ b/tests/lib/john-hughes/rgen-001/run @@ -0,0 +1,6 @@ +rm -rf build + +flock "$1" pack -q install-deps use-gen.ipkg && \ +pack exec UseGen.idr + +rm -rf build diff --git a/tests/lib/john-hughes/rgen-001/use-gen.ipkg b/tests/lib/john-hughes/rgen-001/use-gen.ipkg new file mode 100644 index 000000000..7735f2ddb --- /dev/null +++ b/tests/lib/john-hughes/rgen-001/use-gen.ipkg @@ -0,0 +1,6 @@ +package test + +main = UseGen +executable = use-gen + +depends = deptycheck diff --git a/tests/lib/john-hughes/rgen-002/UseGen.idr b/tests/lib/john-hughes/rgen-002/UseGen.idr new file mode 100644 index 000000000..18ab33b6f --- /dev/null +++ b/tests/lib/john-hughes/rgen-002/UseGen.idr @@ -0,0 +1,30 @@ +module UseGen + +import Data.List.Lazy + +import Test.DepTyCheck.Gen + +import System.Random.Pure.StdGen + +%default total + +%cg chez lazy=weakMemo + +guard : Bool -> Gen0 () +guard True = pure () +guard False = empty + +fun : Gen0 $ List Int +fun = do + let nums = elements [1 .. 100] + a <- nums + b <- nums + c <- nums + d <- nums + e <- nums + f <- nums + guard $ a == f + pure [a, b, c, d, e, f] + +main : IO Unit +main = Lazy.traverse_ printLn $ unGenTryN 10 someStdGen fun diff --git a/tests/lib/john-hughes/rgen-002/expected b/tests/lib/john-hughes/rgen-002/expected new file mode 100644 index 000000000..a63c4778e --- /dev/null +++ b/tests/lib/john-hughes/rgen-002/expected @@ -0,0 +1,10 @@ +[2, 73, 21, 57, 6, 2] +[68, 94, 42, 45, 8, 68] +[75, 58, 86, 80, 74, 75] +[33, 69, 37, 18, 1, 33] +[99, 74, 42, 24, 41, 99] +[46, 64, 2, 60, 35, 46] +[75, 54, 46, 85, 76, 75] +[75, 39, 3, 51, 15, 75] +[14, 87, 51, 33, 19, 14] +[80, 42, 21, 20, 56, 80] diff --git a/tests/lib/john-hughes/rgen-002/run b/tests/lib/john-hughes/rgen-002/run new file mode 100755 index 000000000..55f2037b5 --- /dev/null +++ b/tests/lib/john-hughes/rgen-002/run @@ -0,0 +1,6 @@ +rm -rf build + +flock "$1" pack -q install-deps use-gen.ipkg && \ +pack exec UseGen.idr + +rm -rf build diff --git a/tests/lib/john-hughes/rgen-002/use-gen.ipkg b/tests/lib/john-hughes/rgen-002/use-gen.ipkg new file mode 100644 index 000000000..7735f2ddb --- /dev/null +++ b/tests/lib/john-hughes/rgen-002/use-gen.ipkg @@ -0,0 +1,6 @@ +package test + +main = UseGen +executable = use-gen + +depends = deptycheck diff --git a/tests/lib/john-hughes/rgen-003/UseGen.idr b/tests/lib/john-hughes/rgen-003/UseGen.idr new file mode 100644 index 000000000..7d585192d --- /dev/null +++ b/tests/lib/john-hughes/rgen-003/UseGen.idr @@ -0,0 +1,31 @@ +module UseGen + +import Data.List.Lazy + +import Test.DepTyCheck.Gen + +import System.Random.Pure.StdGen + +%default total + +%cg chez lazy=weakMemo + +guard : Bool -> Gen0 () +guard True = pure () +guard False = empty + +fun : Gen0 $ List Int +fun = do + let nums = elements [1 .. 100] + a <- nums + b <- nums + c <- nums + d <- nums + e <- nums + f <- nums + guard $ a == f + guard $ b == e + pure [a, b, c, d, e, f] + +main : IO Unit +main = Lazy.traverse_ printLn $ unGenTryN 10 someStdGen fun diff --git a/tests/lib/john-hughes/rgen-003/expected b/tests/lib/john-hughes/rgen-003/expected new file mode 100644 index 000000000..42e4daf8a --- /dev/null +++ b/tests/lib/john-hughes/rgen-003/expected @@ -0,0 +1,10 @@ +[2, 73, 21, 57, 73, 2] +[68, 94, 42, 45, 94, 68] +[75, 58, 86, 80, 58, 75] +[33, 69, 37, 18, 69, 33] +[99, 74, 42, 24, 74, 99] +[41, 48, 46, 64, 48, 41] +[60, 35, 72, 75, 35, 60] +[85, 76, 35, 75, 76, 85] +[51, 15, 78, 14, 15, 51] +[33, 19, 80, 42, 19, 33] diff --git a/tests/lib/john-hughes/rgen-003/run b/tests/lib/john-hughes/rgen-003/run new file mode 100755 index 000000000..55f2037b5 --- /dev/null +++ b/tests/lib/john-hughes/rgen-003/run @@ -0,0 +1,6 @@ +rm -rf build + +flock "$1" pack -q install-deps use-gen.ipkg && \ +pack exec UseGen.idr + +rm -rf build diff --git a/tests/lib/john-hughes/rgen-003/use-gen.ipkg b/tests/lib/john-hughes/rgen-003/use-gen.ipkg new file mode 100644 index 000000000..7735f2ddb --- /dev/null +++ b/tests/lib/john-hughes/rgen-003/use-gen.ipkg @@ -0,0 +1,6 @@ +package test + +main = UseGen +executable = use-gen + +depends = deptycheck diff --git a/tests/lib/john-hughes/rgen-004/UseGen.idr b/tests/lib/john-hughes/rgen-004/UseGen.idr new file mode 100644 index 000000000..4a609a0ca --- /dev/null +++ b/tests/lib/john-hughes/rgen-004/UseGen.idr @@ -0,0 +1,32 @@ +module UseGen + +import Data.List.Lazy + +import Test.DepTyCheck.Gen + +import System.Random.Pure.StdGen + +%default total + +%cg chez lazy=weakMemo + +guard : Bool -> Gen0 () +guard True = pure () +guard False = empty + +fun : Gen0 $ List Int +fun = do + let nums = elements [1 .. 100] + a <- nums + b <- nums + c <- nums + d <- nums + e <- nums + f <- nums + guard $ a == f + guard $ b == e + guard $ c == d + pure [a, b, c, d, e, f] + +main : IO Unit +main = Lazy.traverse_ printLn $ unGenTryN 10 someStdGen fun diff --git a/tests/lib/john-hughes/rgen-004/expected b/tests/lib/john-hughes/rgen-004/expected new file mode 100644 index 000000000..50e323cfd --- /dev/null +++ b/tests/lib/john-hughes/rgen-004/expected @@ -0,0 +1,10 @@ +[2, 73, 21, 21, 73, 2] +[66, 68, 94, 94, 68, 66] +[8, 25, 75, 75, 25, 8] +[74, 38, 33, 33, 38, 74] +[18, 1, 21, 21, 1, 18] +[42, 24, 41, 41, 24, 42] +[64, 2, 60, 60, 2, 64] +[75, 54, 46, 46, 54, 75] +[76, 35, 75, 75, 35, 76] +[15, 78, 14, 14, 78, 15] diff --git a/tests/lib/john-hughes/rgen-004/run b/tests/lib/john-hughes/rgen-004/run new file mode 100755 index 000000000..55f2037b5 --- /dev/null +++ b/tests/lib/john-hughes/rgen-004/run @@ -0,0 +1,6 @@ +rm -rf build + +flock "$1" pack -q install-deps use-gen.ipkg && \ +pack exec UseGen.idr + +rm -rf build diff --git a/tests/lib/john-hughes/rgen-004/use-gen.ipkg b/tests/lib/john-hughes/rgen-004/use-gen.ipkg new file mode 100644 index 000000000..7735f2ddb --- /dev/null +++ b/tests/lib/john-hughes/rgen-004/use-gen.ipkg @@ -0,0 +1,6 @@ +package test + +main = UseGen +executable = use-gen + +depends = deptycheck diff --git a/tests/lib/john-hughes/rgen-005/UseGen.idr b/tests/lib/john-hughes/rgen-005/UseGen.idr new file mode 100644 index 000000000..e0bf943d9 --- /dev/null +++ b/tests/lib/john-hughes/rgen-005/UseGen.idr @@ -0,0 +1,30 @@ +module UseGen + +import Data.List.Lazy + +import Test.DepTyCheck.Gen + +import System.Random.Pure.StdGen + +%default total + +%cg chez lazy=weakMemo + +guard : Bool -> Gen0 () +guard True = pure () +guard False = empty + +fun : Gen0 $ List Int +fun = do + let nums = elements [1 .. 100] + a <- nums + b <- nums + c <- nums + d <- nums + e <- nums + f <- nums + guard $ a == f && b == e && c == d + pure [a, b, c, d, e, f] + +main : IO Unit +main = Lazy.traverse_ printLn $ unGenTryN 10 someStdGen fun diff --git a/tests/lib/john-hughes/rgen-005/expected b/tests/lib/john-hughes/rgen-005/expected new file mode 100644 index 000000000..50e323cfd --- /dev/null +++ b/tests/lib/john-hughes/rgen-005/expected @@ -0,0 +1,10 @@ +[2, 73, 21, 21, 73, 2] +[66, 68, 94, 94, 68, 66] +[8, 25, 75, 75, 25, 8] +[74, 38, 33, 33, 38, 74] +[18, 1, 21, 21, 1, 18] +[42, 24, 41, 41, 24, 42] +[64, 2, 60, 60, 2, 64] +[75, 54, 46, 46, 54, 75] +[76, 35, 75, 75, 35, 76] +[15, 78, 14, 14, 78, 15] diff --git a/tests/lib/john-hughes/rgen-005/run b/tests/lib/john-hughes/rgen-005/run new file mode 100755 index 000000000..55f2037b5 --- /dev/null +++ b/tests/lib/john-hughes/rgen-005/run @@ -0,0 +1,6 @@ +rm -rf build + +flock "$1" pack -q install-deps use-gen.ipkg && \ +pack exec UseGen.idr + +rm -rf build diff --git a/tests/lib/john-hughes/rgen-005/use-gen.ipkg b/tests/lib/john-hughes/rgen-005/use-gen.ipkg new file mode 100644 index 000000000..7735f2ddb --- /dev/null +++ b/tests/lib/john-hughes/rgen-005/use-gen.ipkg @@ -0,0 +1,6 @@ +package test + +main = UseGen +executable = use-gen + +depends = deptycheck diff --git a/tests/lib/john-hughes/rgen-006/UseGen.idr b/tests/lib/john-hughes/rgen-006/UseGen.idr new file mode 100644 index 000000000..f727b4710 --- /dev/null +++ b/tests/lib/john-hughes/rgen-006/UseGen.idr @@ -0,0 +1,33 @@ +module UseGen + +import Data.List.Lazy + +import Test.DepTyCheck.Gen + +import System.Random.Pure.StdGen + +%default total + +%cg chez lazy=weakMemo + +guard : Bool -> Gen0 () +guard True = pure () +guard False = empty + +fun : Gen0 $ List Int +fun = do + let nums = elements [1 .. 100] + a <- nums + b <- nums + c <- nums + d <- nums + e <- nums + f <- nums + guard $ a == f + guard $ b == e + guard $ c == d + guard $ c == 2 + pure [a, b, c, d, e, f] + +main : IO Unit +main = Lazy.traverse_ printLn $ unGenTryN 10 someStdGen fun diff --git a/tests/lib/john-hughes/rgen-006/expected b/tests/lib/john-hughes/rgen-006/expected new file mode 100644 index 000000000..988ae4adc --- /dev/null +++ b/tests/lib/john-hughes/rgen-006/expected @@ -0,0 +1,10 @@ +[2, 73, 2, 2, 73, 2] +[66, 68, 2, 2, 68, 66] +[45, 8, 2, 2, 8, 45] +[80, 74, 2, 2, 74, 80] +[18, 1, 2, 2, 1, 18] +[42, 24, 2, 2, 24, 42] +[46, 64, 2, 2, 64, 46] +[72, 75, 2, 2, 75, 72] +[76, 35, 2, 2, 35, 76] +[15, 78, 2, 2, 78, 15] diff --git a/tests/lib/john-hughes/rgen-006/run b/tests/lib/john-hughes/rgen-006/run new file mode 100755 index 000000000..55f2037b5 --- /dev/null +++ b/tests/lib/john-hughes/rgen-006/run @@ -0,0 +1,6 @@ +rm -rf build + +flock "$1" pack -q install-deps use-gen.ipkg && \ +pack exec UseGen.idr + +rm -rf build diff --git a/tests/lib/john-hughes/rgen-006/use-gen.ipkg b/tests/lib/john-hughes/rgen-006/use-gen.ipkg new file mode 100644 index 000000000..7735f2ddb --- /dev/null +++ b/tests/lib/john-hughes/rgen-006/use-gen.ipkg @@ -0,0 +1,6 @@ +package test + +main = UseGen +executable = use-gen + +depends = deptycheck diff --git a/tests/lib/john-hughes/rgen-007/UseGen.idr b/tests/lib/john-hughes/rgen-007/UseGen.idr new file mode 100644 index 000000000..084169833 --- /dev/null +++ b/tests/lib/john-hughes/rgen-007/UseGen.idr @@ -0,0 +1,30 @@ +module UseGen + +import Data.List.Lazy + +import Test.DepTyCheck.Gen + +import System.Random.Pure.StdGen + +%default total + +%cg chez lazy=weakMemo + +guard : Bool -> Gen0 () +guard True = pure () +guard False = empty + +fun : Gen0 $ List Int +fun = do + let nums = elements [1 .. 100] + a <- nums + b <- nums + c <- nums + d <- nums + e <- nums + f <- nums + guard $ a == f && b == e && c == d && c == 2 + pure [a, b, c, d, e, f] + +main : IO Unit +main = Lazy.traverse_ printLn $ unGenTryN 10 someStdGen fun diff --git a/tests/lib/john-hughes/rgen-007/expected b/tests/lib/john-hughes/rgen-007/expected new file mode 100644 index 000000000..988ae4adc --- /dev/null +++ b/tests/lib/john-hughes/rgen-007/expected @@ -0,0 +1,10 @@ +[2, 73, 2, 2, 73, 2] +[66, 68, 2, 2, 68, 66] +[45, 8, 2, 2, 8, 45] +[80, 74, 2, 2, 74, 80] +[18, 1, 2, 2, 1, 18] +[42, 24, 2, 2, 24, 42] +[46, 64, 2, 2, 64, 46] +[72, 75, 2, 2, 75, 72] +[76, 35, 2, 2, 35, 76] +[15, 78, 2, 2, 78, 15] diff --git a/tests/lib/john-hughes/rgen-007/run b/tests/lib/john-hughes/rgen-007/run new file mode 100755 index 000000000..55f2037b5 --- /dev/null +++ b/tests/lib/john-hughes/rgen-007/run @@ -0,0 +1,6 @@ +rm -rf build + +flock "$1" pack -q install-deps use-gen.ipkg && \ +pack exec UseGen.idr + +rm -rf build diff --git a/tests/lib/john-hughes/rgen-007/use-gen.ipkg b/tests/lib/john-hughes/rgen-007/use-gen.ipkg new file mode 100644 index 000000000..7735f2ddb --- /dev/null +++ b/tests/lib/john-hughes/rgen-007/use-gen.ipkg @@ -0,0 +1,6 @@ +package test + +main = UseGen +executable = use-gen + +depends = deptycheck diff --git a/tests/lib/john-hughes/rgen-008/UseGen.idr b/tests/lib/john-hughes/rgen-008/UseGen.idr new file mode 100644 index 000000000..09c8d7246 --- /dev/null +++ b/tests/lib/john-hughes/rgen-008/UseGen.idr @@ -0,0 +1,32 @@ +module UseGen + +import Data.List.Lazy + +import Test.DepTyCheck.Gen + +import System.Random.Pure.StdGen + +%default total + +%cg chez lazy=weakMemo + +guard : Bool -> Gen0 () +guard True = pure () +guard False = empty + +fun : Gen0 $ List Int +fun = do + let nums = elements [1 .. 100] + a <- nums + b <- nums + c <- nums + d <- nums + e <- nums + f <- nums + guard $ c == f + guard $ c == e + guard $ c == d + pure [a, b, c, d, e, f] + +main : IO Unit +main = Lazy.traverse_ printLn $ unGenTryN 10 someStdGen fun diff --git a/tests/lib/john-hughes/rgen-008/expected b/tests/lib/john-hughes/rgen-008/expected new file mode 100644 index 000000000..4fa6241ef --- /dev/null +++ b/tests/lib/john-hughes/rgen-008/expected @@ -0,0 +1,10 @@ +[2, 73, 21, 21, 21, 21] +[66, 68, 94, 94, 94, 94] +[8, 25, 75, 75, 75, 75] +[74, 38, 33, 33, 33, 33] +[18, 1, 21, 21, 21, 21] +[42, 24, 41, 41, 41, 41] +[64, 2, 60, 60, 60, 60] +[75, 54, 46, 46, 46, 46] +[76, 35, 75, 75, 75, 75] +[15, 78, 14, 14, 14, 14] diff --git a/tests/lib/john-hughes/rgen-008/run b/tests/lib/john-hughes/rgen-008/run new file mode 100755 index 000000000..55f2037b5 --- /dev/null +++ b/tests/lib/john-hughes/rgen-008/run @@ -0,0 +1,6 @@ +rm -rf build + +flock "$1" pack -q install-deps use-gen.ipkg && \ +pack exec UseGen.idr + +rm -rf build diff --git a/tests/lib/john-hughes/rgen-008/use-gen.ipkg b/tests/lib/john-hughes/rgen-008/use-gen.ipkg new file mode 100644 index 000000000..7735f2ddb --- /dev/null +++ b/tests/lib/john-hughes/rgen-008/use-gen.ipkg @@ -0,0 +1,6 @@ +package test + +main = UseGen +executable = use-gen + +depends = deptycheck diff --git a/tests/lib/john-hughes/rgen-009/UseGen.idr b/tests/lib/john-hughes/rgen-009/UseGen.idr new file mode 100644 index 000000000..076f0cfba --- /dev/null +++ b/tests/lib/john-hughes/rgen-009/UseGen.idr @@ -0,0 +1,32 @@ +module UseGen + +import Data.List.Lazy + +import Test.DepTyCheck.Gen + +import System.Random.Pure.StdGen + +%default total + +%cg chez lazy=weakMemo + +guard : Bool -> Gen0 () +guard True = pure () +guard False = empty + +fun : Gen0 $ List Int +fun = do + let nums = elements [1 .. 100] + a <- nums + b <- nums + c <- nums + d <- nums + e <- nums + f <- nums + guard $ b == f + guard $ b == e + guard $ b == d + pure [a, b, c, d, e, f] + +main : IO Unit +main = Lazy.traverse_ printLn $ unGenTryN 10 someStdGen fun diff --git a/tests/lib/john-hughes/rgen-009/expected b/tests/lib/john-hughes/rgen-009/expected new file mode 100644 index 000000000..165b29aa4 --- /dev/null +++ b/tests/lib/john-hughes/rgen-009/expected @@ -0,0 +1,10 @@ +[2, 73, 21, 73, 73, 73] +[66, 68, 94, 68, 68, 68] +[8, 25, 75, 25, 25, 25] +[74, 38, 33, 38, 38, 38] +[18, 1, 21, 1, 1, 1] +[42, 24, 41, 24, 24, 24] +[64, 2, 60, 2, 2, 2] +[75, 54, 46, 54, 54, 54] +[76, 35, 75, 35, 35, 35] +[15, 78, 14, 78, 78, 78] diff --git a/tests/lib/john-hughes/rgen-009/run b/tests/lib/john-hughes/rgen-009/run new file mode 100755 index 000000000..55f2037b5 --- /dev/null +++ b/tests/lib/john-hughes/rgen-009/run @@ -0,0 +1,6 @@ +rm -rf build + +flock "$1" pack -q install-deps use-gen.ipkg && \ +pack exec UseGen.idr + +rm -rf build diff --git a/tests/lib/john-hughes/rgen-009/use-gen.ipkg b/tests/lib/john-hughes/rgen-009/use-gen.ipkg new file mode 100644 index 000000000..7735f2ddb --- /dev/null +++ b/tests/lib/john-hughes/rgen-009/use-gen.ipkg @@ -0,0 +1,6 @@ +package test + +main = UseGen +executable = use-gen + +depends = deptycheck diff --git a/tests/lib/john-hughes/rgen-010/UseGen.idr b/tests/lib/john-hughes/rgen-010/UseGen.idr new file mode 100644 index 000000000..c0d8c7fdf --- /dev/null +++ b/tests/lib/john-hughes/rgen-010/UseGen.idr @@ -0,0 +1,32 @@ +module UseGen + +import Data.List.Lazy + +import Test.DepTyCheck.Gen + +import System.Random.Pure.StdGen + +%default total + +%cg chez lazy=weakMemo + +guard : Bool -> Gen0 () +guard True = pure () +guard False = empty + +fun : Gen0 $ List Int +fun = do + let nums = elements [1 .. 100] + a <- nums + b <- nums + c <- nums + d <- nums + guard $ b == d + e <- nums + guard $ b == e + f <- nums + guard $ b == f + pure [a, b, c, d, e, f] + +main : IO Unit +main = Lazy.traverse_ printLn $ unGenTryN 10 someStdGen fun diff --git a/tests/lib/john-hughes/rgen-010/expected b/tests/lib/john-hughes/rgen-010/expected new file mode 100644 index 000000000..165b29aa4 --- /dev/null +++ b/tests/lib/john-hughes/rgen-010/expected @@ -0,0 +1,10 @@ +[2, 73, 21, 73, 73, 73] +[66, 68, 94, 68, 68, 68] +[8, 25, 75, 25, 25, 25] +[74, 38, 33, 38, 38, 38] +[18, 1, 21, 1, 1, 1] +[42, 24, 41, 24, 24, 24] +[64, 2, 60, 2, 2, 2] +[75, 54, 46, 54, 54, 54] +[76, 35, 75, 35, 35, 35] +[15, 78, 14, 78, 78, 78] diff --git a/tests/lib/john-hughes/rgen-010/run b/tests/lib/john-hughes/rgen-010/run new file mode 100755 index 000000000..55f2037b5 --- /dev/null +++ b/tests/lib/john-hughes/rgen-010/run @@ -0,0 +1,6 @@ +rm -rf build + +flock "$1" pack -q install-deps use-gen.ipkg && \ +pack exec UseGen.idr + +rm -rf build diff --git a/tests/lib/john-hughes/rgen-010/use-gen.ipkg b/tests/lib/john-hughes/rgen-010/use-gen.ipkg new file mode 100644 index 000000000..7735f2ddb --- /dev/null +++ b/tests/lib/john-hughes/rgen-010/use-gen.ipkg @@ -0,0 +1,6 @@ +package test + +main = UseGen +executable = use-gen + +depends = deptycheck diff --git a/tests/lib/john-hughes/rgen-011/UseGen.idr b/tests/lib/john-hughes/rgen-011/UseGen.idr new file mode 100644 index 000000000..e691626f3 --- /dev/null +++ b/tests/lib/john-hughes/rgen-011/UseGen.idr @@ -0,0 +1,32 @@ +module UseGen + +import Data.List.Lazy + +import Test.DepTyCheck.Gen + +import System.Random.Pure.StdGen + +%default total + +%cg chez lazy=weakMemo + +guard : Bool -> Gen0 () +guard True = pure () +guard False = empty + +fun : Gen0 $ List Int +fun = do + let nums = elements [1 .. 100] + a <- nums + b <- nums + c <- nums + d <- nums + e <- nums + f <- nums + guard $ a == f + guard $ a == e + guard $ a == d + pure [a, b, c, d, e, f] + +main : IO Unit +main = Lazy.traverse_ printLn $ unGenTryN 10 someStdGen fun diff --git a/tests/lib/john-hughes/rgen-011/expected b/tests/lib/john-hughes/rgen-011/expected new file mode 100644 index 000000000..c91b13303 --- /dev/null +++ b/tests/lib/john-hughes/rgen-011/expected @@ -0,0 +1,10 @@ +[2, 73, 21, 2, 2, 2] +[66, 68, 94, 66, 66, 66] +[8, 25, 75, 8, 8, 8] +[74, 38, 33, 74, 74, 74] +[18, 1, 21, 18, 18, 18] +[42, 24, 41, 42, 42, 42] +[64, 2, 60, 64, 64, 64] +[75, 54, 46, 75, 75, 75] +[76, 35, 75, 76, 76, 76] +[15, 78, 14, 15, 15, 15] diff --git a/tests/lib/john-hughes/rgen-011/run b/tests/lib/john-hughes/rgen-011/run new file mode 100755 index 000000000..55f2037b5 --- /dev/null +++ b/tests/lib/john-hughes/rgen-011/run @@ -0,0 +1,6 @@ +rm -rf build + +flock "$1" pack -q install-deps use-gen.ipkg && \ +pack exec UseGen.idr + +rm -rf build diff --git a/tests/lib/john-hughes/rgen-011/use-gen.ipkg b/tests/lib/john-hughes/rgen-011/use-gen.ipkg new file mode 100644 index 000000000..7735f2ddb --- /dev/null +++ b/tests/lib/john-hughes/rgen-011/use-gen.ipkg @@ -0,0 +1,6 @@ +package test + +main = UseGen +executable = use-gen + +depends = deptycheck diff --git a/tests/lib/john-hughes/rgen-012/UseGen.idr b/tests/lib/john-hughes/rgen-012/UseGen.idr new file mode 100644 index 000000000..08821e4ce --- /dev/null +++ b/tests/lib/john-hughes/rgen-012/UseGen.idr @@ -0,0 +1,34 @@ +module UseGen + +import Data.List.Lazy + +import Test.DepTyCheck.Gen + +import System.Random.Pure.StdGen + +%default total + +%cg chez lazy=weakMemo + +guard : Bool -> Gen0 () +guard True = pure () +guard False = empty + +fun : Gen0 $ List Int +fun = do + let nums = elements [1 .. 100] + a <- nums + b <- nums + guard $ a == b + c <- nums + guard $ a == c + d <- nums + guard $ a == d + e <- nums + guard $ a == e + f <- nums + guard $ a == f + pure [a, b, c, d, e, f] + +main : IO Unit +main = Lazy.traverse_ printLn $ unGenTryN 10 someStdGen fun diff --git a/tests/lib/john-hughes/rgen-012/expected b/tests/lib/john-hughes/rgen-012/expected new file mode 100644 index 000000000..4f201218b --- /dev/null +++ b/tests/lib/john-hughes/rgen-012/expected @@ -0,0 +1,10 @@ +[2, 2, 2, 2, 2, 2] +[66, 66, 66, 66, 66, 66] +[42, 42, 42, 42, 42, 42] +[58, 58, 58, 58, 58, 58] +[69, 69, 69, 69, 69, 69] +[21, 21, 21, 21, 21, 21] +[41, 41, 41, 41, 41, 41] +[2, 2, 2, 2, 2, 2] +[54, 54, 54, 54, 54, 54] +[35, 35, 35, 35, 35, 35] diff --git a/tests/lib/john-hughes/rgen-012/run b/tests/lib/john-hughes/rgen-012/run new file mode 100755 index 000000000..55f2037b5 --- /dev/null +++ b/tests/lib/john-hughes/rgen-012/run @@ -0,0 +1,6 @@ +rm -rf build + +flock "$1" pack -q install-deps use-gen.ipkg && \ +pack exec UseGen.idr + +rm -rf build diff --git a/tests/lib/john-hughes/rgen-012/use-gen.ipkg b/tests/lib/john-hughes/rgen-012/use-gen.ipkg new file mode 100644 index 000000000..7735f2ddb --- /dev/null +++ b/tests/lib/john-hughes/rgen-012/use-gen.ipkg @@ -0,0 +1,6 @@ +package test + +main = UseGen +executable = use-gen + +depends = deptycheck