mirror of
https://github.com/github/semantic.git
synced 2024-11-24 08:54:07 +03:00
🔥 the IsString constraint.
This commit is contained in:
parent
c2908ed497
commit
4044575648
@ -10,7 +10,6 @@ module Control.Effect.Readline
|
||||
) where
|
||||
|
||||
import Control.Effect.Carrier
|
||||
import Data.String
|
||||
import Data.Text.Prettyprint.Doc
|
||||
import Data.Text.Prettyprint.Doc.Render.Terminal
|
||||
import GHC.Generics (Generic1)
|
||||
@ -25,8 +24,8 @@ instance HFunctor Readline
|
||||
instance Effect Readline
|
||||
|
||||
|
||||
prompt :: (IsString str, Member Readline sig, Carrier sig m) => String -> m (Int, Maybe str)
|
||||
prompt p = fmap (fmap fromString) <$> send (Prompt p (curry pure))
|
||||
prompt :: (Member Readline sig, Carrier sig m) => String -> m (Int, Maybe String)
|
||||
prompt p = send (Prompt p (curry pure))
|
||||
|
||||
print :: (Carrier sig m, Member Readline sig) => Doc AnsiStyle -> m ()
|
||||
print s = send (Print s (pure ()))
|
||||
|
Loading…
Reference in New Issue
Block a user