Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 5.6k
    • Issues 5.6k
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 644
    • Merge requests 644
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Model experiments
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #225

Segmentation fault with Template Haskell

When compiling the files attached, I get the following
output:

$ ./compile.sh 
Chasing modules from: TemplateTryOut.hs
Skipping  OHaskellPrimitives ( ./OHaskellPrimitives.hs,
./OHaskellPrimitives.o )
Skipping  Utils            ( ./Utils.hs, ./Utils.o )
Compiling Templates        ( ./Templates.hs,
./Templates.o )
Compiling Main             ( TemplateTryOut.hs,
TemplateTryOut.o )
Loading package base ... linking ... done.
Loading package haskell98 ... linking ... done.
Loading package haskell-src ... linking ... done.
[Info] Starting processing template
[Info] Start of translation phase
[Debug Trans] translating let expr
[Debug Trans] translating declaration
[Debug Trans] finished translating declarations of let,
now translating body
./compile.sh: line 6: 23126 Segmentation fault      ghc
-fglasgow-exts --make TemplateTryOut.hs

The problem is in Templates.hs, around line 202. As
soon as you "touches" the body expression of an LetE,
the compiler crashes.

This is the GHC version I'm using:

Glasgow Haskell Compiler, Version 6.2.1, for Haskell
98, compiled by GHC version 6.2

I first thought that I might have a stage 1 compiler,
because the line above says "compiled by GHC version
6.2", but I just used the defaults when building GHC,
so it should be a stage 2 compiler.
Trac metadata
Trac field Value
Version None
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution ResolvedFixed
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking