File: Types.hs

package info (click to toggle)
xmonad-extras 0.17.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 176 kB
  • sloc: haskell: 846; makefile: 3
file content (16 lines) | stat: -rw-r--r-- 499 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
-- | Types defined here to avoid template haskell stage restrictions
module XMonad.Config.Alt.Types where
import XMonad
import Control.Monad.Writer
import Control.Applicative

-- TH stage restriction otherwise
data Mode_ = Add_ | Modify_ | ModifyIO_ | Set_

type Warnings = [String] -> [String]

newtype Config a = Config (WriterT Warnings IO a)
    deriving (Monad, Applicative, Functor, MonadIO, MonadWriter Warnings)