another nube question -- segfaults

66 views
Skip to first unread message

Rob Dunne

unread,
Sep 15, 2015, 6:07:35 AM9/15/15
to haskell-exercises
HI all,

I have
a) upgraded ghc  7.8.4 to 7.10.2
b) cloned the course directory again
c) made a two line change to src/Course/List.hs  i.e.
(++) =
    error "todo: Course.List#(++)"

to

(++) list1 list2 =
        foldRight (:.) list2 list1

and still I get a segfault using the ++ operator.


I have removed all directories like .ghc .cabal .cabal-sandbox from the top level -- just in case something ghci is picking up something from there.

what else can I try?

Bye
Rob


localhost: chmod og-wr course
localhost: cd course/
localhost: chmod og-wr .ghci 
localhost: cd src/Course
localhost: cp List.hs List.hs.bak
localhost: vi List.hs
localhost: diff List.hs List.hs.bak 
169,170c169,170
< (++) list1 list2 =
<        foldRight (:.) list2 list1
---
> (++) =
>   error "todo: Course.List#(++)"

localhost: cd ../../
localhost: ghci
GHCi, version 7.10.2: http://www.haskell.org/ghc/  :? for help
[ 1 of 28] Compiling Course.Core      ( src/Course/Core.hs, interpreted )
.
.
>> :t (++)
(++) :: List a -> List a -> List a

>> Nil ++ Nil
Segmentation fault (core dumped)

David Tchepak

unread,
Sep 15, 2015, 8:16:39 AM9/15/15
to Rob Dunne, haskell-exercises
By "cloned again" do you mean over an existing clone? If so make sure you also remove `./dist` from the course directory -- this caused me problems when I updated to 7.10.2. :)


--
You received this message because you are subscribed to the Google Groups "haskell-exercises" group.
To unsubscribe from this group and stop receiving emails from it, send an email to haskell-exerci...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rob Dunne

unread,
Sep 15, 2015, 8:40:57 AM9/15/15
to David Tchepak, haskell-exercises
Hi David,

no, I deleted the course directory and started
afresh so there is no "./dist" directory in course.

I notice that
> let aa = Nil ++ Nil
causes no problems

> show aa
or
> aa
cause the segfault

R
Reply all
Reply to author
Forward
0 new messages