termonad 2.1.0.0 → 3.0.0.0
raw patch · 11 files changed
+221/−14 lines, 11 filesdep +yamlPVP ok
version bump matches the API change (PVP)
Dependencies added: yaml
API changes (from Hackage documentation)
- Termonad.Config.Vec: [Abs_6989586621679501934Sym0KindInference] :: forall a6989586621679501933 arg_a241O. SameKind (Apply Abs_6989586621679501934Sym0 arg_a241O) (Abs_6989586621679501934Sym1 arg_a241O) => Abs_6989586621679501934Sym0 a6989586621679501933
- Termonad.Config.Vec: [Compare_6989586621679500654Sym0KindInference] :: forall a6989586621679500652 arg_a23Hb. SameKind (Apply Compare_6989586621679500654Sym0 arg_a23Hb) (Compare_6989586621679500654Sym1 arg_a23Hb) => Compare_6989586621679500654Sym0 a6989586621679500652
- Termonad.Config.Vec: [Compare_6989586621679500654Sym1KindInference] :: forall a6989586621679500652 a6989586621679500653 arg_a23Ha. SameKind (Apply (Compare_6989586621679500654Sym1 a6989586621679500652) arg_a23Ha) (Compare_6989586621679500654Sym2 a6989586621679500652 arg_a23Ha) => Compare_6989586621679500654Sym1 a6989586621679500652 a6989586621679500653
- Termonad.Config.Vec: [FromInteger_6989586621679501957Sym0KindInference] :: forall a6989586621679501956 arg_a242b. SameKind (Apply FromInteger_6989586621679501957Sym0 arg_a242b) (FromInteger_6989586621679501957Sym1 arg_a242b) => FromInteger_6989586621679501957Sym0 a6989586621679501956
- Termonad.Config.Vec: [Let6989586621679501946Scrutinee_6989586621679487025Sym0KindInference] :: forall n6989586621679501945 arg_a241Z. SameKind (Apply Let6989586621679501946Scrutinee_6989586621679487025Sym0 arg_a241Z) (Let6989586621679501946Scrutinee_6989586621679487025Sym1 arg_a241Z) => Let6989586621679501946Scrutinee_6989586621679487025Sym0 n6989586621679501945
- Termonad.Config.Vec: [Let6989586621679501950Scrutinee_6989586621679487027Sym0KindInference] :: forall n6989586621679501945 arg_a2423. SameKind (Apply Let6989586621679501950Scrutinee_6989586621679487027Sym0 arg_a2423) (Let6989586621679501950Scrutinee_6989586621679487027Sym1 arg_a2423) => Let6989586621679501950Scrutinee_6989586621679487027Sym0 n6989586621679501945
- Termonad.Config.Vec: [ShowsPrec_6989586621679501355Sym0KindInference] :: forall a6989586621679501352 arg_a23Sv. SameKind (Apply ShowsPrec_6989586621679501355Sym0 arg_a23Sv) (ShowsPrec_6989586621679501355Sym1 arg_a23Sv) => ShowsPrec_6989586621679501355Sym0 a6989586621679501352
- Termonad.Config.Vec: [ShowsPrec_6989586621679501355Sym1KindInference] :: forall a6989586621679501352 a6989586621679501353 arg_a23Su. SameKind (Apply (ShowsPrec_6989586621679501355Sym1 a6989586621679501352) arg_a23Su) (ShowsPrec_6989586621679501355Sym2 a6989586621679501352 arg_a23Su) => ShowsPrec_6989586621679501355Sym1 a6989586621679501352 a6989586621679501353
- Termonad.Config.Vec: [ShowsPrec_6989586621679501355Sym2KindInference] :: forall a6989586621679501352 a6989586621679501353 a6989586621679501354 arg_a23St. SameKind (Apply (ShowsPrec_6989586621679501355Sym2 a6989586621679501352 a6989586621679501353) arg_a23St) (ShowsPrec_6989586621679501355Sym3 a6989586621679501352 a6989586621679501353 arg_a23St) => ShowsPrec_6989586621679501355Sym2 a6989586621679501352 a6989586621679501353 a6989586621679501354
- Termonad.Config.Vec: [Signum_6989586621679501940Sym0KindInference] :: forall a6989586621679501939 arg_a241U. SameKind (Apply Signum_6989586621679501940Sym0 arg_a241U) (Signum_6989586621679501940Sym1 arg_a241U) => Signum_6989586621679501940Sym0 a6989586621679501939
- Termonad.Config.Vec: [TFHelper_6989586621679501892Sym0KindInference] :: forall a6989586621679501890 arg_a2419. SameKind (Apply TFHelper_6989586621679501892Sym0 arg_a2419) (TFHelper_6989586621679501892Sym1 arg_a2419) => TFHelper_6989586621679501892Sym0 a6989586621679501890
- Termonad.Config.Vec: [TFHelper_6989586621679501892Sym1KindInference] :: forall a6989586621679501890 a6989586621679501891 arg_a2418. SameKind (Apply (TFHelper_6989586621679501892Sym1 a6989586621679501890) arg_a2418) (TFHelper_6989586621679501892Sym2 a6989586621679501890 arg_a2418) => TFHelper_6989586621679501892Sym1 a6989586621679501890 a6989586621679501891
- Termonad.Config.Vec: [TFHelper_6989586621679501908Sym0KindInference] :: forall a6989586621679501906 arg_a241p. SameKind (Apply TFHelper_6989586621679501908Sym0 arg_a241p) (TFHelper_6989586621679501908Sym1 arg_a241p) => TFHelper_6989586621679501908Sym0 a6989586621679501906
- Termonad.Config.Vec: [TFHelper_6989586621679501908Sym1KindInference] :: forall a6989586621679501906 a6989586621679501907 arg_a241o. SameKind (Apply (TFHelper_6989586621679501908Sym1 a6989586621679501906) arg_a241o) (TFHelper_6989586621679501908Sym2 a6989586621679501906 arg_a241o) => TFHelper_6989586621679501908Sym1 a6989586621679501906 a6989586621679501907
- Termonad.Config.Vec: [TFHelper_6989586621679501924Sym0KindInference] :: forall a6989586621679501922 arg_a241F. SameKind (Apply TFHelper_6989586621679501924Sym0 arg_a241F) (TFHelper_6989586621679501924Sym1 arg_a241F) => TFHelper_6989586621679501924Sym0 a6989586621679501922
- Termonad.Config.Vec: [TFHelper_6989586621679501924Sym1KindInference] :: forall a6989586621679501922 a6989586621679501923 arg_a241E. SameKind (Apply (TFHelper_6989586621679501924Sym1 a6989586621679501922) arg_a241E) (TFHelper_6989586621679501924Sym2 a6989586621679501922 arg_a241E) => TFHelper_6989586621679501924Sym1 a6989586621679501922 a6989586621679501923
- Termonad.Config.Vec: data Abs_6989586621679501934Sym0 :: (~>) Peano Peano
- Termonad.Config.Vec: data Compare_6989586621679500654Sym0 :: (~>) Peano ((~>) Peano Ordering)
- Termonad.Config.Vec: data Compare_6989586621679500654Sym1 (a6989586621679500652 :: Peano) :: (~>) Peano Ordering
- Termonad.Config.Vec: data FromInteger_6989586621679501957Sym0 :: (~>) Nat Peano
- Termonad.Config.Vec: data Let6989586621679501946Scrutinee_6989586621679487025Sym0 n6989586621679501945
- Termonad.Config.Vec: data Let6989586621679501950Scrutinee_6989586621679487027Sym0 n6989586621679501945
- Termonad.Config.Vec: data ShowsPrec_6989586621679501355Sym0 :: (~>) Nat ((~>) Peano ((~>) Symbol Symbol))
- Termonad.Config.Vec: data ShowsPrec_6989586621679501355Sym1 (a6989586621679501352 :: Nat) :: (~>) Peano ((~>) Symbol Symbol)
- Termonad.Config.Vec: data ShowsPrec_6989586621679501355Sym2 (a6989586621679501352 :: Nat) (a6989586621679501353 :: Peano) :: (~>) Symbol Symbol
- Termonad.Config.Vec: data Signum_6989586621679501940Sym0 :: (~>) Peano Peano
- Termonad.Config.Vec: data TFHelper_6989586621679501892Sym0 :: (~>) Peano ((~>) Peano Peano)
- Termonad.Config.Vec: data TFHelper_6989586621679501892Sym1 (a6989586621679501890 :: Peano) :: (~>) Peano Peano
- Termonad.Config.Vec: data TFHelper_6989586621679501908Sym0 :: (~>) Peano ((~>) Peano Peano)
- Termonad.Config.Vec: data TFHelper_6989586621679501908Sym1 (a6989586621679501906 :: Peano) :: (~>) Peano Peano
- Termonad.Config.Vec: data TFHelper_6989586621679501924Sym0 :: (~>) Peano ((~>) Peano Peano)
- Termonad.Config.Vec: data TFHelper_6989586621679501924Sym1 (a6989586621679501922 :: Peano) :: (~>) Peano Peano
- Termonad.Config.Vec: instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings (Termonad.Config.Vec.AddPeanoSym1 a6989586621679498912)
- Termonad.Config.Vec: instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings (Termonad.Config.Vec.Compare_6989586621679500654Sym1 a6989586621679500652)
- Termonad.Config.Vec: instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings (Termonad.Config.Vec.MultPeanoSym1 a6989586621679498919)
- Termonad.Config.Vec: instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings (Termonad.Config.Vec.ShowsPrec_6989586621679501355Sym1 a6989586621679501352)
- Termonad.Config.Vec: instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings (Termonad.Config.Vec.ShowsPrec_6989586621679501355Sym2 a6989586621679501353 a6989586621679501352)
- Termonad.Config.Vec: instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings (Termonad.Config.Vec.SubtractPeanoSym1 a6989586621679498905)
- Termonad.Config.Vec: instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings (Termonad.Config.Vec.TFHelper_6989586621679501892Sym1 a6989586621679501890)
- Termonad.Config.Vec: instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings (Termonad.Config.Vec.TFHelper_6989586621679501908Sym1 a6989586621679501906)
- Termonad.Config.Vec: instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings (Termonad.Config.Vec.TFHelper_6989586621679501924Sym1 a6989586621679501922)
- Termonad.Config.Vec: instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings Termonad.Config.Vec.Abs_6989586621679501934Sym0
- Termonad.Config.Vec: instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings Termonad.Config.Vec.Compare_6989586621679500654Sym0
- Termonad.Config.Vec: instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings Termonad.Config.Vec.FromInteger_6989586621679501957Sym0
- Termonad.Config.Vec: instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings Termonad.Config.Vec.Let6989586621679501946Scrutinee_6989586621679487025Sym0
- Termonad.Config.Vec: instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings Termonad.Config.Vec.Let6989586621679501950Scrutinee_6989586621679487027Sym0
- Termonad.Config.Vec: instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings Termonad.Config.Vec.ShowsPrec_6989586621679501355Sym0
- Termonad.Config.Vec: instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings Termonad.Config.Vec.Signum_6989586621679501940Sym0
- Termonad.Config.Vec: instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings Termonad.Config.Vec.TFHelper_6989586621679501892Sym0
- Termonad.Config.Vec: instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings Termonad.Config.Vec.TFHelper_6989586621679501908Sym0
- Termonad.Config.Vec: instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings Termonad.Config.Vec.TFHelper_6989586621679501924Sym0
- Termonad.Config.Vec: type Abs_6989586621679501934Sym1 (a6989586621679501933 :: Peano) = Abs_6989586621679501934 a6989586621679501933
- Termonad.Config.Vec: type Compare_6989586621679500654Sym2 (a6989586621679500652 :: Peano) (a6989586621679500653 :: Peano) = Compare_6989586621679500654 a6989586621679500652 a6989586621679500653
- Termonad.Config.Vec: type FromInteger_6989586621679501957Sym1 (a6989586621679501956 :: Nat) = FromInteger_6989586621679501957 a6989586621679501956
- Termonad.Config.Vec: type Let6989586621679501946Scrutinee_6989586621679487025Sym1 n6989586621679501945 = Let6989586621679501946Scrutinee_6989586621679487025 n6989586621679501945
- Termonad.Config.Vec: type Let6989586621679501950Scrutinee_6989586621679487027Sym1 n6989586621679501945 = Let6989586621679501950Scrutinee_6989586621679487027 n6989586621679501945
- Termonad.Config.Vec: type ShowsPrec_6989586621679501355Sym3 (a6989586621679501352 :: Nat) (a6989586621679501353 :: Peano) (a6989586621679501354 :: Symbol) = ShowsPrec_6989586621679501355 a6989586621679501352 a6989586621679501353 a6989586621679501354
- Termonad.Config.Vec: type Signum_6989586621679501940Sym1 (a6989586621679501939 :: Peano) = Signum_6989586621679501940 a6989586621679501939
- Termonad.Config.Vec: type TFHelper_6989586621679501892Sym2 (a6989586621679501890 :: Peano) (a6989586621679501891 :: Peano) = TFHelper_6989586621679501892 a6989586621679501890 a6989586621679501891
- Termonad.Config.Vec: type TFHelper_6989586621679501908Sym2 (a6989586621679501906 :: Peano) (a6989586621679501907 :: Peano) = TFHelper_6989586621679501908 a6989586621679501906 a6989586621679501907
- Termonad.Config.Vec: type TFHelper_6989586621679501924Sym2 (a6989586621679501922 :: Peano) (a6989586621679501923 :: Peano) = TFHelper_6989586621679501924 a6989586621679501922 a6989586621679501923
- Termonad.Pcre: inline_c_ffi_6989586621679117373 :: IO CUInt
+ Termonad.Config: tmConfigFromPreferencesFile :: IO TMConfig
+ Termonad.Config.Vec: [Abs_6989586621679502208Sym0KindInference] :: forall a6989586621679502207 arg_a246e. SameKind (Apply Abs_6989586621679502208Sym0 arg_a246e) (Abs_6989586621679502208Sym1 arg_a246e) => Abs_6989586621679502208Sym0 a6989586621679502207
+ Termonad.Config.Vec: [Compare_6989586621679500928Sym0KindInference] :: forall a6989586621679500926 arg_a23LB. SameKind (Apply Compare_6989586621679500928Sym0 arg_a23LB) (Compare_6989586621679500928Sym1 arg_a23LB) => Compare_6989586621679500928Sym0 a6989586621679500926
+ Termonad.Config.Vec: [Compare_6989586621679500928Sym1KindInference] :: forall a6989586621679500926 a6989586621679500927 arg_a23LA. SameKind (Apply (Compare_6989586621679500928Sym1 a6989586621679500926) arg_a23LA) (Compare_6989586621679500928Sym2 a6989586621679500926 arg_a23LA) => Compare_6989586621679500928Sym1 a6989586621679500926 a6989586621679500927
+ Termonad.Config.Vec: [FromInteger_6989586621679502231Sym0KindInference] :: forall a6989586621679502230 arg_a246B. SameKind (Apply FromInteger_6989586621679502231Sym0 arg_a246B) (FromInteger_6989586621679502231Sym1 arg_a246B) => FromInteger_6989586621679502231Sym0 a6989586621679502230
+ Termonad.Config.Vec: [Let6989586621679502220Scrutinee_6989586621679487299Sym0KindInference] :: forall n6989586621679502219 arg_a246p. SameKind (Apply Let6989586621679502220Scrutinee_6989586621679487299Sym0 arg_a246p) (Let6989586621679502220Scrutinee_6989586621679487299Sym1 arg_a246p) => Let6989586621679502220Scrutinee_6989586621679487299Sym0 n6989586621679502219
+ Termonad.Config.Vec: [Let6989586621679502224Scrutinee_6989586621679487301Sym0KindInference] :: forall n6989586621679502219 arg_a246t. SameKind (Apply Let6989586621679502224Scrutinee_6989586621679487301Sym0 arg_a246t) (Let6989586621679502224Scrutinee_6989586621679487301Sym1 arg_a246t) => Let6989586621679502224Scrutinee_6989586621679487301Sym0 n6989586621679502219
+ Termonad.Config.Vec: [ShowsPrec_6989586621679501629Sym0KindInference] :: forall a6989586621679501626 arg_a23WV. SameKind (Apply ShowsPrec_6989586621679501629Sym0 arg_a23WV) (ShowsPrec_6989586621679501629Sym1 arg_a23WV) => ShowsPrec_6989586621679501629Sym0 a6989586621679501626
+ Termonad.Config.Vec: [ShowsPrec_6989586621679501629Sym1KindInference] :: forall a6989586621679501626 a6989586621679501627 arg_a23WU. SameKind (Apply (ShowsPrec_6989586621679501629Sym1 a6989586621679501626) arg_a23WU) (ShowsPrec_6989586621679501629Sym2 a6989586621679501626 arg_a23WU) => ShowsPrec_6989586621679501629Sym1 a6989586621679501626 a6989586621679501627
+ Termonad.Config.Vec: [ShowsPrec_6989586621679501629Sym2KindInference] :: forall a6989586621679501626 a6989586621679501627 a6989586621679501628 arg_a23WT. SameKind (Apply (ShowsPrec_6989586621679501629Sym2 a6989586621679501626 a6989586621679501627) arg_a23WT) (ShowsPrec_6989586621679501629Sym3 a6989586621679501626 a6989586621679501627 arg_a23WT) => ShowsPrec_6989586621679501629Sym2 a6989586621679501626 a6989586621679501627 a6989586621679501628
+ Termonad.Config.Vec: [Signum_6989586621679502214Sym0KindInference] :: forall a6989586621679502213 arg_a246k. SameKind (Apply Signum_6989586621679502214Sym0 arg_a246k) (Signum_6989586621679502214Sym1 arg_a246k) => Signum_6989586621679502214Sym0 a6989586621679502213
+ Termonad.Config.Vec: [TFHelper_6989586621679502166Sym0KindInference] :: forall a6989586621679502164 arg_a245z. SameKind (Apply TFHelper_6989586621679502166Sym0 arg_a245z) (TFHelper_6989586621679502166Sym1 arg_a245z) => TFHelper_6989586621679502166Sym0 a6989586621679502164
+ Termonad.Config.Vec: [TFHelper_6989586621679502166Sym1KindInference] :: forall a6989586621679502164 a6989586621679502165 arg_a245y. SameKind (Apply (TFHelper_6989586621679502166Sym1 a6989586621679502164) arg_a245y) (TFHelper_6989586621679502166Sym2 a6989586621679502164 arg_a245y) => TFHelper_6989586621679502166Sym1 a6989586621679502164 a6989586621679502165
+ Termonad.Config.Vec: [TFHelper_6989586621679502182Sym0KindInference] :: forall a6989586621679502180 arg_a245P. SameKind (Apply TFHelper_6989586621679502182Sym0 arg_a245P) (TFHelper_6989586621679502182Sym1 arg_a245P) => TFHelper_6989586621679502182Sym0 a6989586621679502180
+ Termonad.Config.Vec: [TFHelper_6989586621679502182Sym1KindInference] :: forall a6989586621679502180 a6989586621679502181 arg_a245O. SameKind (Apply (TFHelper_6989586621679502182Sym1 a6989586621679502180) arg_a245O) (TFHelper_6989586621679502182Sym2 a6989586621679502180 arg_a245O) => TFHelper_6989586621679502182Sym1 a6989586621679502180 a6989586621679502181
+ Termonad.Config.Vec: [TFHelper_6989586621679502198Sym0KindInference] :: forall a6989586621679502196 arg_a2465. SameKind (Apply TFHelper_6989586621679502198Sym0 arg_a2465) (TFHelper_6989586621679502198Sym1 arg_a2465) => TFHelper_6989586621679502198Sym0 a6989586621679502196
+ Termonad.Config.Vec: [TFHelper_6989586621679502198Sym1KindInference] :: forall a6989586621679502196 a6989586621679502197 arg_a2464. SameKind (Apply (TFHelper_6989586621679502198Sym1 a6989586621679502196) arg_a2464) (TFHelper_6989586621679502198Sym2 a6989586621679502196 arg_a2464) => TFHelper_6989586621679502198Sym1 a6989586621679502196 a6989586621679502197
+ Termonad.Config.Vec: data Abs_6989586621679502208Sym0 :: (~>) Peano Peano
+ Termonad.Config.Vec: data Compare_6989586621679500928Sym0 :: (~>) Peano ((~>) Peano Ordering)
+ Termonad.Config.Vec: data Compare_6989586621679500928Sym1 (a6989586621679500926 :: Peano) :: (~>) Peano Ordering
+ Termonad.Config.Vec: data FromInteger_6989586621679502231Sym0 :: (~>) Nat Peano
+ Termonad.Config.Vec: data Let6989586621679502220Scrutinee_6989586621679487299Sym0 n6989586621679502219
+ Termonad.Config.Vec: data Let6989586621679502224Scrutinee_6989586621679487301Sym0 n6989586621679502219
+ Termonad.Config.Vec: data ShowsPrec_6989586621679501629Sym0 :: (~>) Nat ((~>) Peano ((~>) Symbol Symbol))
+ Termonad.Config.Vec: data ShowsPrec_6989586621679501629Sym1 (a6989586621679501626 :: Nat) :: (~>) Peano ((~>) Symbol Symbol)
+ Termonad.Config.Vec: data ShowsPrec_6989586621679501629Sym2 (a6989586621679501626 :: Nat) (a6989586621679501627 :: Peano) :: (~>) Symbol Symbol
+ Termonad.Config.Vec: data Signum_6989586621679502214Sym0 :: (~>) Peano Peano
+ Termonad.Config.Vec: data TFHelper_6989586621679502166Sym0 :: (~>) Peano ((~>) Peano Peano)
+ Termonad.Config.Vec: data TFHelper_6989586621679502166Sym1 (a6989586621679502164 :: Peano) :: (~>) Peano Peano
+ Termonad.Config.Vec: data TFHelper_6989586621679502182Sym0 :: (~>) Peano ((~>) Peano Peano)
+ Termonad.Config.Vec: data TFHelper_6989586621679502182Sym1 (a6989586621679502180 :: Peano) :: (~>) Peano Peano
+ Termonad.Config.Vec: data TFHelper_6989586621679502198Sym0 :: (~>) Peano ((~>) Peano Peano)
+ Termonad.Config.Vec: data TFHelper_6989586621679502198Sym1 (a6989586621679502196 :: Peano) :: (~>) Peano Peano
+ Termonad.Config.Vec: instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings (Termonad.Config.Vec.AddPeanoSym1 a6989586621679499186)
+ Termonad.Config.Vec: instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings (Termonad.Config.Vec.Compare_6989586621679500928Sym1 a6989586621679500926)
+ Termonad.Config.Vec: instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings (Termonad.Config.Vec.MultPeanoSym1 a6989586621679499193)
+ Termonad.Config.Vec: instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings (Termonad.Config.Vec.ShowsPrec_6989586621679501629Sym1 a6989586621679501626)
+ Termonad.Config.Vec: instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings (Termonad.Config.Vec.ShowsPrec_6989586621679501629Sym2 a6989586621679501627 a6989586621679501626)
+ Termonad.Config.Vec: instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings (Termonad.Config.Vec.SubtractPeanoSym1 a6989586621679499179)
+ Termonad.Config.Vec: instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings (Termonad.Config.Vec.TFHelper_6989586621679502166Sym1 a6989586621679502164)
+ Termonad.Config.Vec: instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings (Termonad.Config.Vec.TFHelper_6989586621679502182Sym1 a6989586621679502180)
+ Termonad.Config.Vec: instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings (Termonad.Config.Vec.TFHelper_6989586621679502198Sym1 a6989586621679502196)
+ Termonad.Config.Vec: instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings Termonad.Config.Vec.Abs_6989586621679502208Sym0
+ Termonad.Config.Vec: instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings Termonad.Config.Vec.Compare_6989586621679500928Sym0
+ Termonad.Config.Vec: instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings Termonad.Config.Vec.FromInteger_6989586621679502231Sym0
+ Termonad.Config.Vec: instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings Termonad.Config.Vec.Let6989586621679502220Scrutinee_6989586621679487299Sym0
+ Termonad.Config.Vec: instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings Termonad.Config.Vec.Let6989586621679502224Scrutinee_6989586621679487301Sym0
+ Termonad.Config.Vec: instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings Termonad.Config.Vec.ShowsPrec_6989586621679501629Sym0
+ Termonad.Config.Vec: instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings Termonad.Config.Vec.Signum_6989586621679502214Sym0
+ Termonad.Config.Vec: instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings Termonad.Config.Vec.TFHelper_6989586621679502166Sym0
+ Termonad.Config.Vec: instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings Termonad.Config.Vec.TFHelper_6989586621679502182Sym0
+ Termonad.Config.Vec: instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings Termonad.Config.Vec.TFHelper_6989586621679502198Sym0
+ Termonad.Config.Vec: type Abs_6989586621679502208Sym1 (a6989586621679502207 :: Peano) = Abs_6989586621679502208 a6989586621679502207
+ Termonad.Config.Vec: type Compare_6989586621679500928Sym2 (a6989586621679500926 :: Peano) (a6989586621679500927 :: Peano) = Compare_6989586621679500928 a6989586621679500926 a6989586621679500927
+ Termonad.Config.Vec: type FromInteger_6989586621679502231Sym1 (a6989586621679502230 :: Nat) = FromInteger_6989586621679502231 a6989586621679502230
+ Termonad.Config.Vec: type Let6989586621679502220Scrutinee_6989586621679487299Sym1 n6989586621679502219 = Let6989586621679502220Scrutinee_6989586621679487299 n6989586621679502219
+ Termonad.Config.Vec: type Let6989586621679502224Scrutinee_6989586621679487301Sym1 n6989586621679502219 = Let6989586621679502224Scrutinee_6989586621679487301 n6989586621679502219
+ Termonad.Config.Vec: type ShowsPrec_6989586621679501629Sym3 (a6989586621679501626 :: Nat) (a6989586621679501627 :: Peano) (a6989586621679501628 :: Symbol) = ShowsPrec_6989586621679501629 a6989586621679501626 a6989586621679501627 a6989586621679501628
+ Termonad.Config.Vec: type Signum_6989586621679502214Sym1 (a6989586621679502213 :: Peano) = Signum_6989586621679502214 a6989586621679502213
+ Termonad.Config.Vec: type TFHelper_6989586621679502166Sym2 (a6989586621679502164 :: Peano) (a6989586621679502165 :: Peano) = TFHelper_6989586621679502166 a6989586621679502164 a6989586621679502165
+ Termonad.Config.Vec: type TFHelper_6989586621679502182Sym2 (a6989586621679502180 :: Peano) (a6989586621679502181 :: Peano) = TFHelper_6989586621679502182 a6989586621679502180 a6989586621679502181
+ Termonad.Config.Vec: type TFHelper_6989586621679502198Sym2 (a6989586621679502196 :: Peano) (a6989586621679502197 :: Peano) = TFHelper_6989586621679502198 a6989586621679502196 a6989586621679502197
+ Termonad.Pcre: inline_c_ffi_6989586621679117647 :: IO CUInt
+ Termonad.PreferencesFile: getPreferencesFile :: IO FilePath
+ Termonad.PreferencesFile: saveToPreferencesFile :: TMConfig -> IO ()
+ Termonad.PreferencesFile: tmConfigFromPreferencesFile :: IO TMConfig
+ Termonad.PreferencesFile: writePreferencesFile :: FilePath -> ConfigOptions -> IO ()
+ Termonad.Term: handleMousePress :: Terminal -> EventButton -> IO Bool
+ Termonad.Types: instance Data.Aeson.Types.FromJSON.FromJSON GI.Vte.Enums.CursorBlinkMode
+ Termonad.Types: instance Data.Aeson.Types.FromJSON.FromJSON Termonad.Types.ConfigOptions
+ Termonad.Types: instance Data.Aeson.Types.FromJSON.FromJSON Termonad.Types.FontConfig
+ Termonad.Types: instance Data.Aeson.Types.FromJSON.FromJSON Termonad.Types.FontSize
+ Termonad.Types: instance Data.Aeson.Types.FromJSON.FromJSON Termonad.Types.ShowScrollbar
+ Termonad.Types: instance Data.Aeson.Types.FromJSON.FromJSON Termonad.Types.ShowTabBar
+ Termonad.Types: instance Data.Aeson.Types.ToJSON.ToJSON GI.Vte.Enums.CursorBlinkMode
+ Termonad.Types: instance Data.Aeson.Types.ToJSON.ToJSON Termonad.Types.ConfigOptions
+ Termonad.Types: instance Data.Aeson.Types.ToJSON.ToJSON Termonad.Types.FontConfig
+ Termonad.Types: instance Data.Aeson.Types.ToJSON.ToJSON Termonad.Types.FontSize
+ Termonad.Types: instance Data.Aeson.Types.ToJSON.ToJSON Termonad.Types.ShowScrollbar
+ Termonad.Types: instance Data.Aeson.Types.ToJSON.ToJSON Termonad.Types.ShowTabBar
+ Termonad.Types: instance GHC.Generics.Generic Termonad.Types.ConfigOptions
+ Termonad.Types: instance GHC.Generics.Generic Termonad.Types.FontConfig
+ Termonad.Types: instance GHC.Generics.Generic Termonad.Types.FontSize
+ Termonad.Types: instance GHC.Generics.Generic Termonad.Types.ShowScrollbar
+ Termonad.Types: instance GHC.Generics.Generic Termonad.Types.ShowTabBar
- Termonad.Config.Colour: lensBackgroundColour :: forall c_a2Jwz. Lens' (ColourConfig c_a2Jwz) (Option c_a2Jwz)
+ Termonad.Config.Colour: lensBackgroundColour :: forall c_a2Tj9. Lens' (ColourConfig c_a2Tj9) (Option c_a2Tj9)
- Termonad.Config.Colour: lensCursorBgColour :: forall c_a2Jwz. Lens' (ColourConfig c_a2Jwz) (Option c_a2Jwz)
+ Termonad.Config.Colour: lensCursorBgColour :: forall c_a2Tj9. Lens' (ColourConfig c_a2Tj9) (Option c_a2Tj9)
- Termonad.Config.Colour: lensCursorFgColour :: forall c_a2Jwz. Lens' (ColourConfig c_a2Jwz) (Option c_a2Jwz)
+ Termonad.Config.Colour: lensCursorFgColour :: forall c_a2Tj9. Lens' (ColourConfig c_a2Tj9) (Option c_a2Tj9)
- Termonad.Config.Colour: lensForegroundColour :: forall c_a2Jwz. Lens' (ColourConfig c_a2Jwz) (Option c_a2Jwz)
+ Termonad.Config.Colour: lensForegroundColour :: forall c_a2Tj9. Lens' (ColourConfig c_a2Tj9) (Option c_a2Tj9)
- Termonad.Config.Colour: lensPalette :: forall c_a2Jwz. Lens' (ColourConfig c_a2Jwz) (Palette c_a2Jwz)
+ Termonad.Config.Colour: lensPalette :: forall c_a2Tj9. Lens' (ColourConfig c_a2Tj9) (Palette c_a2Tj9)
- Termonad.Config.Vec: [AddPeanoSym0KindInference] :: forall a6989586621679498912 arg_a23f5. SameKind (Apply AddPeanoSym0 arg_a23f5) (AddPeanoSym1 arg_a23f5) => AddPeanoSym0 a6989586621679498912
+ Termonad.Config.Vec: [AddPeanoSym0KindInference] :: forall a6989586621679499186 arg_a23jv. SameKind (Apply AddPeanoSym0 arg_a23jv) (AddPeanoSym1 arg_a23jv) => AddPeanoSym0 a6989586621679499186
- Termonad.Config.Vec: [AddPeanoSym1KindInference] :: forall a6989586621679498912 a6989586621679498913 arg_a23f4. SameKind (Apply (AddPeanoSym1 a6989586621679498912) arg_a23f4) (AddPeanoSym2 a6989586621679498912 arg_a23f4) => AddPeanoSym1 a6989586621679498912 a6989586621679498913
+ Termonad.Config.Vec: [AddPeanoSym1KindInference] :: forall a6989586621679499186 a6989586621679499187 arg_a23ju. SameKind (Apply (AddPeanoSym1 a6989586621679499186) arg_a23ju) (AddPeanoSym2 a6989586621679499186 arg_a23ju) => AddPeanoSym1 a6989586621679499186 a6989586621679499187
- Termonad.Config.Vec: [MultPeanoSym0KindInference] :: forall a6989586621679498919 arg_a23fc. SameKind (Apply MultPeanoSym0 arg_a23fc) (MultPeanoSym1 arg_a23fc) => MultPeanoSym0 a6989586621679498919
+ Termonad.Config.Vec: [MultPeanoSym0KindInference] :: forall a6989586621679499193 arg_a23jC. SameKind (Apply MultPeanoSym0 arg_a23jC) (MultPeanoSym1 arg_a23jC) => MultPeanoSym0 a6989586621679499193
- Termonad.Config.Vec: [MultPeanoSym1KindInference] :: forall a6989586621679498919 a6989586621679498920 arg_a23fb. SameKind (Apply (MultPeanoSym1 a6989586621679498919) arg_a23fb) (MultPeanoSym2 a6989586621679498919 arg_a23fb) => MultPeanoSym1 a6989586621679498919 a6989586621679498920
+ Termonad.Config.Vec: [MultPeanoSym1KindInference] :: forall a6989586621679499193 a6989586621679499194 arg_a23jB. SameKind (Apply (MultPeanoSym1 a6989586621679499193) arg_a23jB) (MultPeanoSym2 a6989586621679499193 arg_a23jB) => MultPeanoSym1 a6989586621679499193 a6989586621679499194
- Termonad.Config.Vec: [SSym0KindInference] :: forall t6989586621679498903 arg_a23eU. SameKind (Apply SSym0 arg_a23eU) (SSym1 arg_a23eU) => SSym0 t6989586621679498903
+ Termonad.Config.Vec: [SSym0KindInference] :: forall t6989586621679499177 arg_a23jk. SameKind (Apply SSym0 arg_a23jk) (SSym1 arg_a23jk) => SSym0 t6989586621679499177
- Termonad.Config.Vec: [SubtractPeanoSym0KindInference] :: forall a6989586621679498905 arg_a23eY. SameKind (Apply SubtractPeanoSym0 arg_a23eY) (SubtractPeanoSym1 arg_a23eY) => SubtractPeanoSym0 a6989586621679498905
+ Termonad.Config.Vec: [SubtractPeanoSym0KindInference] :: forall a6989586621679499179 arg_a23jo. SameKind (Apply SubtractPeanoSym0 arg_a23jo) (SubtractPeanoSym1 arg_a23jo) => SubtractPeanoSym0 a6989586621679499179
- Termonad.Config.Vec: [SubtractPeanoSym1KindInference] :: forall a6989586621679498905 a6989586621679498906 arg_a23eX. SameKind (Apply (SubtractPeanoSym1 a6989586621679498905) arg_a23eX) (SubtractPeanoSym2 a6989586621679498905 arg_a23eX) => SubtractPeanoSym1 a6989586621679498905 a6989586621679498906
+ Termonad.Config.Vec: [SubtractPeanoSym1KindInference] :: forall a6989586621679499179 a6989586621679499180 arg_a23jn. SameKind (Apply (SubtractPeanoSym1 a6989586621679499179) arg_a23jn) (SubtractPeanoSym2 a6989586621679499179 arg_a23jn) => SubtractPeanoSym1 a6989586621679499179 a6989586621679499180
- Termonad.Config.Vec: data AddPeanoSym1 (a6989586621679498912 :: Peano) :: (~>) Peano Peano
+ Termonad.Config.Vec: data AddPeanoSym1 (a6989586621679499186 :: Peano) :: (~>) Peano Peano
- Termonad.Config.Vec: data MultPeanoSym1 (a6989586621679498919 :: Peano) :: (~>) Peano Peano
+ Termonad.Config.Vec: data MultPeanoSym1 (a6989586621679499193 :: Peano) :: (~>) Peano Peano
- Termonad.Config.Vec: data SubtractPeanoSym1 (a6989586621679498905 :: Peano) :: (~>) Peano Peano
+ Termonad.Config.Vec: data SubtractPeanoSym1 (a6989586621679499179 :: Peano) :: (~>) Peano Peano
- Termonad.Config.Vec: sAddPeano :: forall (t_a242m :: Peano) (t_a242n :: Peano). Sing t_a242m -> Sing t_a242n -> Sing (Apply (Apply AddPeanoSym0 t_a242m) t_a242n :: Peano)
+ Termonad.Config.Vec: sAddPeano :: forall (t_a246M :: Peano) (t_a246N :: Peano). Sing t_a246M -> Sing t_a246N -> Sing (Apply (Apply AddPeanoSym0 t_a246M) t_a246N :: Peano)
- Termonad.Config.Vec: sMultPeano :: forall (t_a242q :: Peano) (t_a242r :: Peano). Sing t_a242q -> Sing t_a242r -> Sing (Apply (Apply MultPeanoSym0 t_a242q) t_a242r :: Peano)
+ Termonad.Config.Vec: sMultPeano :: forall (t_a246Q :: Peano) (t_a246R :: Peano). Sing t_a246Q -> Sing t_a246R -> Sing (Apply (Apply MultPeanoSym0 t_a246Q) t_a246R :: Peano)
- Termonad.Config.Vec: sSubtractPeano :: forall (t_a242i :: Peano) (t_a242j :: Peano). Sing t_a242i -> Sing t_a242j -> Sing (Apply (Apply SubtractPeanoSym0 t_a242i) t_a242j :: Peano)
+ Termonad.Config.Vec: sSubtractPeano :: forall (t_a246I :: Peano) (t_a246J :: Peano). Sing t_a246I -> Sing t_a246J -> Sing (Apply (Apply SubtractPeanoSym0 t_a246I) t_a246J :: Peano)
- Termonad.Config.Vec: type AddPeanoSym2 (a6989586621679498912 :: Peano) (a6989586621679498913 :: Peano) = AddPeano a6989586621679498912 a6989586621679498913
+ Termonad.Config.Vec: type AddPeanoSym2 (a6989586621679499186 :: Peano) (a6989586621679499187 :: Peano) = AddPeano a6989586621679499186 a6989586621679499187
- Termonad.Config.Vec: type MultPeanoSym2 (a6989586621679498919 :: Peano) (a6989586621679498920 :: Peano) = MultPeano a6989586621679498919 a6989586621679498920
+ Termonad.Config.Vec: type MultPeanoSym2 (a6989586621679499193 :: Peano) (a6989586621679499194 :: Peano) = MultPeano a6989586621679499193 a6989586621679499194
- Termonad.Config.Vec: type SSym1 (t6989586621679498903 :: Peano) = S t6989586621679498903
+ Termonad.Config.Vec: type SSym1 (t6989586621679499177 :: Peano) = S t6989586621679499177
- Termonad.Config.Vec: type SubtractPeanoSym2 (a6989586621679498905 :: Peano) (a6989586621679498906 :: Peano) = SubtractPeano a6989586621679498905 a6989586621679498906
+ Termonad.Config.Vec: type SubtractPeanoSym2 (a6989586621679499179 :: Peano) (a6989586621679499180 :: Peano) = SubtractPeano a6989586621679499179 a6989586621679499180
Files
- CHANGELOG.md +15/−0
- README.md +26/−0
- app/Main.hs +2/−2
- glade/preferences.glade +1/−1
- src/Termonad/App.hs +20/−1
- src/Termonad/Config.hs +2/−0
- src/Termonad/PreferencesFile.hs +70/−0
- src/Termonad/Term.hs +27/−2
- src/Termonad/Types.hs +28/−7
- termonad.cabal +4/−1
- test/readme/README.lhs +26/−0
CHANGELOG.md view
@@ -1,3 +1,18 @@++## 3.0.0.0++* Remove the one-pixel white border around the `GtkNotebook` (the GTK widget thing+ that contains the tabs). [#138](https://github.com/cdepillabout/termonad/pull/138)+* Add a right-click menu for the terminal. It currently allows copy and+ paste. [#136](https://github.com/cdepillabout/termonad/pull/136) Thanks+ @jecaro!+* Add a preferences file that settings will be saved to and read from at+ `~/.config/termonad/termonad.yaml`. You can change settings with the+ Preferences dialog. **The settings will only be used from this file if you+ do not have a `~/.config/termonad/termonad.hs` file**.+ [#140](https://github.com/cdepillabout/termonad/pull/140) Thanks again+ @jecaro!+ ## 2.1.0.0 * Add a menu option to set preferences for a running Termonad session. The preferences you have set are lost when you end the Termonad session. [#130](https://github.com/cdepillabout/termonad/pull/130) Thanks @jecaro!
README.md view
@@ -235,6 +235,32 @@ ### Configuring Termonad +Termonad has two different ways to be configured.++The first way is to use the built-in Preferences editor. You can find this in+the `Preferences` menu under `Edit` in the menubar.++When opening Termonad for the first time, it will create a preferences file at+`~/.config/termonad/termonad.yaml`. When you change a setting in the+Preferences editor, Termonad will update the setting in the preferences file.++When running Termonad, it will load settings from the preferences file.+Do not edit the preferences file by hand, because it will be overwritten when+updating settings in the Preferences editor.++This method is perfect for users who only want to make small changes to the+Termonad settings, like the default font size.++The second way to configure Termonad is to use a Haskell-based settings file,+called `~/.config/termonad/termonad.hs` by default. This method allows you to+make large, sweeping changes to Termonad. This method is recommended for power+users.++**WARNING: If you have a `~/.config/termonad/termonad.hs` file, then all+settings from `~/.config/termonad/termonad.yaml` will be ignored. If you want+to set *ANY* settings in `~/.config/termonad/termonad.hs`, then you must+set *ALL* settings in `~/.config/termonad/termonad.hs`.**+ The following is an example Termonad configuration file. You should save this to `~/.config/termonad/termonad.hs`. You can find more information on the available configuration options within the
app/Main.hs view
@@ -2,7 +2,7 @@ module Main where import Termonad (defaultMain)-import Termonad.Config (defaultTMConfig)+import Termonad.Config (tmConfigFromPreferencesFile) main :: IO ()-main = defaultMain defaultTMConfig+main = defaultMain =<< tmConfigFromPreferencesFile
glade/preferences.glade view
@@ -233,7 +233,7 @@ </packing> </child> <child>- <object class="GtkLabel">+ <object class="GtkLabel" id="warning"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="margin_left">5</property>
src/Termonad/App.hs view
@@ -5,7 +5,7 @@ import Termonad.Prelude import Config.Dyre (defaultParams, projectName, realMain, showError, wrapMain)-import Control.Lens ((&), (.~), (^.), (^..), over, set)+import Control.Lens ((&), (.~), (^.), (^..), over, set, view) import Data.FocusList (focusList, moveFromToFL, updateFocusFL) import Data.Sequence (findIndexR) import GI.Gdk (castTo, managedForeignPtr, screenGetDefault)@@ -29,6 +29,7 @@ , Dialog(Dialog) , Entry(Entry) , FontButton(FontButton)+ , Label(Label) , PolicyType(PolicyTypeAutomatic) , PositionType(PositionTypeRight) , ResponseType(ResponseTypeAccept, ResponseTypeNo, ResponseTypeYes)@@ -68,6 +69,7 @@ , labelNew , notebookGetNPages , notebookNew+ , notebookSetShowBorder , onEntryActivate , onNotebookPageRemoved , onNotebookPageReordered@@ -84,6 +86,7 @@ , widgetDestroy , widgetGrabFocus , widgetSetCanFocus+ , widgetSetVisible , widgetShow , widgetShowAll , windowPresent@@ -118,6 +121,8 @@ , terminalSetScrollbackLines , terminalSetWordCharExceptions )+import System.Environment (getExecutablePath)+import System.FilePath (takeFileName) import Paths_termonad (getDataFileName) import Termonad.Gtk (appNew, objFromBuildUnsafe)@@ -143,6 +148,7 @@ , lensTerm , lensWordCharExceptions )+import Termonad.PreferencesFile (saveToPreferencesFile) import Termonad.Term ( createTerm , relabelTabs@@ -365,6 +371,9 @@ fontDesc <- createFontDescFromConfig tmConfig note <- notebookNew widgetSetCanFocus note False+ -- If this is not set to False, then there will be a one pixel white border+ -- shown around the notebook.+ notebookSetShowBorder note False boxPackStart box note True True 0 mvarTMState <- newEmptyTMState tmConfig app win note fontDesc@@ -754,7 +763,14 @@ objFromBuildUnsafe preferencesBuilder "scrollbackLen" SpinButton adjustmentNew 0 0 (fromIntegral (maxBound :: Int)) 1 10 0 >>= spinButtonSetAdjustment scrollbackLenSpinButton+ warningLabel <- objFromBuildUnsafe preferencesBuilder "warning" Label + -- We show the warning label only if the user has launched termonad with a+ -- termonad.hs file+ executablePath <- getExecutablePath+ let hasTermonadHs = takeFileName executablePath == "termonad-linux-x86_64"+ widgetSetVisible warningLabel hasTermonadHs+ -- Make the dialog modal maybeWin <- applicationGetActiveWindow app windowSetTransientFor preferencesDialog maybeWin@@ -808,6 +824,9 @@ . over lensShowTabBar (`fromMaybe` maybeShowTabBar) . over lensCursorBlinkMode (`fromMaybe` maybeCursorBlinkMode) )++ -- Save the changes to the preferences files+ withMVar mvarTMState $ saveToPreferencesFile . view lensTMStateConfig -- Update the app with new settings applyNewPreferences mvarTMState
src/Termonad/Config.hs view
@@ -54,8 +54,10 @@ , ShowScrollbar(..) , ShowTabBar(..) , CursorBlinkMode(..)+ , tmConfigFromPreferencesFile ) where import GI.Vte (CursorBlinkMode(..)) +import Termonad.PreferencesFile (tmConfigFromPreferencesFile) import Termonad.Types
+ src/Termonad/PreferencesFile.hs view
@@ -0,0 +1,70 @@++module Termonad.PreferencesFile where++import Termonad.Prelude++import Data.Yaml (decodeFileEither, encode, prettyPrintParseException)+import System.Directory+ ( XdgDirectory(XdgConfig)+ , createDirectoryIfMissing+ , doesFileExist+ , getXdgDirectory+ )++import Termonad.Types+ ( ConfigOptions+ , TMConfig(TMConfig, hooks, options)+ , defaultConfigHooks+ , defaultConfigOptions+ )++-- | Get the path to the preferences file @~\/.config\/termonad\/termonad.yaml@.+getPreferencesFile :: IO FilePath+getPreferencesFile = do+ -- Get the termonad config directory+ confDir <- getXdgDirectory XdgConfig "termonad"+ createDirectoryIfMissing True confDir+ pure $ confDir </> "termonad.yaml"++-- | Read the configuration for the preferences file+-- @~\/.config\/termonad\/termonad.yaml@. This file stores only the 'options' of+-- 'TMConfig' so 'hooks' are initialized with 'defaultConfigHooks'. If the+-- file doesn't exist, create it with the default values.+tmConfigFromPreferencesFile :: IO TMConfig+tmConfigFromPreferencesFile = do+ confFile <- getPreferencesFile+ -- If there is no preferences file we create it with the default values+ exists <- doesFileExist confFile+ unless exists $ writePreferencesFile confFile defaultConfigOptions+ -- Read the configuration file+ eitherOptions <- decodeFileEither confFile+ options <-+ case eitherOptions of+ Left err -> do+ hPutStrLn stderr $ "Error parsing file " <> pack confFile+ hPutStrLn stderr $ pack $ prettyPrintParseException err+ pure defaultConfigOptions+ Right options -> pure options+ pure $ TMConfig { options = options, hooks = defaultConfigHooks }++writePreferencesFile :: FilePath -> ConfigOptions -> IO ()+writePreferencesFile confFile options = do+ let yaml = encode options+ yamlWithComment =+ "# DO NOT EDIT THIS FILE BY HAND!\n" <>+ "#\n" <>+ "# This file is generated automatically by the Preferences dialog\n" <>+ "# in Termonad. Please open the Preferences dialog if you wish to\n" <>+ "# modify this file.\n" <>+ "#\n" <>+ "# The settings in this file will be ignored if you have a\n" <>+ "# termonad.hs file in this same directory.\n\n" <>+ yaml+ writeFile confFile yamlWithComment++-- | Save the configuration to the preferences file+-- @~\/.config\/termonad\/termonad.yaml@+saveToPreferencesFile :: TMConfig -> IO ()+saveToPreferencesFile TMConfig { options = options } = do+ confFile <- getPreferencesFile+ writePreferencesFile confFile options
src/Termonad/Term.hs view
@@ -8,15 +8,20 @@ import Data.Colour.SRGB (Colour, RGB(RGB), toSRGB) import Data.FocusList (appendFL, deleteFL, getFocusItemFL) import GI.Gdk- ( EventKey+ ( EventButton+ , EventKey , RGBA+ , getEventButtonButton , newZeroRGBA , setRGBABlue , setRGBAGreen , setRGBARed )+import GI.Gdk.Constants (pattern BUTTON_SECONDARY) import GI.Gio- ( noCancellable+ ( menuAppend+ , menuNew+ , noCancellable ) import GI.GLib ( SpawnFlags(SpawnFlagsDefault)@@ -47,6 +52,9 @@ , labelSetEllipsize , labelSetLabel , labelSetMaxWidthChars+ , menuAttachToWidget+ , menuNewFromModel+ , menuPopupAtPointer , noAdjustment , notebookAppendPage , notebookDetachTab@@ -56,6 +64,7 @@ , notebookSetShowTabs , notebookSetTabReorderable , onButtonClicked+ , onWidgetButtonPressEvent , onWidgetKeyPressEvent , scrolledWindowNew , scrolledWindowSetPolicy@@ -446,6 +455,7 @@ relabelTab notebook tabLabel scrolledWin vteTerm void $ onWidgetKeyPressEvent vteTerm $ handleKeyPress mvarTMState void $ onWidgetKeyPressEvent scrolledWin $ handleKeyPress mvarTMState+ void $ onWidgetButtonPressEvent vteTerm $ handleMousePress vteTerm void $ onTerminalChildExited vteTerm $ \_ -> termExit notebookTab mvarTMState -- Put the keyboard focus on the term@@ -457,3 +467,18 @@ -- Run user-defined hooks for modifying the newly-created VTE Terminal. createTermHook (hooks tmStateConfig) mvarTMState vteTerm pure tmTerm++-- | Popup the context menu on right click+handleMousePress :: Terminal -> EventButton -> IO Bool+handleMousePress vteTerm event = do+ button <- getEventButtonButton event+ let rightClick = button == fromIntegral BUTTON_SECONDARY+ when rightClick $ do+ menuModel <- menuNew+ menuAppend menuModel (Just "Copy") (Just "app.copy")+ menuAppend menuModel (Just "Paste") (Just "app.paste")+ menu <- menuNewFromModel menuModel+ menuAttachToWidget menu vteTerm Nothing+ menuPopupAtPointer menu Nothing+ pure rightClick+
src/Termonad/Types.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE StandaloneDeriving #-}+{-# OPTIONS_GHC -fno-warn-orphans #-} module Termonad.Types where @@ -6,6 +6,12 @@ import Data.FocusList (FocusList, emptyFL, singletonFL, getFocusItemFL, lengthFL) import Data.Unique (Unique, hashUnique, newUnique)+import Data.Yaml+ ( FromJSON(parseJSON)+ , ToJSON(toJSON)+ , Value(String)+ , withText+ ) import GI.Gtk ( Application , ApplicationWindow@@ -19,7 +25,7 @@ , notebookGetNPages ) import GI.Pango (FontDescription)-import GI.Vte (Terminal, CursorBlinkMode(CursorBlinkModeOn))+import GI.Vte (Terminal, CursorBlinkMode(..)) import Text.Pretty.Simple (pPrint) import Text.Show (Show(showsPrec), ShowS, showParen, showString) @@ -258,7 +264,7 @@ -- can be thought of as one pixel. The function -- 'GI.Pango.fontDescriptionSetAbsoluteSize' is used to set the font size. -- See the documentation for that function for more info.- deriving (Eq, Show)+ deriving (Eq, FromJSON, Generic, Show, ToJSON) -- | The default 'FontSize' used if not specified. --@@ -300,7 +306,7 @@ -- ^ The font family to use. Example: @"DejaVu Sans Mono"@ or @"Source Code Pro"@ , fontSize :: !FontSize -- ^ The font size.- } deriving (Eq, Show)+ } deriving (Eq, FromJSON, Generic, Show, ToJSON) -- | The default 'FontConfig' to use if not specified. --@@ -347,7 +353,7 @@ -- needed. | ShowScrollbarIfNeeded -- ^ Only show the scrollbar if there are too many -- lines on the terminal to show all at once.- deriving (Enum, Eq, Show)+ deriving (Enum, Eq, Generic, FromJSON, Show, ToJSON) -- | Whether or not to show the tab bar for switching tabs. data ShowTabBar@@ -355,7 +361,7 @@ -- open. This may be confusing if you plan on using multiple tabs. | ShowTabBarAlways -- ^ Always show the tab bar, even if you only have one tab open. | ShowTabBarIfNeeded -- ^ Only show the tab bar if you have multiple tabs open.- deriving (Enum, Eq, Show)+ deriving (Enum, Eq, Generic, FromJSON, Show, ToJSON) -- | Configuration options for Termonad. --@@ -386,7 +392,22 @@ -- ^ When to show the tab bar. , cursorBlinkMode :: !CursorBlinkMode -- ^ How to handle cursor blink.- } deriving (Eq, Show)+ } deriving (Eq, Generic, FromJSON, Show, ToJSON)++instance FromJSON CursorBlinkMode where+ parseJSON = withText "CursorBlinkMode" $ \c -> do+ case (c :: Text) of+ "CursorBlinkModeSystem" -> pure CursorBlinkModeSystem+ "CursorBlinkModeOn" -> pure CursorBlinkModeOn+ "CursorBlinkModeOff" -> pure CursorBlinkModeOff+ _ -> fail "Wrong value for CursorBlinkMode"++instance ToJSON CursorBlinkMode where+ toJSON CursorBlinkModeSystem = String "CursorBlinkModeSystem"+ toJSON CursorBlinkModeOn = String "CursorBlinkModeOn"+ toJSON CursorBlinkModeOff = String "CursorBlinkModeOff"+ -- Not supposed to happened fall back to system+ toJSON (AnotherCursorBlinkMode _) = String "CursorBlinkModeSystem" -- | The default 'ConfigOptions'. --
termonad.cabal view
@@ -1,5 +1,5 @@ name: termonad-version: 2.1.0.0+version: 3.0.0.0 synopsis: Terminal emulator configurable in Haskell description: Please see <https://github.com/cdepillabout/termonad#readme README.md>. homepage: https://github.com/cdepillabout/termonad@@ -49,6 +49,7 @@ , Termonad.Keys , Termonad.Lenses , Termonad.Pcre+ , Termonad.PreferencesFile , Termonad.Prelude , Termonad.Term , Termonad.Types@@ -82,6 +83,7 @@ , singletons , text , transformers+ , yaml , xml-conduit , xml-html-qq default-language: Haskell2010@@ -91,6 +93,7 @@ , DeriveAnyClass , DeriveFoldable , DeriveFunctor+ , DeriveGeneric , DerivingStrategies , EmptyCase , ExistentialQuantification
test/readme/README.lhs view
@@ -235,6 +235,32 @@ ### Configuring Termonad +Termonad has two different ways to be configured.++The first way is to use the built-in Preferences editor. You can find this in+the `Preferences` menu under `Edit` in the menubar.++When opening Termonad for the first time, it will create a preferences file at+`~/.config/termonad/termonad.yaml`. When you change a setting in the+Preferences editor, Termonad will update the setting in the preferences file.++When running Termonad, it will load settings from the preferences file.+Do not edit the preferences file by hand, because it will be overwritten when+updating settings in the Preferences editor.++This method is perfect for users who only want to make small changes to the+Termonad settings, like the default font size.++The second way to configure Termonad is to use a Haskell-based settings file,+called `~/.config/termonad/termonad.hs` by default. This method allows you to+make large, sweeping changes to Termonad. This method is recommended for power+users.++**WARNING: If you have a `~/.config/termonad/termonad.hs` file, then all+settings from `~/.config/termonad/termonad.yaml` will be ignored. If you want+to set *ANY* settings in `~/.config/termonad/termonad.hs`, then you must+set *ALL* settings in `~/.config/termonad/termonad.hs`.**+ The following is an example Termonad configuration file. You should save this to `~/.config/termonad/termonad.hs`. You can find more information on the available configuration options within the