gitlab-ci: Move hadrian-ghc-in-ghci job first
[ghc.git] / testsuite / tests / typecheck / should_compile / tc251.hs
1 {-# LANGUAGE TypeFamilies #-}
2 module ShouldCompile where
3
4 import Tc251_Help
5
6 instance Cls Int where
7
8 inc :: (Fam a ~ Maybe Int) => a -> Fam a -> Fam a
9 inc _proxy (Just x) = Just (x + 1)
10 inc _proxy Nothing = Just 0
11
12 foo :: Maybe Int -> Maybe Int
13 foo = inc (undefined :: Int)