Changes between Initial Version and Version 3 of Ticket #7354


Ignore:
Timestamp:
Oct 26, 2012 4:03:55 PM (3 years ago)
Author:
simonpj
Comment:

Right. I can reproduce this failure with 7.6.1. Happily HEAD says:

$ ~/5builds/HEAD/inplace/bin/ghc-stage2 --interactive T7354.hs
GHCi, version 7.7: 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 T7354            ( T7354.hs, interpreted )
Ok, modules loaded: T7354.
*T7354> ana alg

<interactive>:2:5:
    Occurs check: cannot construct the infinite type:
      a ~ Base t (Prim [a] a)
    Expected type: Prim [a] a -> Base t (Prim [a] a)
      Actual type: Prim [a] a -> a
    Relevant bindings include
      it :: Prim [a] a -> t (bound at <interactive>:2:1)
    In the first argument of `ana', namely `alg'
    In the expression: ana alg
    In an equation for `it': it = ana alg

which looks right.

Next is to try recursion-schemes with HEAD.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #7354

    • Property Difficulty changed from to Unknown
  • Ticket #7354 – Description

    initial v3  
    331. Install GHC 7.6.1 and recursion-schemes ([http://hackage.haskell.org/package/recursion-schemes])
    442. Create a new .hs file with the following
    5 --------------
     5{{{
    66import Data.Functor.Foldable
    77
    88foo = embed ()
    9 --------------
     9}}}
    10103. Load the file into GHCI
    11114. Evaluate foo
    12 
     12{{{
    1313*Main> foo
    1414
     
    2626      Use -ddump-if-trace to get an idea of which file caused the error
    2727    In the expression: foo
    28 
    29 5. Evaluate ``embed ()'' directly at the REPL
     28}}}
     295. Evaluate `embed ()' directly at the REPL
     30{{{
    3031*Main> embed ()
    3132ghc: panic! (the 'impossible' happened)
     
    3334        nameModule
    3435<<details unavailable>>
     36}}}
    3537
    36 Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
    37 --------------
    3838
    3939System Information:
    40 
     40{{{
    4141[andy@vanir ~]$ uname -a
    4242Linux vanir 3.5.6-1-ARCH #1 SMP PREEMPT Sun Oct 7 19:30:49 CEST 2012 x86_64 GNU/Linux
    4343[andy@vanir ~]$ ls asdf.hi # the would-be .hi file
    4444ls: cannot access asdf.hi: No such file or directory
     45}}}