Ticket #3425: foo.hs

File foo.hs, 154 bytes (added by iago, 6 years ago)

Causes ghc panic when trying to load it with compileToCoreModule

Line 
1add :: Int -> Int -> Int
2add x y = x+y
3
4sub :: Num a => a -> a -> a
5sub x y = x - y
6
7class Foo a where
8  foo :: a -> Int
9
10main = print $ sub (add 1 2) 1