From 6035c7ce362053566938ff521201a5f408301c4c Mon Sep 17 00:00:00 2001 From: simonm Date: Wed, 17 Dec 1997 13:12:26 +0000 Subject: [PATCH] [project @ 1997-12-17 13:12:20 by simonm] add new files for ':::' test. --- ghc/tests/reader/should_compile/MyList.hi | 12 ++++++++++++ ghc/tests/reader/should_compile/read006.hs | 5 +++++ ghc/tests/reader/should_compile/read006.stderr | 13 +++++++++++++ ghc/tests/reader/should_compile/read007.hs | 8 ++++++++ 4 files changed, 38 insertions(+) create mode 100644 ghc/tests/reader/should_compile/MyList.hi create mode 100644 ghc/tests/reader/should_compile/read006.hs create mode 100644 ghc/tests/reader/should_compile/read006.stderr create mode 100644 ghc/tests/reader/should_compile/read006.stdout create mode 100644 ghc/tests/reader/should_compile/read007.hs create mode 100644 ghc/tests/reader/should_compile/read007.stderr diff --git a/ghc/tests/reader/should_compile/MyList.hi b/ghc/tests/reader/should_compile/MyList.hi new file mode 100644 index 0000000..bce90f3 --- /dev/null +++ b/ghc/tests/reader/should_compile/MyList.hi @@ -0,0 +1,12 @@ +_interface_ MyList 1 +_instance_modules_ +Addr ArrBase Foreign IO PrelBounded PrelNum +_usages_ +PrelBase 1 :: $d2 1 $d29 1 $d31 1 $d33 1 $d38 1 Eval 1; +_exports_ +MyList MyList(Empty :::); +_instances_ +instance _forall_ [a] => {PrelBase.Eval (MyList a)} = $d1; +_declarations_ +1 $d1 _:_ _forall_ [a] => {PrelBase.Eval (MyList a)} ;; +1 data MyList a = Empty | ::: (MyList a) (MyList a) ; diff --git a/ghc/tests/reader/should_compile/read006.hs b/ghc/tests/reader/should_compile/read006.hs new file mode 100644 index 0000000..2fda8ca --- /dev/null +++ b/ghc/tests/reader/should_compile/read006.hs @@ -0,0 +1,5 @@ +module MyList (MyList(Empty, (:::))) where + +data MyList a = Empty + | (MyList a) ::: (MyList a) + diff --git a/ghc/tests/reader/should_compile/read006.stderr b/ghc/tests/reader/should_compile/read006.stderr new file mode 100644 index 0000000..a43931d --- /dev/null +++ b/ghc/tests/reader/should_compile/read006.stderr @@ -0,0 +1,13 @@ +Module version unchanged at 1 +_interface_ MyList 1 +_instance_modules_ +Addr ArrBase Foreign IO PrelBounded PrelNum +_usages_ +PrelBase 1 :: $d2 1 $d29 1 $d31 1 $d33 1 $d38 1 Eval 1; +_exports_ +MyList MyList(Empty :::); +_instances_ +instance _forall_ [a] => {PrelBase.Eval (MyList a)} = $d1; +_declarations_ +1 $d1 _:_ _forall_ [a] => {PrelBase.Eval (MyList a)} ;; +1 data MyList a = Empty | ::: (MyList a) (MyList a) ; diff --git a/ghc/tests/reader/should_compile/read006.stdout b/ghc/tests/reader/should_compile/read006.stdout new file mode 100644 index 0000000..e69de29 diff --git a/ghc/tests/reader/should_compile/read007.hs b/ghc/tests/reader/should_compile/read007.hs new file mode 100644 index 0000000..a651883 --- /dev/null +++ b/ghc/tests/reader/should_compile/read007.hs @@ -0,0 +1,8 @@ +module User where + +import MyList + +myLength :: MyList a -> Int +myLength Empty = 0 +myLength (x ::: xs) = 1 + myLength xs + diff --git a/ghc/tests/reader/should_compile/read007.stderr b/ghc/tests/reader/should_compile/read007.stderr new file mode 100644 index 0000000..e69de29 -- 1.7.10.4