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 DataKinds #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE StandaloneDeriving #-} | |
{-# LANGUAGE TypeFamilies #-} | |
import Data.Functor.Const | |
import Data.Functor.Identity | |
data Nat = Z | S Nat |
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
-- | | |
-- Copyright: (c) 2018 Ertugrul Söylemez | |
-- License: BSD3 | |
-- Maintainer: Ertugrul Söylemez <[email protected]> | |
{-# LANGUAGE BangPatterns #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
module Crc32 (crc32M) 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
-- | |
-- Benchmark results at the bottom | |
-- | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
module Main where | |
import Control.Monad |
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
-- | | |
-- Copyright: (c) 2018 Ertugrul Söylemez | |
-- License: BSD3 | |
-- Maintainer: Ertugrul Söylemez <[email protected]> | |
{-# LANGUAGE OverloadedStrings #-} | |
module Main (main) where | |
import Control.Exception |
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
-- Dependencies: | |
-- * clock | |
-- * kan-extensions | |
-- * linear | |
-- * mwc-random | |
-- * reflex | |
-- * sdl2 | |
-- * StateVar | |
-- * vector |
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 BangPatterns #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
module Main where | |
import Control.Exception | |
import Control.Monad.Codensity | |
import Control.Monad.Fix | |
import Control.Monad.IO.Class | |
import Control.Monad.ST |
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
import Control.Applicative | |
import Control.Foldl (FoldM(..)) | |
import Control.Monad | |
import Data.Foldable | |
import Data.Sequence ((|>)) | |
chunksOf :: (Applicative m) => ([a] -> m ()) -> Int -> FoldM m a () | |
chunksOf yield n = | |
FoldM go |
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
import Control.Monad | |
import Data.Foldable | |
import Data.Sequence ((|>)) | |
data Trav a m r = Trav (a -> m (Trav a m r)) (m r) | |
chunksOf :: (Applicative m) => ([a] -> m ()) -> Int -> Trav a m () | |
chunksOf yield n = go mempty |
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 DefaultSignatures #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE TypeFamilyDependencies #-} | |
import Data.Monoid | |
class (Monoid a) => Inverse a 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
-- | | |
-- Copyright: (c) 2017 Ertugrul Söylemez | |
-- License: BSD3 | |
-- Maintainer: Ertugrul Söylemez <[email protected]> | |
module DevelMain (update) where | |
import Control.Concurrent | |
import Control.Concurrent.Async | |
import Control.Exception |
NewerOlder