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
| name: bundle | |
| version: 0.1.0.0 | |
| synopsis: Solve bundling problem | |
| -- description: | |
| homepage: https://github.com/minkless/sudoku#readme | |
| license: BSD3 | |
| license-file: LICENSE | |
| author: Koji Miyazato | |
| maintainer: viercc@gmail.com | |
| copyright: Koji Miyazato |
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 RankNTypes #-} | |
| {-# LANGUAGE ScopedTypeVariables #-} | |
| {-# LANGUAGE TypeApplications #-} | |
| {-# LANGUAGE FlexibleContexts #-} | |
| {-# LANGUAGE FlexibleInstances #-} | |
| {-# LANGUAGE UndecidableInstances #-} | |
| {-# LANGUAGE DefaultSignatures #-} | |
| {-# LANGUAGE DeriveFunctor #-} | |
| {-# LANGUAGE QuantifiedConstraints #-} | |
| module AutoLift( |
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 FlexibleInstances #-} | |
| {-# LANGUAGE FunctionalDependencies #-} | |
| {-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
| {-# LANGUAGE InstanceSigs #-} | |
| {-# LANGUAGE MultiParamTypeClasses #-} | |
| {-# LANGUAGE StandaloneDeriving #-} | |
| module Set where | |
| import Data.List (nub, elem) |
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 FlexibleInstances #-} | |
| {-# LANGUAGE UndecidableInstances #-} | |
| {-# LANGUAGE MultiParamTypeClasses #-} | |
| {-# LANGUAGE RankNTypes #-} | |
| {-# LANGUAGE ScopedTypeVariables #-} | |
| module Main(main) where | |
| import Data.Proxy | |
| class Same x y where |
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 GADTs #-} | |
| {-# LANGUAGE DataKinds #-} | |
| {-# LANGUAGE KindSignatures #-} | |
| {-# LANGUAGE PolyKinds #-} | |
| {-# LANGUAGE RankNTypes #-} | |
| {-# LANGUAGE TypeOperators #-} | |
| -- For the "Another take" | |
| {-# LANGUAGE ConstraintKinds #-} | |
| {-# LANGUAGE FunctionalDependencies #-} |
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
| Test by executing this line at shell: | |
| $ for i in {1..10}; do ./unix-lock.hs & done |
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 FlexibleContexts #-} | |
| {-# LANGUAGE MultiParamTypeClasses #-} | |
| {-# LANGUAGE RankNTypes #-} | |
| {-# LANGUAGE ScopedTypeVariables #-} | |
| {-# LANGUAGE UndecidableInstances #-} | |
| module AdHocInstances( | |
| Group(..), | |
| GroupExpr(), | |
| adhocGroup | |
| ) where |
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
| During play around objective package, I noticed following type has interesting property. | |
| > {-# LANGUAGE RankNTypes #-} | |
| > {-# LANGUAGE GADTs #-} | |
| > {-# LANGUAGE TypeOperators #-} | |
| > {-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-} | |
| > {-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-} | |
| > {-# LANGUAGE UndecidableInstances #-} | |
| > | |
| > import Control.Monad |
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 EmptyCase #-} | |
| {-# LANGUAGE FlexibleContexts #-} | |
| {-# LANGUAGE TypeFamilies #-} | |
| {-# LANGUAGE TypeOperators #-} | |
| module Data.Matchable( | |
| -- * Matchable class | |
| Matchable(..), | |
| zipzipMatch, | |
| traverseDefault, | |
| eqDefault, |
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
| Applicative laws (in terms of 'prod'): | |
| prod :: Applicative f => f a -> f b -> f (a,b) | |
| prod = liftA2 (,) | |
| (1) Left unit: | |
| pure a `prod` fb = fmap (a,) fb |