git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Merge pull request #1340 from purescript/1260
4b1652fPhil Freeman
examples/failing/InfiniteKind.pursnew file+5
@@ -0,0 +1,5 @@
1+-- @shouldFailWith InfiniteKind
2+
3+module Main where
4+
5+data F a = F (a a)
examples/failing/InfiniteType.pursnew file+5
@@ -0,0 +1,5 @@
1+-- @shouldFailWith InfiniteType
2+
3+module Main where
4+
5+f a = a a
src/Language/PureScript/Errors.hs+2−2
@@ -242,10 +242,10 @@ newtype MultipleErrors = MultipleErrors
242 { runMultipleErrors :: [ErrorMessage] } deriving (Show, Monoid)
242 { runMultipleErrors :: [ErrorMessage] } deriving (Show, Monoid)
243
243
244instance UnificationError Type MultipleErrors where
244instance UnificationError Type MultipleErrors where
245− occursCheckFailed = occursCheckFailed
245+ occursCheckFailed t = MultipleErrors [occursCheckFailed t]
246
246
247instance UnificationError Kind MultipleErrors where
247instance UnificationError Kind MultipleErrors where
248− occursCheckFailed = occursCheckFailed
248+ occursCheckFailed k = MultipleErrors [occursCheckFailed k]
249
249
250-- | Check whether a collection of errors is empty or not.
250-- | Check whether a collection of errors is empty or not.
251nonEmpty :: MultipleErrors -> Bool
251nonEmpty :: MultipleErrors -> Bool