diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2012-10-31 09:11:25 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2012-10-31 09:11:25 +0000 |
commit | 2f6b81588a27c85e02e93b2a7d443cc3c52ac907 (patch) | |
tree | 4e60035f6cb340f63055eaad37ba2b7945a21876 | |
parent | 2d44ece059dbabcbc3f55583ceb6e216b2faf505 (diff) | |
download | haskell-2f6b81588a27c85e02e93b2a7d443cc3c52ac907.tar.gz |
Use 'error "uk"' rather than 'undefined'
'error' hsa a magical type with openTypeKind, whereas undefined doesn't
-rw-r--r-- | testsuite/tests/indexed-types/should_compile/Simple14.hs | 6 | ||||
-rw-r--r-- | testsuite/tests/indexed-types/should_fail/T3330a.hs | 4 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_compile/T2683.hs | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/testsuite/tests/indexed-types/should_compile/Simple14.hs b/testsuite/tests/indexed-types/should_compile/Simple14.hs index 16158d9714..dfffbc7c9c 100644 --- a/testsuite/tests/indexed-types/should_compile/Simple14.hs +++ b/testsuite/tests/indexed-types/should_compile/Simple14.hs @@ -5,13 +5,13 @@ module Simple14 where data EQ_ x y = EQ_ eqE :: EQ_ x y -> (x~y => EQ_ z z) -> p -eqE = undefined +eqE = error "eqE" eqI :: EQ_ x x -eqI = undefined +eqI = error "eqI" ntI :: (forall p. EQ_ x y -> p) -> EQ_ x y -ntI = undefined +ntI = error "ntI" foo :: forall m n. EQ_ (Maybe m) (Maybe n) foo = ntI (`eqE` (eqI :: EQ_ m n)) diff --git a/testsuite/tests/indexed-types/should_fail/T3330a.hs b/testsuite/tests/indexed-types/should_fail/T3330a.hs index c13760c6ac..e0b359a6f7 100644 --- a/testsuite/tests/indexed-types/should_fail/T3330a.hs +++ b/testsuite/tests/indexed-types/should_fail/T3330a.hs @@ -19,9 +19,9 @@ children :: s ix -> (PF s) r ix -> [AnyF s] children p x = execWriter (hmapM p collect x) collect :: HFunctor (PF s) => s ix -> r ix -> Writer [AnyF s] (r ix) -collect = undefined +collect = error "collect" hmapM :: (forall ix. phi ix -> r ix -> m (r' ix)) -> phi ix -> f r ix -> m (f r' ix) -hmapM = undefined +hmapM = error "hmapM" diff --git a/testsuite/tests/typecheck/should_compile/T2683.hs b/testsuite/tests/typecheck/should_compile/T2683.hs index c36eaad9bc..07fad170c6 100644 --- a/testsuite/tests/typecheck/should_compile/T2683.hs +++ b/testsuite/tests/typecheck/should_compile/T2683.hs @@ -9,10 +9,10 @@ class Transformer t a | t -> a where data EL a = forall l. EL (l a)
unEL :: EL a -> (forall l. l a -> b) -> b
-unEL = undefined
+unEL = error "unEL"
transform' :: (Transformer t a) => t -> EL a -> EL a
-transform' = undefined
+transform' = error "transform'"
data MultiToggleS ts a = MultiToggleS ts
|