Add a bunch more shouldFailWith declarations
commite772547d56ec40f230d912b9790d91413595cb09
authorHarry Garrood <harry@garrood.me>
dateMon 3 Aug 2015, 00:32 (11 years ago)
parente6b74bc
examples/failing/Arrays.purs+3−1
@@ -1,6 +1,8 @@
1−-- @shouldFailWith TypesDoNotUnify
1+-- @shouldFailWith ExprsDoesNotHaveType
22module Main where
33
44import Prelude
55
6+foreign import (!!) :: forall a. Array a -> Int -> a
7+
68test = \arr -> arr !! (0 !! 0)
examples/failing/KindError.purs+1−1
@@ -1,4 +1,4 @@
1−-- @shouldFailWith InvalidKind
1+-- @shouldFailWith KindsDoNotUnify
22module Main where
33
44import Prelude
examples/failing/MissingRecordField.purs+2−1
@@ -1,4 +1,5 @@
1−
1+-- @shouldFailWith TypesDoNotUnify
2+-- TODO: Update type checker to make this fail with PropertyIsMissing instead.
23module MissingRecordField where
34
45import Prelude ((>))
examples/failing/MultipleErrors.purs+4−4
@@ -1,13 +1,13 @@
1−-- @shouldFailWith ExpressionDoesNotHaveType
2−-- @shouldFailWith ExpressionDoesNotHaveType
1+-- @shouldFailWith ExprDoesNotHaveType
2+-- @shouldFailWith ExprDoesNotHaveType
33module MultipleErrors where
44
55import Prelude
66
7−foo :: Number -> Number
7+foo :: Int -> Int
88foo 0 = "Test"
99foo n = bar (n - 1)
1010
11−bar :: Number -> Number
11+bar :: Int -> Int
1212bar 0 = "Test"
1313bar n = foo (n - 1)
examples/failing/MultipleErrors2.purs+2
@@ -1,3 +1,5 @@
1+-- @shouldFailWith UnknownValue
2+-- @shouldFailWith UnknownValue
13module MultipleErrors2 where
24
35import Prelude
examples/failing/OverlappingArguments.purs+1−1
@@ -1,4 +1,4 @@
1−-- @shouldFailWith ??
1+-- @shouldFailWith OverlappingArgNames
22module OverlappingArguments where
33
44import Prelude
examples/failing/OverlappingVars.purs+1
@@ -1,3 +1,4 @@
1+-- @shouldFailWith NoInstanceFound
12module Main where
23
34import Prelude
examples/failing/Rank2Types.purs+1−1
@@ -1,4 +1,4 @@
1−-- @shouldFailWith TypesDoNotUnify
1+-- @shouldFailWith ExprDoesNotHaveType
22module Main where
33
44import Prelude
examples/failing/Reserved.purs+1
@@ -1,3 +1,4 @@
1+-- @shouldFailWith ErrorParsingModule
12module Main where
23
34import Prelude
examples/failing/SkolemEscape2.purs+1
@@ -1,3 +1,4 @@
1+-- @shouldFailWith EscapedSkolem
12module Main where
23
34import Prelude
examples/failing/Superclasses4.purs+1−1
@@ -12,4 +12,4 @@ instance foo2 :: Foo Number
1212test :: forall a. (Foo a) => a -> a
1313test a = a
1414
15−test1 = test 0
15+test1 = test 0.0
examples/failing/TypeSynonyms2.purs+1
@@ -1,3 +1,4 @@
1+-- @shouldFailWith TypeSynonymInstance
12module Main where
23
34import Prelude
examples/failing/TypeSynonyms3.purs+1
@@ -1,3 +1,4 @@
1+-- @shouldFailWith TypeSynonymInstance
12module Main where
23
34import Prelude
examples/failing/TypeSynonyms5.purs+1
@@ -1,3 +1,4 @@
1+-- @shouldFailWith CycleInTypeSynonym
12module Main where
23
34import Prelude
examples/failing/TypeWildcards1.purs+1−1
@@ -1,4 +1,4 @@
1−-- @shouldFailWith ?
1+-- @shouldFailWith ErrorParsingModule
22module TypeWildcards where
33
44import Prelude
examples/failing/TypeWildcards2.purs+1−1
@@ -1,4 +1,4 @@
1−-- @shouldFailWith ?
1+-- @shouldFailWith ErrorParsingModule
22module TypeWildcards where
33
44import Prelude
examples/failing/TypeWildcards3.purs+1
@@ -1,3 +1,4 @@
1+-- @shouldFailWith ErrorParsingModule
12module TypeWildcards where
23
34import Prelude
examples/failing/UnderscoreModuleName.purs+1
@@ -1,3 +1,4 @@
1+-- @shouldFailWith ErrorParsingModule
12module Bad_Module where
23
34import Prelude
examples/failing/UnknownType.purs+1
@@ -1,3 +1,4 @@
1+-- @shouldFailWith UnknownType
12module Main where
23
34import Prelude