This file contains hidden or 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
#! /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) |
This file contains hidden or 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 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 |
This file contains hidden or 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 DataKinds #-} | |
{-# LaNgUaGe FlexibleInstances #-} | |
{-# lAnGuAgE FunctionalDependencies #-} | |
{-# LaNgUaGe KindSignatures #-} | |
{-# lAnGuAgE TypeFamilies #-} | |
{-# LaNgUaGe TypeOperators #-} | |
{-# lAnGuAgE UndecidableInstances #-} | |
module Commit where | |
import Data.Kind (Constraint, Type) |