Commit ac4c0598 authored by Kai-Oliver Prott's avatar Kai-Oliver Prott

Add tests for recent bugfixes

parent 9edb4b39
......@@ -149,6 +149,7 @@ passInfos = map mkPassTest
, "ClassMethods"
, "DefaultPrecedence"
, "Dequeue"
, "EmptyWhere"
, "ExplicitLayout"
, "FCase"
, "FP_Lifting"
......@@ -157,6 +158,8 @@ passInfos = map mkPassTest
, "FunctionalPatterns"
, "HaskellRecords"
, "Hierarchical"
, "ImportRestricted"
, "ImportRestricted2"
, "Infix"
, "Inline"
, "Lambda"
......@@ -186,6 +189,7 @@ passInfos = map mkPassTest
, "TypedExpr"
, "UntypedAcy"
, "Unzip"
, "WhereAfterDo"
]
--------------------------------------------------------------------------------
......@@ -292,6 +296,8 @@ failInfos = map (uncurry mkFailTest)
, "Type variable b occurs more than once in left hand side of type declaration"
]
)
, ("MissingLabelInUpdate",
["Undefined record label `l1'"] )
, ("MultipleArities", ["Equations for `test' have different arities"])
, ("MultipleDefinitions",
["Multiple definitions for data/record constructor `Rec'"]
......
module MissingLabelInUpdate where
import MissingLabelInUpdateExport
-- test :: R -> R
test r = r { l1 = "" }
module MissingLabelInUpdateExport(R(C1)) where
data R = C1 { l1 :: String, l2 :: Int }
| C2 { l1 :: String }
fun :: a -> Int
fun x = case x of
_ -> 1
where
where
module ImportRestricted (module ImportRestrictedExport) where
import ImportRestrictedExport (Test(test))
module ImportRestricted2 where
import ImportRestricted
import ImportRestrictedExport (Test(Test))
testexpr1 :: Test
testexpr1 = Test testexpr1
testexpr2 :: Test
testexpr2 = test testexpr1
module ImportRestrictedExport where
data Test = Test { test :: Test }
main :: IO ()
main = do
x
where x = return ()
other :: Int -> Int
other f = case f of
_ -> x
where x = 1
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment