git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Add a bunch more shouldFailWith declarations
e772547Harry Garrood
examples/failing/Arrays.purs+3−1
@@ -1,6 +1,8 @@
1−-- @shouldFailWith TypesDoNotUnify
1+-- @shouldFailWith ExprsDoesNotHaveType
2module Main where
2module Main where
3
3
4import Prelude
4import Prelude
5
5
6+foreign import (!!) :: forall a. Array a -> Int -> a
7+
6test = \arr -> arr !! (0 !! 0)
8test = \arr -> arr !! (0 !! 0)
examples/failing/KindError.purs+1−1
@@ -1,4 +1,4 @@
1−-- @shouldFailWith InvalidKind
1+-- @shouldFailWith KindsDoNotUnify
2module Main where
2module Main where
3
3
4import Prelude
4import 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.
2module MissingRecordField where
3module MissingRecordField where
3
4
4import Prelude ((>))
5import Prelude ((>))
examples/failing/MultipleErrors.purs+4−4
@@ -1,13 +1,13 @@
1−-- @shouldFailWith ExpressionDoesNotHaveType
1+-- @shouldFailWith ExprDoesNotHaveType
2−-- @shouldFailWith ExpressionDoesNotHaveType
2+-- @shouldFailWith ExprDoesNotHaveType
3module MultipleErrors where
3module MultipleErrors where
4
4
5import Prelude
5import Prelude
6
6
7−foo :: Number -> Number
7+foo :: Int -> Int
8foo 0 = "Test"
8foo 0 = "Test"
9foo n = bar (n - 1)
9foo n = bar (n - 1)
10
10
11−bar :: Number -> Number
11+bar :: Int -> Int
12bar 0 = "Test"
12bar 0 = "Test"
13bar n = foo (n - 1)
13bar n = foo (n - 1)
examples/failing/MultipleErrors2.purs+2
@@ -1,3 +1,5 @@
1+-- @shouldFailWith UnknownValue
2+-- @shouldFailWith UnknownValue
1module MultipleErrors2 where
3module MultipleErrors2 where
2
4
3import Prelude
5import Prelude
examples/failing/OverlappingArguments.purs+1−1
@@ -1,4 +1,4 @@
1−-- @shouldFailWith ??
1+-- @shouldFailWith OverlappingArgNames
2module OverlappingArguments where
2module OverlappingArguments where
3
3
4import Prelude
4import Prelude
examples/failing/OverlappingVars.purs+1
@@ -1,3 +1,4 @@
1+-- @shouldFailWith NoInstanceFound
1module Main where
2module Main where
2
3
3import Prelude
4import Prelude
examples/failing/Rank2Types.purs+1−1
@@ -1,4 +1,4 @@
1−-- @shouldFailWith TypesDoNotUnify
1+-- @shouldFailWith ExprDoesNotHaveType
2module Main where
2module Main where
3
3
4import Prelude
4import Prelude
examples/failing/Reserved.purs+1
@@ -1,3 +1,4 @@
1+-- @shouldFailWith ErrorParsingModule
1module Main where
2module Main where
2
3
3import Prelude
4import Prelude
examples/failing/SkolemEscape2.purs+1
@@ -1,3 +1,4 @@
1+-- @shouldFailWith EscapedSkolem
1module Main where
2module Main where
2
3
3import Prelude
4import Prelude
examples/failing/Superclasses4.purs+1−1
@@ -12,4 +12,4 @@ instance foo2 :: Foo Number
12test :: forall a. (Foo a) => a -> a
12test :: forall a. (Foo a) => a -> a
13test a = a
13test a = a
14
14
15−test1 = test 0
15+test1 = test 0.0
examples/failing/TypeSynonyms2.purs+1
@@ -1,3 +1,4 @@
1+-- @shouldFailWith TypeSynonymInstance
1module Main where
2module Main where
2
3
3import Prelude
4import Prelude
examples/failing/TypeSynonyms3.purs+1
@@ -1,3 +1,4 @@
1+-- @shouldFailWith TypeSynonymInstance
1module Main where
2module Main where
2
3
3import Prelude
4import Prelude
examples/failing/TypeSynonyms5.purs+1
@@ -1,3 +1,4 @@
1+-- @shouldFailWith CycleInTypeSynonym
1module Main where
2module Main where
2
3
3import Prelude
4import Prelude
examples/failing/TypeWildcards1.purs+1−1
@@ -1,4 +1,4 @@
1−-- @shouldFailWith ?
1+-- @shouldFailWith ErrorParsingModule
2module TypeWildcards where
2module TypeWildcards where
3
3
4import Prelude
4import Prelude
examples/failing/TypeWildcards2.purs+1−1
@@ -1,4 +1,4 @@
1−-- @shouldFailWith ?
1+-- @shouldFailWith ErrorParsingModule
2module TypeWildcards where
2module TypeWildcards where
3
3
4import Prelude
4import Prelude
examples/failing/TypeWildcards3.purs+1
@@ -1,3 +1,4 @@
1+-- @shouldFailWith ErrorParsingModule
1module TypeWildcards where
2module TypeWildcards where
2
3
3import Prelude
4import Prelude
examples/failing/UnderscoreModuleName.purs+1
@@ -1,3 +1,4 @@
1+-- @shouldFailWith ErrorParsingModule
1module Bad_Module where
2module Bad_Module where
2
3
3import Prelude
4import Prelude
examples/failing/UnknownType.purs+1
@@ -1,3 +1,4 @@
1+-- @shouldFailWith UnknownType
1module Main where
2module Main where
2
3
3import Prelude
4import Prelude