Skip to content

Instantly share code, notes, and snippets.

--
-- Is there a more efficient/elegant way to do this?
--
-- Objective: To disable/enable the mouse cursor for specific windows
--
checkMouseDisable :: X ()
checkMouseDisable = do
@Solonarv
Solonarv / Eliminate.hs
Last active September 5, 2018 20:06 — forked from alexpeits/Eliminate.hs
Haskell Peano Arithmetic
{-# LANGUAGE GADTs #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
module Eliminate where
data Nat = Zero | Succ Nat
type family n + m where
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)
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):