diff options
author | Adam Gundry <adam@well-typed.com> | 2015-10-16 13:58:52 +0100 |
---|---|---|
committer | Adam Gundry <adam@well-typed.com> | 2015-10-16 13:58:52 +0100 |
commit | 5a1b4f814f74ec1c48152d97523744518e212777 (patch) | |
tree | 7c2207ecacbd37f12c78dbcf9d4334827164e0fb /compiler/coreSyn/CoreSyn.hs | |
parent | 6757950cdd8bb0af0355539987ee78401a6a8f6b (diff) | |
parent | 808bbdf08058785ae5bc59b5b4f2b04951d4cbbf (diff) | |
download | haskell-wip/orf-reboot.tar.gz |
Merge remote-tracking branch 'origin/master' into wip/orf-rebootwip/orf-reboot
Conflicts:
compiler/rename/RnNames.hs
compiler/typecheck/TcRnMonad.hs
utils/haddock
Diffstat (limited to 'compiler/coreSyn/CoreSyn.hs')
-rw-r--r-- | compiler/coreSyn/CoreSyn.hs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/coreSyn/CoreSyn.hs b/compiler/coreSyn/CoreSyn.hs index fedf1d73ec..24ce641039 100644 --- a/compiler/coreSyn/CoreSyn.hs +++ b/compiler/coreSyn/CoreSyn.hs @@ -233,6 +233,10 @@ These data types are the heart of the compiler -- The inner case does not need a @Red@ alternative, because @x@ -- can't be @Red@ at that program point. -- +-- 5. Floating-point values must not be scrutinised against literals. +-- See Trac #9238 and Note [Rules for floating-point comparisons] +-- in PrelRules for rationale. +-- -- * Cast an expression to a particular type. -- This is used to implement @newtype@s (a @newtype@ constructor or -- destructor just becomes a 'Cast' in Core) and GADTs. @@ -329,6 +333,9 @@ simplifier calling findAlt with argument (LitAlt 3). No no. Integer literals are an opaque encoding of an algebraic data type, not of an unlifted literal, like all the others. +Also, we do not permit case analysis with literal patterns on floating-point +types. See Trac #9238 and Note [Rules for floating-point comparisons] in +PrelRules for the rationale for this restriction. -------------------------- CoreSyn INVARIANTS --------------------------- |