diff options
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/T15645.hs')
-rw-r--r-- | testsuite/tests/typecheck/should_compile/T15645.hs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T15645.hs b/testsuite/tests/typecheck/should_compile/T15645.hs new file mode 100644 index 0000000000..d558b510d7 --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/T15645.hs @@ -0,0 +1,17 @@ +{-# LANGUAGE RebindableSyntax, OverloadedStrings #-} + +module T15645 where + +import Prelude hiding (fail) + +foo x = do + Just y <- x + return y + +newtype Text = Text String + +fail :: Text -> a +fail (Text x) = error x + +fromString :: String -> Text +fromString = Text |