Skip to content

Simplest signature file crashes with "Prelude.head: empty list" #11

@bamarsha

Description

@bamarsha

A simple signature file with a single sort and constructor crashes with "Prelude.head: empty list":

unit : Type
tt : unit
❯ stack exec -- as2-exe -i foo.sig
as2-exe: Prelude.head: empty list
CallStack (from HasCallStack):
  error, called at libraries/ghc-internal/src/GHC/Internal/List.hs:2030:3 in ghc-internal:GHC.Internal.List
  errorEmptyList, called at libraries/ghc-internal/src/GHC/Internal/List.hs:96:11 in ghc-internal:GHC.Internal.List
  badHead, called at libraries/ghc-internal/src/GHC/Internal/List.hs:90:28 in ghc-internal:GHC.Internal.List
  head, called at Src/Autosubst/GenAutomation.hs:107:26 in as2-0.1.0.0-Ll96ItL8HdFBRbHzHX8N4G:Autosubst.GenAutomation
HasCallStack backtrace:
  collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
  toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:204:5 in ghc-internal:GHC.Internal.Exception
  error, called at libraries/ghc-internal/src/GHC/Internal/List.hs:2030:3 in ghc-internal:GHC.Internal.List
  errorEmptyList, called at libraries/ghc-internal/src/GHC/Internal/List.hs:96:11 in ghc-internal:GHC.Internal.List
  badHead, called at libraries/ghc-internal/src/GHC/Internal/List.hs:90:28 in ghc-internal:GHC.Internal.List
  head, called at Src/Autosubst/GenAutomation.hs:107:26 in as2-0.1.0.0-Ll96ItL8HdFBRbHzHX8N4G:Autosubst.GenAutomation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions