Opened 3 years ago
Closed 3 years ago
#8917 closed bug (fixed)
:kind! does not work under type constructors
Reported by: | goldfire | Owned by: | goldfire |
---|---|---|---|
Priority: | normal | Milestone: | 7.8.1 |
Component: | Compiler | Version: | 7.8.1-rc2 |
Keywords: | Cc: | ||
Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
Type of failure: | None/Unknown | Test Case: | ghci/scripts/T8917 |
Blocked By: | Blocking: | ||
Related Tickets: | Differential Rev(s): | ||
Wiki Page: |
Description
Say I have the following:
{-# LANGUAGE DataKinds, PolyKinds, TypeFamilies #-} module Scratch where data Nat = Zero | Succ Nat type family a + b where Zero + a = a (Succ n) + m = Succ (n + m)
I load this into ghci. See what happens next:
GHCi, version 7.8.0.20140228: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. [1 of 1] Compiling Scratch ( Scratch.hs, interpreted ) Ok, modules loaded: Scratch. *Scratch> :kind! Zero + Succ Zero Zero + Succ Zero :: Nat = 'Succ 'Zero *Scratch> :kind! Succ (Zero + Zero) Succ (Zero + Zero) :: Nat = 'Succ ('Zero + 'Zero)
Note the last line. It doesn't reduce under the Succ!
I will fix shortly.
Change History (5)
comment:1 Changed 3 years ago by Richard Eisenberg <eir@…>
comment:2 Changed 3 years ago by Richard Eisenberg <eir@…>
comment:3 Changed 3 years ago by thoughtpolice
- Status changed from new to merge
comment:4 Changed 3 years ago by goldfire
- Test Case set to ghci/scripts/T8917
Yes, please merge. I conjecture that there are other ways to exhibit the bug fixed in this ticket without using ghci. Thanks!
comment:5 Changed 3 years ago by thoughtpolice
- Resolution set to fixed
- Status changed from merge to closed
Merged in 7.8, thanks!
Note: See
TracTickets for help on using
tickets.
In 47796026ca35a2438f7a7dc337add2ec3b14f06c/ghc: