Repository : ssh://darcs.haskell.org//srv/darcs/testsuite On branch : master
http://hackage.haskell.org/trac/ghc/changeset/f3e37875f4a7c7bf5a4df78217ae99d5bae36135 >--------------------------------------------------------------- commit f3e37875f4a7c7bf5a4df78217ae99d5bae36135 Author: Simon Peyton Jones <simo...@microsoft.com> Date: Fri Jan 4 10:40:17 2013 +0000 Test Trac #2431 >--------------------------------------------------------------- tests/deSugar/should_compile/T2431.hs | 8 ++++++++ tests/deSugar/should_compile/T2431.stderr | 23 +++++++++++++++++++++++ tests/deSugar/should_compile/all.T | 1 + 3 files changed, 32 insertions(+), 0 deletions(-) diff --git a/tests/deSugar/should_compile/T2431.hs b/tests/deSugar/should_compile/T2431.hs new file mode 100644 index 0000000..57c0a1f --- /dev/null +++ b/tests/deSugar/should_compile/T2431.hs @@ -0,0 +1,8 @@ +{-# LANGUAGE TypeOperators, GADTs, EmptyCase #-} +module T2431 where + +data a :~: b where + Refl :: a :~: a + +absurd :: Int :~: Bool -> a +absurd x = case x of {} diff --git a/tests/deSugar/should_compile/T2431.stderr b/tests/deSugar/should_compile/T2431.stderr new file mode 100644 index 0000000..b338711 --- /dev/null +++ b/tests/deSugar/should_compile/T2431.stderr @@ -0,0 +1,23 @@ + +==================== Tidy Core ==================== +Result size of Tidy Core = {terms: 8, types: 19, coercions: 1} + +T2431.$WRefl [InlPrag=INLINE] :: forall a. a T2431.:~: a +[GblId[DataConWrapper], + Caf=NoCafRefs, + Str=DmdType, + Unf=Unf{Src=InlineStable, TopLvl=True, Arity=0, Value=True, + ConLike=True, WorkFree=True, Expandable=True, + Guidance=ALWAYS_IF(unsat_ok=False,boring_ok=False) + Tmpl= \ (@ a) -> T2431.Refl @ a @ a @~ <a>}] +T2431.$WRefl = \ (@ a) -> T2431.Refl @ a @ a @~ <a> + +T2431.absurd + :: forall a. (GHC.Types.Int T2431.:~: GHC.Types.Bool) -> a +[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType Tb] +T2431.absurd = + \ (@ a) (x :: GHC.Types.Int T2431.:~: GHC.Types.Bool) -> + case x of _ { } + + + diff --git a/tests/deSugar/should_compile/all.T b/tests/deSugar/should_compile/all.T index 51e747f..b932a49 100644 --- a/tests/deSugar/should_compile/all.T +++ b/tests/deSugar/should_compile/all.T @@ -101,3 +101,4 @@ test('T5252Take2', extra_clean(['T5252Take2a.hi', 'T5252Take2a.o']), run_command, ['$MAKE -s --no-print-directory T5252Take2']) +test('T2431', normal, compile, ['-ddump-simpl -dsuppress-uniques']) _______________________________________________ Cvs-ghc mailing list Cvs-ghc@haskell.org http://www.haskell.org/mailman/listinfo/cvs-ghc