Created
June 22, 2018 05:30
-
-
Save jkoppel/d1165bab6efffbb378a19b97ee5f2b11 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[jkoppel@MacBook-Pro-5:gadt_failed/Foo]$ stack build --ghc-options="-Wall" (06-22 01:30) | |
Foo-0.1.0.0: unregistering (local file changes: ChangeLog.md Foo.cabal README.md app/Main.hs package.yaml src/Lib.hs) | |
Building all executables for `Foo' once. After a successful build of all of them, only specified executables will be rebuilt. | |
Foo-0.1.0.0: configure (lib + exe) | |
Configuring Foo-0.1.0.0... | |
Foo-0.1.0.0: build (lib + exe) | |
Preprocessing library for Foo-0.1.0.0.. | |
Building library for Foo-0.1.0.0.. | |
[1 of 2] Compiling Lib ( src/Lib.hs, .stack-work/dist/x86_64-osx/Cabal-2.0.1.0/build/Lib.o ) | |
[2 of 2] Compiling Paths_Foo ( .stack-work/dist/x86_64-osx/Cabal-2.0.1.0/build/autogen/Paths_Foo.hs, .stack-work/dist/x86_64-osx/Cabal-2.0.1.0/build/Paths_Foo.o ) | |
Preprocessing executable 'Foo-exe' for Foo-0.1.0.0.. | |
Building executable 'Foo-exe' for Foo-0.1.0.0.. | |
[1 of 2] Compiling Main ( app/Main.hs, .stack-work/dist/x86_64-osx/Cabal-2.0.1.0/build/Foo-exe/Foo-exe-tmp/Main.o ) | |
/Users/jkoppel/tmp/gadt_failed/Foo/app/Main.hs:22:1: warning: [-Wincomplete-patterns] | |
Pattern match(es) are non-exhaustive | |
In an equation for ‘fun’: Patterns not matched: (Inl _) | |
| | |
22 | fun (Inr Bar) = 1 | |
| ^^^^^^^^^^^^^^^^^ | |
[2 of 2] Compiling Paths_Foo ( .stack-work/dist/x86_64-osx/Cabal-2.0.1.0/build/Foo-exe/autogen/Paths_Foo.hs, .stack-work/dist/x86_64-osx/Cabal-2.0.1.0/build/Foo-exe/Foo-exe-tmp/Paths_Foo.o ) | |
Linking .stack-work/dist/x86_64-osx/Cabal-2.0.1.0/build/Foo-exe/Foo-exe ... | |
Foo-0.1.0.0: copy/register | |
Installing library in /Users/jkoppel/tmp/gadt_failed/Foo/.stack-work/install/x86_64-osx/lts-11.14/8.2.2/lib/x86_64-osx-ghc-8.2.2/Foo-0.1.0.0-GuLELn5n2LlHCGF6kEczSO | |
Installing executable Foo-exe in /Users/jkoppel/tmp/gadt_failed/Foo/.stack-work/install/x86_64-osx/lts-11.14/8.2.2/bin | |
Registering library for Foo-0.1.0.0.. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE TypeOperators, GADTs, Strict #-} | |
module Main where | |
data (:+:) f g a = Inl !(f a) | Inr !(g a) | |
data A | |
data B | |
data Foo l where | |
Foo :: Foo A | |
data Bar l where | |
Bar :: Bar B | |
type Sig = Foo :+: Bar | |
fun :: Sig B -> Int | |
fun (Inr Bar) = 1 | |
main :: IO () | |
main = return () | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment