Aelve Codesearch

grep over package repositories
Please provide a string to search for.
3+ characters are required.
Index updated about an hour ago

total matches: more than 1000

LogicGrowsOnTrees-1.1.0.2
11 matches
examples/print-some-nqueens-solutions-using-pull.hs
{-# LANGUAGE UnicodeSyntax #-}

import Control.Applicative ((<$>),(<*>))

import qualified Data.Foldable as Fold
import Data.List (sort)
import qualified Data.Sequence as Seq


            
examples/print-some-nqueens-solutions-using-push.hs
{-# LANGUAGE UnicodeSyntax #-}

import Control.Applicative ((<$>),(<*>))

import qualified Data.Foldable as Fold
import Data.List (sort)
import qualified Data.Sequence as Seq


            
sources/LogicGrowsOnTrees/Examples/Queens/Advanced.hs
    , symmetryOf
    ) where

import Control.Applicative ((<$>),liftA2)
import Control.Arrow ((***))
import Control.Exception (evaluate)
import Control.Monad (MonadPlus(..),(>=>),liftM,liftM2,msum)

import Data.Bits ((.&.),(.|.),bit,rotateL,rotateR,unsafeShiftL,unsafeShiftR)

            
sources/LogicGrowsOnTrees/Examples/Queens.hs
import Control.Monad (MonadPlus,guard,liftM)

import Data.Bits ((.|.),(.&.),bit,bitSize,shiftL,shiftR)
import Data.Functor ((<$>))
import Data.IntMap (IntMap)
import qualified Data.IntMap as IntMap
import Data.IntSet (IntSet) -- imported so that haddock will link to it
import qualified Data.IntSet as IntSet
import Data.Maybe (fromJust)

            
sources/LogicGrowsOnTrees/Parallel/Common/Process.hs
import Control.Exception (AsyncException(ThreadKilled,UserInterrupt),Handler(..),catches,throwIO)
import Control.Monad.IO.Class

import Data.Functor ((<$>))
import Data.Serialize
import Data.Void (absurd)

import System.IO (Handle)
import qualified System.Log.Logger as Logger

            
sources/LogicGrowsOnTrees/Parallel/Common/RequestQueue.hs

import Prelude hiding (catch)

import Control.Applicative ((<$>),(<*>),liftA2)
import Control.Arrow ((&&&))
import Control.Concurrent (ThreadId,forkIO,killThread)
import Control.Concurrent.MVar (newEmptyMVar,putMVar,takeMVar)
import Control.Concurrent.STM (atomically)
import Control.Concurrent.STM.TChan (TChan,newTChanIO,readTChan,tryReadTChan,writeTChan)

            
sources/LogicGrowsOnTrees/Parallel/Common/Supervisor/Implementation.hs
    ) where -- }}}

-- Imports {{{
import Control.Applicative ((<$>),(<*>),Applicative,liftA2)
import Control.Arrow ((&&&),first)
import Control.Category ((>>>))
import Control.Exception (Exception(..),throw)
import Control.Lens ((&))
import Control.Lens.Getter ((^.),use,view)

            
sources/LogicGrowsOnTrees/Parallel/Common/Worker.hs
import Data.Composition
import Data.Derive.Serialize
import Data.DeriveTH
import Data.Functor ((<$>))
import Data.IORef (atomicModifyIORef,IORef,newIORef,readIORef)
import qualified Data.IVar as IVar
import Data.IVar (IVar)
import Data.Maybe (fromMaybe)
import Data.Monoid ((<>),Monoid(..))

            
sources/LogicGrowsOnTrees/Parallel/Common/Workgroup.hs
    , runWorkgroup
    ) where

import Control.Applicative (Applicative,(<$>))
import Control.Lens (makeLenses)
import Control.Lens.Getter (use)
import Control.Lens.Lens ((<<%=))
import Control.Lens.Setter ((.=),(%=))
import Control.Monad (forM_,replicateM_,void)

            
sources/LogicGrowsOnTrees/Parallel/Main.hs

import Prelude hiding (catch,readFile,writeFile)

import Control.Applicative ((<$>),(<*>),pure)
import Control.Arrow ((&&&))
import Control.Concurrent (threadDelay)
import Control.Exception (AsyncException,SomeException,finally,fromException,handleJust,onException)
import Control.Monad (forM_,forever,join,liftM2,mplus,when,unless,void)
import Control.Monad.CatchIO (catch)

            
sources/LogicGrowsOnTrees/Utils/PerfectTree.hs
    , formArityAndDepth
    ) where

import Control.Applicative ((<$>),(<*>))
import Control.Monad (MonadPlus,msum)

import Data.Derive.Serialize
import Data.DeriveTH
import Data.List (genericReplicate)

            
LogicGrowsOnTrees-network-1.0.0.4
2 matches
sources/LogicGrowsOnTrees/Parallel/Adapter/Network.hs
import Control.Monad.Trans.State.Strict (StateT,evalStateT)

import Data.Composition ((.*))
import Data.Functor ((<$>))
import qualified Data.Map as Map
import Data.Map (Map)
import Data.Maybe (fromMaybe)
import Data.Monoid (Monoid(..))
import Data.Serialize (Serialize)

            
tests/tests.hs
import Control.Concurrent (forkIO,threadDelay)
import Control.Concurrent.STM (atomically,modifyTVar,newTVarIO,readTVar,writeTVar)

import Data.Functor ((<$>))
import Data.IORef (modifyIORef,newIORef,readIORef)
import Data.Monoid ((<>),mempty)

import GHC.Conc (unsafeIOToSTM)


            
LogicGrowsOnTrees-processes-1.0.0.2
2 matches
sources/LogicGrowsOnTrees/Parallel/Adapter/Processes.hs

import Prelude hiding (catch)

import Control.Applicative ((<$>),(<*>),Applicative,liftA2)
import Control.Arrow (second)
import Control.Concurrent (forkIO)
import Control.Exception (AsyncException(ThreadKilled,UserInterrupt),SomeException,catch,catchJust,fromException)
import Control.Monad (forever,liftM2)
import Control.Monad.CatchIO (MonadCatchIO)

            
tests/tests.hs
import Control.Monad (forever,replicateM_,void)
import Control.Monad.IO.Class (liftIO)

import Data.Functor ((<$>))
import Data.IORef (modifyIORef,newIORef,readIORef)
import Data.Monoid ((<>),Sum(..),mempty)
import Data.Serialize (Serialize(..))

import System.Environment (getArgs)

            
MFlow-0.4.6.0
1 matches
src/MFlow/Forms.hs
cachedWidget, wcached, wfreeze,

-- * Widget combinators
(<+>),(|*>),(|+|), (**>),(<**),(<|>),(<*),(<$>),(<*>),(>:>)

---- * Normalized (convert to ByteString) widget combinators
---- | These dot operators are identical to the non dot operators, with the addition of the conversion of the arguments to lazy ByteStrings
----
---- The purpose is to combine heterogeneous formats into ByteString-formatted widgets that

            
MagicHaskeller-0.9.6.8
13 matches
MagicHaskeller/ProgGenSF.lhs
import Data.Array

#if __GLASGOW_HASKELL__ >= 710
import Prelude hiding ((<$>))
#endif

import Debug.Trace
-- trace str = id


            
MagicHaskeller/ProgGenSF.lhs
                                                             funApSubBits_forcingNil clbehalf lltbehalf behalf (mapTV (tvid+) ty) (map (mkHead (reducer cmn) lenavails numcxts arity) xs, fullBits)

funApSubBits, funApSubBits_resetting :: (Search m, Expression e) => (Type -> PriorSubsts m [e]) -> (Type -> PriorSubsts m ([e],BitSet)) -> (Type -> PriorSubsts m ([e],BitSet)) -> Type -> ([e],BitSet) -> PriorSubsts m ([e],BitSet)
funApSubBits = funApSubOpBits (<$>)
funApSubOpBits op clbehalf lltbehalf behalf = faso
    where faso (t:=>ts) (funs, bsf)
              = do args <- clbehalf t
                   faso ts (liftM2 op funs args, bsf)
          faso (t:> ts) (funs, bsf)

            
MagicHaskeller/ProgGenSF.lhs
              = do (args, bse) <- behalf t
                   faso ts (liftM2 op funs args, bsf .|. bse)
          faso _        tup = return tup
funApSubBits_resetting = funApSubOpBits_resetting (<$>)
funApSubOpBits_resetting op clbehalf lltbehalf behalf = faso
    where faso (t:=>ts) (funs, bsf)
              = do args <- clbehalf t
                   faso ts (liftM2 op funs args, bsf)
          faso (t:> ts) (funs, bsf)

            
MagicHaskeller/ProgGenSF.lhs
                   faso ts (liftM2 op funs args, bsf .&. complement bse)
          faso _        tup = return tup
fapBits behalf ts tups = foldM (\ (fs,bsf) t -> do (args, bse) <- behalf t
                                                   return (liftM2 (<$>) fs args, bsf .|. bse))
                               tups
                               ts

forceNil :: BitSet -> PriorSubsts Recomp e -> PriorSubsts Recomp e
forceNil newRemaining = convertPS (zipDepthRc (\i es -> if i < countBits newRemaining - 1 then [] else es))

            
MagicHaskeller/ProgGenSF.lhs
--                        | t > u     = mzero
                        | otherwise = do (args, ixs) <- behalf t
                                         funApSub'' (t==u) ts (if filtexp then [ f <$> e | f <- funs, e <- args, let _:$d = toCE f, d <= toCE e ]
                                                                         else liftM2 (<$>) funs args,  
                                                               bs .&. complement ixs)
-- てゆーかtとuが同じならばもっといろんなことができそう.
                    funApSub'' filtexp (t:->ts) (funs, bs)
                                    = do (args, ixs) <- behalf t
                                         return (if filtexp then [ f <$> e | f <- funs, e <- args, let _:$d = toCE f, d <= toCE e]

            
MagicHaskeller/ProgGenSF.lhs
                    funApSub'' filtexp (t:->ts) (funs, bs)
                                    = do (args, ixs) <- behalf t
                                         return (if filtexp then [ f <$> e | f <- funs, e <- args, let _:$d = toCE f, d <= toCE e]
                                                            else liftM2 (<$>) funs args,  
                                                 bs .&. complement ixs)
                    funApSub'' _fe _t tups = return tups

retGenTV1Bits cmn lenavails fullBits fe clbehalf lltbehalf behalf reqret (numcxts, arity, _retty, numtvs, xs:::ty)
  = convertPS (ndelay arity) $              do tvid <- reserveTVars numtvs -- この(最初の)IDそのもの(つまり返り値のtvID)はすぐに使われなくなる

            
MagicHaskeller/ProgramGenerator.lhs
import MagicHaskeller.Options

#if __GLASGOW_HASKELL__ >= 710
import Prelude hiding ((<$>))
#endif

-- replacement of LISTENER. Now replaced further with |guess|
-- listen = False


            
MagicHaskeller/ProgramGenerator.lhs
                                                   convertPS (ndelay $ fromIntegral arity) $
                                                             funApSub clbehalf lltbehalf behalf (mapTV (tvid+) ty) (map (mkHead (reducer cmn) lenavails numcxts arity) xs)
funApSub :: (Search m, Expression e) => (Type -> PriorSubsts m [e]) -> (Type -> PriorSubsts m [e]) -> (Type -> PriorSubsts m [e]) -> Type -> [e] -> PriorSubsts m [e]
funApSub = funApSubOp (<$>)
funApSubOp op clbehalf lltbehalf behalf = faso
    where faso (t:=>ts) funs
              = do args <- clbehalf t
                   faso ts (liftM2 op funs args)
          faso (t:> ts) funs

            
MagicHaskeller/ProgramGenerator.lhs
-}
{-
fap behalf (t:ts) funs = do args <- behalf t
                            fap behalf ts (liftM2 (<$>) funs args)
fap _      _      funs = return funs
-}
{- mapM$B$r;H$&(B $B0lHVCY$$!%(B
fap behalf ts funs = do args <- mapM behalf ts
                        return (foldl (liftM2 (<$>)) funs args)

            
MagicHaskeller/ProgramGenerator.lhs
-}
{- mapM$B$r;H$&(B $B0lHVCY$$!%(B
fap behalf ts funs = do args <- mapM behalf ts
                        return (foldl (liftM2 (<$>)) funs args)
-}
 -- foldM$B$r;H$&!%$J$<$+$3$l$,0lHVB.$$(B
fap behalf ts funs = foldM (\fs t -> do args <- behalf t
                                        return $ liftM2 (<$>) fs args)
                           funs
                           ts

-- fap behalf ts funs = mapAndFoldM (liftM2 (<$>)) funs behalf ts
mapAndFoldM op n f []     = return n
mapAndFoldM op n f (x:xs) = do y <- f x
                               mapAndFoldM op (n `op` y) f xs



            
MagicHaskeller/ProgramGenerator.lhs
--                        | t > u     = mzero
                        | otherwise = do args  <- behalf t
                                         funApSub'' (t==u) ts (if filtexp then [ f <$> e | f <- funs, e <- args, let _:$d = toCE f, d <= toCE e ]
                                                                         else liftM2 (<$>) funs args)
-- $B$F$f!<$+(Bt$B$H(Bu$B$,F1$8$J$i$P$b$C$H$$$m$s$J$3$H$,$G$-$=$&!%(B
                    funApSub'' filtexp (t:->ts) funs
                                    = do args  <- behalf t
                                         return (if filtexp then [ f <$> e | f <- funs, e <- args, let _:$d = toCE f, d <= toCE e]
                                                            else liftM2 (<$>) funs args)

            
MagicHaskeller/ProgramGenerator.lhs
                    funApSub'' filtexp (t:->ts) funs
                                    = do args  <- behalf t
                                         return (if filtexp then [ f <$> e | f <- funs, e <- args, let _:$d = toCE f, d <= toCE e]
                                                            else liftM2 (<$>) funs args)
                    funApSub'' _fe _t funs = return funs

orderedAndUsedArgs (TV _ :-> _) = False -- mkSubsts$B$GF3F~$5$l$?(Btyvars$B$,;H$o$l$F$$$J$$%1!<%9!%(Breplace$B$5$l$?7k2L(BTV$B$C$F%1!<%9$O$H$j$"$($:L5;k(B....
orderedAndUsedArgs (t:->ts@(u:->_)) | t > u     = False
                             | otherwise = orderedAndUsedArgs ts

            
MagicHaskeller/T10.hs
-- import PriorSubsts
import Data.List(partition, sortBy)
import Data.Monoid
import Data.Functor((<$>))

-- import MagicHaskeller.Types

liftList :: MonadPlus m => [a] -> m a
liftList = msum . map return

            
MicrosoftTranslator-0.1.0.1
1 matches
src/Language/Bing.hs
import qualified Data.ByteString.Lazy.Char8 as BLC
import Data.Aeson
import Control.Monad (mzero)
import Control.Applicative ((<$>),(<*>))
import Data.Monoid
import Control.Applicative
import Data.DateTime
import Data.Text (Text)
import qualified Data.Text as T