[fix] Removed '-fplugin GHC.TypeLits.KnownNat.Solver' from the .cabal because it could not be built with Stack (#15).

This commit is contained in:
Yamada Ryo 2024-10-14 11:05:59 +09:00
parent 3203935a1f
commit 08e9396be8
No known key found for this signature in database
GPG Key ID: AAE3C7A542B02DBF
5 changed files with 19 additions and 7 deletions

View File

@ -73,11 +73,19 @@ Example .cabal:
TemplateHaskell,
PartialTypeSignatures,
AllowAmbiguousTypes
ghc-options: ... -fplugin GHC.TypeLits.KnownNat.Solver
...
```
If you encounter an error like the following, add the pragma:
```haskell
{-# OPTIONS_GHC -fplugin GHC.TypeLits.KnownNat.Solver #-}
```
to the header of your source file.
Could not deduce GHC.TypeNats.KnownNat (1 GHC.TypeNats.+ ...)
The supported versions are GHC 9.4.1 and later.
This library has been tested with GHC 9.8.2 and 9.4.1.

View File

@ -1,5 +1,6 @@
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -fplugin GHC.TypeLits.KnownNat.Solver #-}
-- SPDX-License-Identifier: MPL-2.0

View File

@ -1,6 +1,7 @@
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -fplugin GHC.TypeLits.KnownNat.Solver #-}
-- This Source Code Form is subject to the terms of the Mozilla Public
-- License, v. 2.0. If a copy of the MPL was not distributed with this

View File

@ -1,6 +1,6 @@
cabal-version: 2.4
name: heftia-effects
version: 0.4.0.0
version: 0.4.0.1
-- A short (one-line) description of the package.
synopsis: higher-order effects done right
@ -35,7 +35,7 @@ tested-with:
source-repository head
type: git
location: https://github.com/sayo-hs/heftia
tag: v0.4.0
tag: v0.4.0.1
subdir: heftia-effects
common common-base
@ -63,7 +63,7 @@ common common-base
ghc-typelits-knownnat ^>= 0.7,
containers > 0.6.5 && < 0.8,
ghc-options: -Wall -fplugin GHC.TypeLits.KnownNat.Solver
ghc-options: -Wall
library
import: common-base

View File

@ -1,10 +1,10 @@
{-# OPTIONS_GHC -fplugin GHC.TypeLits.KnownNat.Solver #-}
-- SPDX-License-Identifier: MPL-2.0
module Control.Monad.Hefty.Concurrent.Timer where
import Control.Concurrent.Thread.Delay qualified as Thread
import Control.Monad.Hefty.Coroutine (runCoroutine)
import Control.Monad.Hefty.State (evalState)
import Control.Monad.Hefty (
interpose,
interpret,
@ -17,6 +17,8 @@ import Control.Monad.Hefty (
type (<|),
type (~>),
)
import Control.Monad.Hefty.Coroutine (runCoroutine)
import Control.Monad.Hefty.State (evalState)
import Data.Effect.Concurrent.Timer (CyclicTimer (Wait), Timer (..), clock, cyclicTimer)
import Data.Effect.Coroutine (Status (Continue, Done))
import Data.Effect.State (get, put)