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
-- | |
-- Is there a more efficient/elegant way to do this? | |
-- | |
-- Objective: To disable/enable the mouse cursor for specific windows | |
-- | |
checkMouseDisable :: X () | |
checkMouseDisable = do |
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
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE TypeOperators #-} | |
module Eliminate where | |
data Nat = Zero | Succ Nat | |
type family n + m where |
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
data FooF = Foo { alpha :: HKD f Int, beta :: HKD f Int, gamma :: HKD f Int | |
, delta :: HKD f Int, eta :: HKD f Int } deriving (Eq, Ord, Show) | |
type Foo = FooF Identity | |
newtype Combine a = C { applyC :: a -> a -> a } | |
combineFoos :: FooF Combine -> Foo -> Foo -> Foo | |
combineFoos (Foo fa fb fg fd fe) (Foo a0 b0 g0 d0 e0) (Foo a1 b1 g1 d1 e1) | |
= Foo (applyC fa a0 a1) (applyC fb b0 b1) (applyC fg g0 g1) (applyC fd d0 d1) (applyC fe e0 e1) |
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
print ("Assembling strips...") | |
for siy in range (0, 10): | |
mapstrip = image.new("RGB", (5000, 500)) | |
for six in range (0, 10): | |
mapstrip.paste(image.open("{}{}y{}.png".format(regiondirname, six, siy)), (500*six, 0)) | |
mapstrip.save("strip{}.png".format(siy)) | |
print ("Assembling full map...") | |
worldmap = image.new("RGB", (5000, 5000)) | |
for sin in range(0, 10): |