Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,393
    • Issues 4,393
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 378
    • Merge Requests 378
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #17431

Closed
Open
Opened Nov 04, 2019 by Roland Senn@RolandSennDeveloper

:force of multiple values results in ASSERT failed! file compiler/types/TyCoSubst.hs, line 384

Summary

With GHC Head 8.9.0.20191103 when I force multiple values in a single :force command, I get an ASSERT failed! file compiler/types/TyCoSubst.hs, line 384. It works, when I do multiple :force commands, each one with only a single value

Steps to reproduce

Use program Sort.hs:

module Sort (sort) where

sort :: Ord a => [a] -> [a]
sort [] = []
sort (x:xs) = insert x (sort xs)

insert :: Ord a => a -> [a] -> [a]
insert x [] = [x]
insert x (y:ys) | x < y     = x:y:ys
                | otherwise = y:(insert x ys)

In GHCi run the commands from the following session:

GHCi, version 8.9.0.20191103: https://www.haskell.org/ghc/  :? for help
Prelude> :l Sort
[1 of 1] Compiling Sort             ( Sort.hs, interpreted )
Ok, one module loaded.
*Sort> :br 5
Breakpoint 0 activated at Sort.hs:5:15-32
*Sort> sort [3,2,1]
Stopped in Sort.sort, Sort.hs:5:15-32
_result :: [a] = _
x :: a = _
xs :: [a] = [_,_]
[Sort.hs:5:15-32] *Sort> :force x xs _result
*** Exception: ASSERT failed! file compiler/types/TyCoSubst.hs, line 384

Expected behavior

Similar result as when I send 3 :force commands with only one value

GHCi, version 8.9.0.20191103: https://www.haskell.org/ghc/  :? for help
Prelude> :l Sort.hs
[1 of 1] Compiling Sort             ( Sort.hs, interpreted )
Ok, one module loaded.
*Sort> :br 5
Breakpoint 0 activated at Sort.hs:5:15-32
*Sort> sort [3,2,1]
Stopped in Sort.sort, Sort.hs:5:15-32
_result :: [a] = _
x :: a = _
xs :: [a] = [_,_]
[Sort.hs:5:15-32] *Sort> :force x
x = 3
[Sort.hs:5:15-32] *Sort> :force xs
xs = [2,1]
[Sort.hs:5:15-32] *Sort> :force _result
*** Ignoring breakpoint
*** Ignoring breakpoint
*** Ignoring breakpoint
_result = [1,2,3]
[Sort.hs:5:15-32] *Sort> 
 

Environment

  • GHC version used: 8.9.0.20191103 branch master (without local changes!)

Optional:

  • Operating System: Debian 9
  • System Architecture: x86_64
Edited Nov 04, 2019 by Roland Senn
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#17431