Skip to content

Instantly share code, notes, and snippets.

@Lazzlo2096
Lazzlo2096 / *.hs
Created August 2, 2018 14:03
Новые вопросы Hs 2018.08.02
f :: p -> p
f z = z
data MyT = O Int | T Char deriving(Show)
data MyT2 = O2 Int | T2 Char deriving(Show)
g :: MyT -> MyT
g z = z
-- f O 3
@Lazzlo2096
Lazzlo2096 / prekek.hs
Created August 1, 2018 15:06
Has Pre kek 0.1
-- Int : 1,2,3,..
data Qwe = Non1 | Non2 deriving( Show )
data As = AA Int | SS Qwe deriving( Show )
----data As2 a = AAA (Just Int) | SSS (Just Qwe)
data As2 = AAA (Maybe Int) | SSS (Maybe Qwe) deriving( Show )
----f :: Int of Qwe -> (Maybe Int or Maybe Qwe)
f :: As -> As2
f (AA a) = AAA (Just a)
{-# LANGUAGE DeriveFunctor #-}
import Data.Functor
data SomeThingElse a = Some a | Thing
deriving (Functor, Show)
-- 5 <$ Just () == Just 5
-- 5 <$ Some () == Some 5
@Lazzlo2096
Lazzlo2096 / gist:b90b195525d7f0c701b3f9bf4a7800bb
Last active April 9, 2018 12:47
How compile fdupes on windows (but no!)
// https://github.com/libressl-portable/portable/blob/master/include/compat/sys/stat.h
// Dont forget place file "portable_endian.h" from https://gist.github.com/panzi/6856583 in /md5 directory
// This make fdupes compile, but it still dosen't work on windows (I think trouble in file API or something like)
// https://msdn.microsoft.com/en-us/library/14h5k7ff.aspx
// https://arrayfire.com/cross-compile-to-windows-from-linux/
diff --git a/Makefile b/Makefile
index bc5ff54..1cb3925 100644
--- a/Makefile