Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jack Garner
committed
Oct 19, 2020
1 parent
b287dfc
commit 819a8a5
Showing
21 changed files
with
926 additions
and
864 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
eval "$(lorri direnv)" | ||
use nix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,26 @@ | ||
module Base.Helpers where | ||
|
||
import Standard | ||
import Data.Kind | ||
import Graphics.X11.Types | ||
|
||
import Data.Kind | ||
import Graphics.X11.Types | ||
import Standard | ||
|
||
type family TypeMap (f :: a -> a -> b) (xs :: [a]) where | ||
TypeMap _ '[] = '[] | ||
TypeMap f (x ': xs) = f x x ': TypeMap f xs | ||
TypeMap _ '[] = '[] | ||
TypeMap f (x ': xs) = f x x ': TypeMap f xs | ||
|
||
type family (++) (a :: [t]) (b :: [t]) where | ||
(++) '[] b = b | ||
(++) (a ': as) b = a ': (as ++ b) | ||
|
||
|
||
-- |A type level function which takes a list of Types and turns them into | ||
-- inputs. | ||
-- | A type level function which takes a list of Types and turns them into | ||
-- inputs. | ||
type Inputs (a :: [Type]) = TypeMap HasSource a | ||
|
||
|
||
-- |Same as above but for State. | ||
-- | Same as above but for State. | ||
type States (a :: [Type]) = TypeMap HasState a | ||
|
||
newtype OldTime = OldTime Time | ||
deriving (Show) | ||
|
||
-- |Just makes it more clear when you say Input RootWindow. | ||
-- | Just makes it more clear when you say Input RootWindow. | ||
type RootWindow = Window |
Oops, something went wrong.