# Any ideas on what to do with this error message

**URL:** <https://discourse.haskell.org/t/any-ideas-on-what-to-do-with-this-error-message/8207>\
**Category:** Learn\
**Created:** [November 25, 2023, 1:10pm UTC](https://discourse.haskell.org/t/any-ideas-on-what-to-do-with-this-error-message/8207 "2023-11-25T13:10:51Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![halogenandtoast](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/halogenandtoast/32/3565_2.png) [@halogenandtoast](https://discourse.haskell.org/u/halogenandtoast)\
**Post date:** [November 25, 2023, 1:10pm UTC](https://discourse.haskell.org/t/any-ideas-on-what-to-do-with-this-error-message/8207/1 "2023-11-25T13:10:51Z")

</div>

```haskell
#47 343.7 app> <no location info>: error:
#47 343.7 app> /compiler/GHC/Core/Opt/Simplify/Iteration.hs:3722:15-36: Non-exhaustive patterns in dmd : cont_dmds

```

EDITED:

Compiling on ghc 9.6.3, with stack 2.13.1 with resolver: nightly-2023-10-22, on OSX Sonoma 14.2 on M1 Ultra Works, but it’s failing on Github CI and also if I try to compile via Docker. An example failing run is in my comment below.

---

<div class="post-metadata">

**Author:** ![jaror](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/jaror/32/3271_2.png) [@jaror](https://discourse.haskell.org/u/jaror)\
**Post date:** [November 25, 2023, 2:42pm UTC](https://discourse.haskell.org/t/any-ideas-on-what-to-do-with-this-error-message/8207/2 "2023-11-25T14:42:12Z")

</div>

Seems like that may be a bug in GHC. What are you compiling?

---

<div class="post-metadata">

**Author:** ![Vlix](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/vlix/32/1551_2.png) [@Vlix](https://discourse.haskell.org/u/Vlix)\
**Post date:** [November 25, 2023, 7:35pm UTC](https://discourse.haskell.org/t/any-ideas-on-what-to-do-with-this-error-message/8207/3 "2023-11-25T19:35:14Z")

</div>

```haskell
mkDupableContWithDmds
   :: SimplEnv -> [Demand] -- Demands on arguments; always infinite
   -> SimplCont -> SimplM ( SimplFloats, SimplCont)
mkDupableContWithDmds env dmds (ApplyToVal{..}) = do
    let (dmd:cont_dmds) = dmds -- Never fails
    -- ...etc

```

Welp, found [the code](https://hackage.haskell.org/package/ghc-9.8.1/docs/src/GHC.Core.Opt.Simplify.Iteration.html#local-6989586621682667712) 😆  
Proving the comments wrong, it seems.

---

<div class="post-metadata">

**Author:** ![halogenandtoast](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/halogenandtoast/32/3565_2.png) [@halogenandtoast](https://discourse.haskell.org/u/halogenandtoast)\
**Post date:** [November 25, 2023, 11:36pm UTC](https://discourse.haskell.org/t/any-ideas-on-what-to-do-with-this-error-message/8207/4 "2023-11-25T23:36:59Z")

</div>

I’m compiling my project here: [GitHub - halogenandtoast/ArkhamHorror: A rules-compliant browser based version of Arkham Horror: The Card Game.](https://github.com/halogenandtoast/ArkhamHorror/)

The failure shows up here: [Stuff · halogenandtoast/ArkhamHorror@c3f3e6d · GitHub](https://github.com/halogenandtoast/ArkhamHorror/actions/runs/6989010609/job/19017164271)  
And locally when compiling with Docker locally, but actually doesn’t show up when I compile it directly (so my original comment is misleading).

---

<div class="post-metadata">

**Author:** ![jaror](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/jaror/32/3271_2.png) [@jaror](https://discourse.haskell.org/u/jaror)\
**Post date:** [November 26, 2023, 12:11am UTC](https://discourse.haskell.org/t/any-ideas-on-what-to-do-with-this-error-message/8207/5 "2023-11-26T00:11:01Z")

</div>

I think it would be best to open an issue on GHC’s issue tracker: [Issues · Glasgow Haskell Compiler / GHC · GitLab](https://gitlab.haskell.org/ghc/ghc/-/issues)

The problematic Haskell code seems to be somewhere in `Arkham.Game`. It would be ideal if you could make a smaller reproducer, but that may not be very easy.

---

<div class="post-metadata">

**Author:** ![halogenandtoast](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/halogenandtoast/32/3565_2.png) [@halogenandtoast](https://discourse.haskell.org/u/halogenandtoast)\
**Post date:** [November 26, 2023, 2:01am UTC](https://discourse.haskell.org/t/any-ideas-on-what-to-do-with-this-error-message/8207/6 "2023-11-26T02:01:04Z")

</div>

Yeah I’d like to create a way to reproduce, but it is entirely unclear as to why this is happening. The commit that introduced this first seems innocuous with regards to the changes in Game.hs

> <https://github.com/halogenandtoast/ArkhamHorror/commit/591c8f97bce07b78f27579025703f308e76fdc82#diff-cdfcd26e895124a6061a420702080d28f4f523c46409b8074294c8a4cc9c77a8>

Are there any suggestions for verbosity flags I should use to maybe get more info about how the simplifier is failing here?

---

<div class="post-metadata">

**Author:** ![halogenandtoast](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/halogenandtoast/32/3565_2.png) [@halogenandtoast](https://discourse.haskell.org/u/halogenandtoast)\
**Post date:** [November 26, 2023, 2:47am UTC](https://discourse.haskell.org/t/any-ideas-on-what-to-do-with-this-error-message/8207/7 "2023-11-26T02:47:23Z")

</div>

`-dshow-passes` doesn’t really add a lot more information:

```haskell
arkham-core> *** Simplifier [Arkham.Game]:
arkham-core> Result size of Simplifier iteration=1
arkham-core> = {terms: 279,674,
arkham-core> types: 399,126,
arkham-core> coercions: 101,721,
arkham-core> joins: 799/8,029}
arkham-core>
arkham-core> <no location info>: error:
arkham-core> /Users/halogenandtoast/Code/ArkhamHorror/
hs:3722:15-36: Non-exhaustive patterns in dmd : cont_dmds

```

---

<div class="post-metadata">

**Author:** ![halogenandtoast](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/halogenandtoast/32/3565_2.png) [@halogenandtoast](https://discourse.haskell.org/u/halogenandtoast)\
**Post date:** [November 26, 2023, 10:02am UTC](https://discourse.haskell.org/t/any-ideas-on-what-to-do-with-this-error-message/8207/8 "2023-11-26T10:02:45Z")

</div>

I don’t know a good way to create a minimal case. For the time being, I was able to solve my issue by splitting up the module into 3 modules instead.
