layout | title | date | comments | author | categories | commentIssueId |
---|---|---|---|---|---|---|
post |
A comonad of graph decompositions |
2016-04-02 13:02:54 -0400 |
true |
Rúnar |
scala comonads |
22 |
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 GADTs, KindSignatures, FlexibleInstances, FunctionalDependencies, NoMonomorphismRestriction #-} | |
-- DOMAIN SPECIFIC LANGUAGES IN HASKELL | |
-- Fredrik Dyrkell | |
-- @lexicallyscoped | lexicallyscoped.com | |
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 DeriveFunctor, TypeFamilies #-} | |
module Success | |
( Parser(..) | |
, parse | |
) where | |
import Control.Applicative | |
import Control.Monad | |
import Data.Bifunctor | |
import Data.Profunctor |
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 GeneralizedNewtypeDeriving #-} | |
module SliderPuzzle where | |
import Prelude hiding (Either(..)) | |
import Data.Vector (Vector, (//), (!?)) | |
import qualified Data.Vector as Vec | |
import Control.Arrow (second, (***)) | |
import Control.Monad.State.Strict | |
import Data.Set (Set) | |
import qualified Data.Set as Set |
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 AllowAmbiguousTypes #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE FunctionalDependencies #-} | |
{-# LANGUAGE PolyKinds #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE TypeApplications #-} | |
{-# LANGUAGE TypeFamilies #-} |
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
-- in response to https://www.reddit.com/r/haskell/comments/a50xpr/datahaskell_solve_this_small_problem_to_fill_some/ | |
{-# LANGUAGE BangPatterns, OverloadedStrings, RecordWildCards, ScopedTypeVariables #-} | |
module Main where | |
import Control.Category ((>>>)) | |
import Data.Function ((&)) | |
import Data.Map.Strict (Map, (!)) | |
import Data.Set (Set) | |
import Test.DocTest (doctest) |
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
# Haskell stack project Github Actions template | |
# https://gist.github.com/mstksg/11f753d891cee5980326a8ea8c865233 | |
# | |
# To use, mainly change the list in 'plans' and modify 'include' for | |
# any OS package manager deps. | |
# | |
# Currently not working for cabal-install >= 3 | |
# | |
# Based on https://raw.githubusercontent.com/commercialhaskell/stack/stable/doc/travis-complex.yml | |
# |
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
## Principal type-schemes for functional programs | |
**Luis Damas and Robin Milner, POPL '82** | |
> module W where | |
> import Data.List | |
> import Data.Maybe | |
> import Data.Function |
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 MultiParamTypeClasses, ExistentialQuantification, ScopedTypeVariables, FlexibleInstances, FlexibleContexts, UndecidableInstances #-} | |
module TransientCont where | |
-- some imports | |
import Control.Applicative | |
import Control.Monad.IO.Class | |
import Control.Monad.Trans |
OlderNewer