Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
C
compiler
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 17
    • Issues 17
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • clean-compiler-and-rts
  • compiler
  • Issues
  • #74

Closed
Open
Opened Sep 20, 2020 by Camil Staps@cstaps🚀Developer

Curried use of strict ?Just causes segmentation fault

For example, this causes a segmentation fault on the current x64 nightly:

import StdEnv

f :: (Int -> ?Int)
f = ?Just o ((+) 5)

Start = f 1

Whereas this works fine with a custom ADT:

:: M a = J !a

g :: (Int -> M Int)
g = J o ((+) 5)

Start = g 1

Also f = (\x -> ?Just x) o ((+) 5) works fine.

I think ?Just should be defined as a .record in _system.abc, with the corresponding lazy entry for currying, as is done with strict lists and constructors.

Finally, I'm not sure whether it is related or not, but f = ?Just results in a lazy ?^Just being created:

f :: (Int -> ?Int)
f = ?Just

Start = f 1
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: clean-compiler-and-rts/compiler#74