mirror of
https://github.com/haskell/ghcide.git
synced 2024-12-17 23:22:04 +03:00
Add utility function for the IDE Logger (#1132)
This commit is contained in:
parent
160554ac95
commit
3d66a7aed6
@ -7,6 +7,7 @@
|
||||
-- framework they want to.
|
||||
module Development.IDE.Logger
|
||||
( Handle(..)
|
||||
, makeOneHandle
|
||||
, makeNopHandle
|
||||
) where
|
||||
|
||||
@ -19,5 +20,7 @@ data Handle = Handle {
|
||||
}
|
||||
|
||||
makeNopHandle :: Handle
|
||||
makeNopHandle = Handle e e where
|
||||
e _ = pure ()
|
||||
makeNopHandle = makeOneHandle $ const $ pure ()
|
||||
|
||||
makeOneHandle :: (HasCallStack => T.Text -> IO ()) -> Handle
|
||||
makeOneHandle x = Handle x x
|
||||
|
Loading…
Reference in New Issue
Block a user