Skip to content

Instantly share code, notes, and snippets.

View buggymcbugfix's full-sized avatar

Vilem Liepelt buggymcbugfix

View GitHub Profile
@buggymcbugfix
buggymcbugfix / Commit.hs
Created July 22, 2019 12:39 — forked from i-am-tom/Commit.hs
Apply your function parameters in any order, for no reason other than that you can.
{-# lAnGuAgE DataKinds #-}
{-# LaNgUaGe FlexibleInstances #-}
{-# lAnGuAgE FunctionalDependencies #-}
{-# LaNgUaGe KindSignatures #-}
{-# lAnGuAgE TypeFamilies #-}
{-# LaNgUaGe TypeOperators #-}
{-# lAnGuAgE UndecidableInstances #-}
module Commit where
import Data.Kind (Constraint, Type)
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Main where
import Control.Monad.Random.Class
import Control.Monad.Reader
import Data.Foldable (for_)
import Graphics.Rendering.Cairo hiding (x, y)
import qualified Numeric.Noise.Perlin as P
import System.Random
@buggymcbugfix
buggymcbugfix / total.hs
Last active October 18, 2017 08:50 — forked from tfausak/total.hs
Sums numbers on the command line.
#! /usr/bin/env stack
-- stack --resolver lts-8.15 --install-ghc script --package base
{-# LANGUAGE ScopedTypeVariables #-}
-- Usage:
-- $ echo -e "1.2 3.4\n5.6 not-a-number" | ./total.hs
-- 10.2
import Data.Maybe (mapMaybe)
import Text.Read (readMaybe)