code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-|
/NOTE/: This module is preliminary and may change at a future date.
This module is intended to help converting a list of tags into a
tree of tags.
-}
module Text.HTML.TagSoup.Tree
(
TagTree(..), tagTree,
flattenTree, transformTree, universeTree
) where
import Text.HTML.TagSoup.Type
im... | silkapp/tagsoup | Text/HTML/TagSoup/Tree.hs | bsd-3-clause | 3,300 | 0 | 15 | 929 | 927 | 488 | 439 | 43 | 7 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
module Physics.Falling.RigidBody.OrderedRigidBody
(
OrderedRigidBody
, rigidBody
, orderRigidBody
, mapOnBody
)
where
import Physics.Falling.Math.Transform
import Physics.Falling.Shape.VolumetricShape
import Physics.Falling.Shape.Transforma... | sebcrozet/falling | Physics/Falling/RigidBody/OrderedRigidBody.hs | bsd-3-clause | 5,124 | 0 | 9 | 1,894 | 1,040 | 549 | 491 | 102 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeFamilies #-}
module Modules.Output.Plot where
import Modules.Input.Setting (varRestPower, varLocalPower)
import qualified EFA.Application.Utility as AppUt
import qualified Modules.Input.Setting as ModS... | energyflowanalysis/efa-2.1 | examples/advanced/energy/src/Modules/Output/Plot.hs | bsd-3-clause | 28,043 | 0 | 24 | 6,242 | 8,040 | 4,118 | 3,922 | 587 | 3 |
-- | Killer move heuristics
--
-- https://chessprogramming.wikispaces.com/Killer+Heuristic. This is called
-- from the search iteration loop with updates, where a fail high node would
-- cause the update. The store is queried before the iteration and moves are
-- rearranged accordingly.
module Chess.Killer
( Ki... | phaul/chess | Chess/Killer.hs | bsd-3-clause | 3,118 | 0 | 18 | 799 | 586 | 334 | 252 | -1 | -1 |
module Main where
import Prelude hiding (putStr, getContents)
import Data.Aeson (Value)
import Data.Aeson.Encode.Pretty (encodePretty)
import Data.ByteString (getContents)
import Data.ByteString.Lazy (putStr)
import System.Environment (getArgs)
import System.Exit
import Data.Yaml (decodeFileEither, decodeEither')
h... | Greif-IT/hs-yesod-code-fragment-generator | hs-yaml2json/src/Main.hs | bsd-3-clause | 885 | 0 | 12 | 184 | 264 | 143 | 121 | 23 | 3 |
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE RecursiveDo #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE ImpredicativeTypes #-}
module Main where
import Control.Monad.Error
import Control.Monad.State
import Control.Monad.Writer
import Language.JavaScript.Parser
import System.Environment
import System.Process
import... | grwlf/urembed | src/Urembed.hs | bsd-3-clause | 14,171 | 0 | 35 | 4,080 | 4,553 | 2,217 | 2,336 | 325 | 9 |
module LawsTests where
import Common
type TB a = BatchT (Req Integer) (Writer [Integer]) a
type V = Integer
type F = Fun' Integer Integer
type MF = Fun' Integer (TB Integer)
-- TODO: dunno if these Arbitrary instances are any good.
instance Arbitrary (TB Integer) where
arbitrary = oneof
[ pure <$> arbit... | zyla/monad-batch | test/LawsTests.hs | bsd-3-clause | 1,919 | 0 | 16 | 484 | 799 | 413 | 386 | -1 | -1 |
{-# LANGUAGE MultiParamTypeClasses, TypeFamilies, UndecidableInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Feature.ConcurrentSpec where
import Control.Monad (void)
import Control.Monad.Base
import Control.Monad.Trans.Control
import Control.Concurrent.Async (mapConcurrently)
import Test.Hspec hiding (pen... | Skyfold/postgrest | test/Feature/ConcurrentSpec.hs | mit | 1,480 | 0 | 12 | 334 | 311 | 178 | 133 | -1 | -1 |
{-# LANGUAGE TypeApplications, DeriveGeneric #-}
{-# LANGUAGE DataKinds, ExistentialQuantification #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
{-... | yesodweb/persistent | persistent/test/Database/Persist/TH/SharedPrimaryKeyImportedSpec.hs | mit | 2,264 | 0 | 22 | 659 | 367 | 191 | 176 | 53 | 2 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
#if __GLASGOW_HASKELL__ >= 703
{-# LANGUAGE Unsafe #-}
#endif
{-# OPTIONS_HADDOCK not-home #-}
-- |
-- Module : Data.ByteString.Lazy.Internal
-- Copyright : (c) Don Stewart 2006-2008
-- (c) Duncan Coutts 2006-2011
-- License : BSD-style
... | CloudI/CloudI | src/api/haskell/external/bytestring-0.10.10.0/Data/ByteString/Lazy/Internal.hs | mit | 8,281 | 0 | 18 | 1,905 | 1,997 | 1,076 | 921 | 130 | 6 |
-- Copyright (c) 2011-14, Nicola Bonelli
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- * Redistributions of source code must retain the above copyright notice,
-- t... | Mr-Click/PFQ | user/Haskell/Network/PFq/Experimental.hs | gpl-2.0 | 5,291 | 0 | 12 | 1,209 | 1,201 | 642 | 559 | 59 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-- ... | fmapfmapfmap/amazonka | amazonka-ec2/gen/Network/AWS/EC2/DescribeAvailabilityZones.hs | mpl-2.0 | 6,197 | 0 | 15 | 1,223 | 787 | 473 | 314 | 91 | 1 |
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__
{-# LANGUAGE MagicHash, BangPatterns, DeriveDataTypeable, StandaloneDeriving #-}
#endif
#if !defined(TESTING) && __GLASGOW_HASKELL__ >= 703
{-# LANGUAGE Trustworthy #-}
#endif
-----------------------------------------------------------------------------
-- |
-- Module :... | hackern/ghc-7.8.3 | libraries/containers/Data/IntSet/Base.hs | bsd-3-clause | 56,394 | 0 | 25 | 15,253 | 12,740 | 6,574 | 6,166 | -1 | -1 |
-- | This file exports the most commonly used modules within HLearn-classifiers. Most likely this is the only file you will have to import.
module HLearn.Models.Classifiers
( module HLearn.Models.Classifiers.Common
, module HLearn.Models.Classifiers.NearestNeighbor
, module HLearn.Models.Classifiers.Perce... | iamkingmaker/HLearn | src/HLearn/Models/Classifiers.hs | bsd-3-clause | 564 | 0 | 5 | 75 | 68 | 49 | 19 | 9 | 0 |
{-# LANGUAGE OverloadedStrings, ExtendedDefaultRules #-}
module Queries where
import Database.MongoDB
import qualified Data.String.Utils as S
import Data.List.Split
import Types
import ActionRunner
getTitle (String s) = unpack s
queryListed :: String -> UString -> String -> Pipe -> IO [(String,[String... | hendrysuwanda/101dev | tools/mongoRDF/Queries.hs | gpl-3.0 | 2,440 | 1 | 22 | 905 | 714 | 360 | 354 | 47 | 3 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
-}
{-# LANGUAGE DeriveDataTypeable #-}
-- |
-- #name_types#
-- GHC uses several kinds of name internally:
--
-- * 'OccName.OccName' represents names as strings with just a little more information:
-- the \"namespace\" th... | christiaanb/ghc | compiler/basicTypes/OccName.hs | bsd-3-clause | 31,827 | 0 | 14 | 8,573 | 5,623 | 3,012 | 2,611 | 462 | 5 |
{-# OPTIONS -cpp #-}
module Main where
import Control.Concurrent (forkIO, threadDelay)
import Control.Concurrent.MVar (putMVar, takeMVar, newEmptyMVar)
import Control.Monad
import Control.Exception
import Data.Maybe (isNothing)
import System.Environment (getArgs)
import System.Exit
import System.IO (hPutStrLn, stderr)... | jwiegley/ghc-release | timeout/timeout.hs | gpl-3.0 | 4,854 | 1 | 19 | 1,745 | 932 | 459 | 473 | -1 | -1 |
module Options.Misc where
import Types
miscOptions :: [Flag]
miscOptions =
[ flag { flagName = "-jN"
, flagDescription =
"When compiling with :ghc-flag:`-make`, compile ⟨N⟩ modules in parallel."
, flagType = DynamicFlag
}
, flag { flagName = "-fno-hi-version-check"
,... | tjakway/ghcjvm | utils/mkUserGuidePart/Options/Misc.hs | bsd-3-clause | 1,327 | 0 | 8 | 427 | 178 | 114 | 64 | 30 | 1 |
module ListComp1 where
{- map2 xs = map length [ x | x <- xs ] -}
map2 xs = (case (length, [x | x <- xs]) of
(f, []) -> []
(f, (y : ys)) -> (f y) : (map f [x | x <- xs])) | kmate/HaRe | old/testing/generativeFold/ListComp1.hs | bsd-3-clause | 202 | 0 | 14 | 78 | 101 | 57 | 44 | 4 | 2 |
module HAD.Y2014.M03.D26.Solution
( Board
, board
, getList
, Direction (..)
, viewFrom
) where
import Data.List (groupBy, transpose)
import Control.Applicative ((<*>))
import Control.Monad (liftM, replicateM)
import Test.QuickCheck
-- Preamble
-- $setup
-- >>> import Control.Applicative ((<$>), (<*>))
... | ajerneck/1HAD | exercises/HAD/Y2014/M03/D26/Solution.hs | mit | 1,954 | 0 | 11 | 416 | 407 | 238 | 169 | 27 | 4 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE NoImplicitPrelude
, BangPatterns
, NondecreasingIndentation
, MagicHash
#-}
{-# OPTIONS_GHC -funbox-strict-fields #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.IO.Encoding.UTF8
--... | frantisekfarka/ghc-dsi | libraries/base/GHC/IO/Encoding/UTF8.hs | bsd-3-clause | 13,355 | 0 | 31 | 5,417 | 3,984 | 2,045 | 1,939 | 291 | 14 |
{-# OPTIONS -fplugin Simple.Plugin #-}
module T12567a where
| ezyang/ghc | testsuite/tests/plugins/T12567a.hs | bsd-3-clause | 62 | 0 | 2 | 10 | 5 | 4 | 1 | 2 | 0 |
-- Class used as a type, recursively
module ShouldFail where
class XML a where toXML :: a -> XML | siddhanathan/ghc | testsuite/tests/typecheck/should_fail/tcfail134.hs | bsd-3-clause | 98 | 0 | 7 | 20 | 23 | 13 | 10 | 2 | 0 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
module Network.AWS.Wolf.Ctx
( runTop
, runConfCtx
, preConfCtx
, runAmazonCtx
, runAmazonStoreCtx
, runAmazonWorkCtx
, runAmazonDecisionCtx
) where
import Control... | swift-nav/wolf | src/Network/AWS/Wolf/Ctx.hs | mit | 4,520 | 0 | 16 | 958 | 1,396 | 687 | 709 | -1 | -1 |
{-# htermination threadToIOResult :: IO a -> IOResult #-}
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/Prelude_threadToIOResult_1.hs | mit | 58 | 0 | 2 | 9 | 3 | 2 | 1 | 1 | 0 |
module Tree (
Tree(Leaf,Branch),
getBottom,
depth,
getVal,
getSubTree,
getAllSubTrees,
getValAt,
findMax,
chooser,
maxmin,
alphaBeta,
applyAtEnds,
applyNTimes
) where
import Data.Monoid
import Test.QuickCheck
{-
Provides the data structures and funnctions meant to deal with tree's
Task... | WawerOS/Chessotron2000 | src/Tree.hs | mit | 4,421 | 0 | 12 | 1,106 | 2,155 | 1,081 | 1,074 | 109 | 4 |
module ParHackageSearch where
import Search
import System.Directory
import System.FilePath.Posix
import Text.Regex.Posix
import Control.Parallel.Strategies
import qualified Data.ByteString.Char8 as B
import Data.Char
import System.Mem
import Control.DeepSeq
import Control.Monad
packages = "/home/stephen/Projects/ParRe... | SAdams601/ParRegexSearch | src/ParHackageSearch.hs | mit | 1,151 | 0 | 14 | 205 | 378 | 193 | 185 | 35 | 1 |
module Euler.Problem013Test (suite) where
import Test.Tasty (testGroup, TestTree)
import Test.Tasty.HUnit
import Euler.Problem013
suite :: TestTree
suite = testGroup "Problem013"
[ testCase "count of addends" testAddends
]
testAddends :: Assertion
testAddends = 100 @=? length addends
| whittle/euler | test/Euler/Problem013Test.hs | mit | 305 | 0 | 7 | 55 | 75 | 43 | 32 | 9 | 1 |
module TestImport
( withApp
, runApp
, runDB
, runDBWithApp
, wipeDB
, authenticateAs
, times
, module X
) where
import Application (makeFoundation, withEnv)
import ClassyPrelude as X
import Database.Persist as X hiding (get, delete, deleteBy)
import Database.... | thoughtbot/carnival | test/TestImport.hs | mit | 2,468 | 0 | 16 | 618 | 680 | 362 | 318 | 67 | 1 |
-- | Common types used by Text.Tokenify
module Text.Tokenify.Types where
import Text.Tokenify.Response (Response)
import Text.Tokenify.Regex (Regex)
-- | A series of Tokens which will match in sequencial order
type Tokenizer s a = [Token s a]
-- | Defines what is matches, and how to respond to said match
type Token... | AKST/tokenify | src/Text/Tokenify/Types.hs | mit | 420 | 0 | 6 | 80 | 83 | 54 | 29 | 6 | 0 |
{-# LANGUAGE Trustworthy #-}
-- |
-- Module : Spell.Edit
-- Description : Calculation of Minimum Edit Distance (MED).
-- Copyright : (c) Stefan Haller, 2014
--
-- License : MIT
-- Maintainer : s6171690@mail.zih.tu-dresden.de
-- Stability : experimental
-- Portability : portable
--
-- This module allows t... | fgrsnau/spell | lib/Spell/Edit.hs | mit | 10,370 | 1 | 17 | 2,871 | 1,922 | 1,069 | 853 | 93 | 3 |
{-# LANGUAGE CPP #-}
module Common
( Monoid
, (<>)
, (<$>)
, pure
) where
#if !MIN_VERSION_base(4, 8, 0)
import Control.Applicative (pure)
import Data.Functor ((<$>))
#endif
#if MIN_VERSION_base(4, 8, 0)
import Data.Monoid ((<>))
#elif MIN_VERSION_base(4, 5, 0)
import Data.Monoid (Monoid, (<>))
#else
import... | Rufflewind/wigner-symbols | src/Common.hs | mit | 444 | 0 | 7 | 79 | 93 | 63 | 30 | 11 | 1 |
{-# htermination (enumFromThenOrdering :: Ordering -> Ordering -> (List Ordering)) #-}
import qualified Prelude
data MyBool = MyTrue | MyFalse
data List a = Cons a (List a) | Nil
data MyInt = Pos Nat | Neg Nat ;
data Nat = Succ Nat | Zero ;
data Ordering = LT | EQ | GT ;
iterate :: (a -> a) -> a -> ... | ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/enumFromThen_7.hs | mit | 5,579 | 0 | 13 | 1,133 | 2,489 | 1,299 | 1,190 | 129 | 1 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.SVGAnimatedNumberList
(js_getBaseVal, getBaseVal, js_getAnimVal, getAnimVal,
SVGAnimatedNumberList, castToSVGAnimatedNumberList,
gTypeSVGAnimatedNumberList)
where
import Prelude ((.),... | manyoo/ghcjs-dom | ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/SVGAnimatedNumberList.hs | mit | 1,911 | 12 | 10 | 235 | 460 | 283 | 177 | 31 | 1 |
-- | Types and algorithms for Markov logic networks. The module has quite a
-- few 'fromStrings' methods that take strings and parse them into data
-- structure to make it easier to play with Markov logic in the repl.
--
-- For Markov logic, data is often represented with a Set (Predicate a, Bool).
-- This is prefered ... | PhDP/Sphinx-AI | Faun/MarkovLogic.hs | mit | 9,465 | 0 | 16 | 2,098 | 2,387 | 1,282 | 1,105 | 154 | 3 |
{-# LANGUAGE BangPatterns, DataKinds, DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Hadoop.Protos.HdfsProtos.ReplicaStateProto (ReplicaStateProto(..)) where
import Prelude ((+), (/), (.))
import qualified Prelude as Prelude'
import qualified Data.Ty... | alexbiehl/hoop | hadoop-protos/src/Hadoop/Protos/HdfsProtos/ReplicaStateProto.hs | mit | 2,952 | 0 | 11 | 542 | 784 | 429 | 355 | 65 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicecatalog-acceptedportfolioshare.html
module Stratosphere.Resources.ServiceCatalogAcceptedPortfolioShare w... | frontrowed/stratosphere | library-gen/Stratosphere/Resources/ServiceCatalogAcceptedPortfolioShare.hs | mit | 2,553 | 0 | 15 | 249 | 279 | 160 | 119 | 30 | 1 |
{- |
Module : $Header$
Copyright : (c) Felix Gabriel Mance
License : GPLv2 or higher, see LICENSE.txt
Maintainer : f.mance@jacobs-university.de
Stability : provisional
Portability : portable
Kewyords used for XML conversions
-}
module OWL2.XMLKeywords where
ontologyIRIK :: String
ontologyIRIK = ... | nevrenato/Hets_Fork | OWL2/XMLKeywords.hs | gpl-2.0 | 7,056 | 0 | 5 | 730 | 1,017 | 621 | 396 | 180 | 1 |
module Main where
import System.Environment
import Data.Char (toUpper)
import Data.List (delete)
import System.IO (hPutStr,
hClose,
openTempFile)
import System.Directory (removeFile,
renameFile)
view :: FilePath -> IO ()
view file = do contents <- readF... | ardumont/haskell-lab | src/io/todo.hs | gpl-2.0 | 3,083 | 0 | 13 | 1,036 | 924 | 480 | 444 | 65 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module HistoryGraph.Types where
import Control.Lens
import Data.Map (Map)
import qualified Data.Map as Map
type NodeId = Int
type HistoryError = String
data Param =
Checkbox Bool
| Text String
| ZNum Integer
| QNum Rational
| RNum Double
| Options Integer
... | Super-Fluid/history-graph | HistoryGraph/Types.hs | gpl-3.0 | 1,603 | 0 | 11 | 410 | 415 | 249 | 166 | 58 | 0 |
{-# LANGUAGE FlexibleInstances #-}
module SecretHandshake where
import Data.Digits (digitsRev)
import Text.Read (readMaybe)
class Handshakeable a where
handshake :: a -> [String]
instance Handshakeable String where
handshake xs =
if all (\d -> d==1 || d==0) ds
then toHandshake ds
else []... | ciderpunx/exercismo | src/SecretHandshake.hs | gpl-3.0 | 1,028 | 0 | 12 | 269 | 461 | 240 | 221 | 29 | 2 |
{-|
Module : Catan.Board
Description : Board Types for Catan
Copyright : (c) Dylan Mann, David Cao 2017
License : GPL-3
Maintainer : mannd@seas.upenn.edu
Stability : experimental
Portability : POSIX
Contains the primitive board types and wraps unsafe operations to provide a total
mapping from C... | dylanmann/CurriersOfCatan | src/Board.hs | gpl-3.0 | 10,379 | 0 | 34 | 2,705 | 4,316 | 2,531 | 1,785 | 199 | 20 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Clusters/Delete.hs | mpl-2.0 | 7,303 | 0 | 22 | 1,770 | 1,022 | 596 | 426 | 148 | 1 |
module Crypto.OPVault.Types.Common
( module Crypto.OPVault.Types.Common
, module Common
) where
import Control.Applicative as Common ((<$>), Applicative(..))
import Control.Monad as Common (mzero, join, void)
import Control.Monad.IO.Class as Common (MonadIO(..))
import Control.Monad.Tr... | bitemyapp/opvault | src/Crypto/OPVault/Types/Common.hs | mpl-2.0 | 730 | 0 | 6 | 170 | 205 | 144 | 61 | 13 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-dataproc/gen/Network/Google/Resource/Dataproc/Projects/Regions/WorkflowTemplates/Get.hs | mpl-2.0 | 6,353 | 0 | 16 | 1,304 | 806 | 472 | 334 | 119 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-shopping-content/gen/Network/Google/Resource/Content/Accounttax/Update.hs | mpl-2.0 | 4,407 | 0 | 15 | 1,014 | 583 | 344 | 239 | 85 | 1 |
{-# LANGUAGE UnboxedTuples #-}
module Math.Topology.KnotTh.Tabulation.LinkDiagrams
( nextGeneration
) where
import Control.Monad (guard, when)
import Data.Bits (shiftL)
import Data.Function (on)
import Data.List (nubBy)
import Data.STRef (newSTRef, readSTRef, writeSTRef)
import qualified Data.Vector.Mutable as... | mishun/tangles | src/Math/Topology/KnotTh/Tabulation/LinkDiagrams.hs | lgpl-3.0 | 4,873 | 0 | 27 | 2,062 | 1,760 | 891 | 869 | -1 | -1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TemplateHaskell #-}
module Region where
import Control.Lens (makeLenses)
import GHC.Generics
import Data.Aeson
import qualified Grid as G
import Coordinate
import Link
data Region v = MkRegion
{ _reg... | nitrix/lspace | legacy/Region.hs | unlicense | 1,636 | 0 | 11 | 520 | 403 | 224 | 179 | 47 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-| Implementation of the caching interfaces for the compute data structures.
-}
module Spark.Core.Internal.CachingUntyped(
cachingType,
uncache,
autocacheGen
) where
import Control.Monad.Except
import Sp... | tjhunter/karps | haskell/src/Spark/Core/Internal/CachingUntyped.hs | apache-2.0 | 3,018 | 0 | 15 | 567 | 606 | 308 | 298 | 53 | 16 |
module Common where
type Name = String
class NamedObject a where
getName :: a -> String
| tr00per/adventure | src/main/haskell/Common.hs | bsd-2-clause | 94 | 0 | 7 | 22 | 28 | 16 | 12 | 4 | 0 |
module Main where
import qualified SignExtService_Client as Client
import SignExt_Types
import SignExtService
import Thrift
import Thrift.Protocol.Binary
import Thrift.Server
import Thrift.Transport
import Thrift.Transport.Handle
import Control.Exception
import Data.Either
import Data.Int
import Data.List
import Dat... | maxeler/maxskins | examples/SignExt/client/hs/Dynamic/SignExt.hs | bsd-2-clause | 12,888 | 254 | 14 | 3,487 | 3,670 | 1,883 | 1,787 | 234 | 30 |
{-| Module describing a node.
All updates are functional (copy-based) and return a new node with
updated value.
-}
{-
Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the f... | ganeti-github-testing/ganeti-test-1 | src/Ganeti/HTools/Node.hs | bsd-2-clause | 34,243 | 0 | 18 | 9,307 | 7,934 | 4,348 | 3,586 | 632 | 32 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
-- |
-- Module : Data.Packer.Internal
-- License : BSD-style
-- Maintainer : Vincent Hanquez <vincent@snarc.org>
-- Stability : experimental
-- Portability : unknown
--
-- Internal of packer which is a simple state monad that ho... | NicolasDP/hs-packer | Data/Packer/Internal.hs | bsd-2-clause | 9,232 | 0 | 15 | 2,044 | 2,637 | 1,426 | 1,211 | 165 | 1 |
module Chap6 where
import Data.List
-- Exercises: Eq Instances
-- 1.
data TisAnInteger =
TisAn Integer
instance Eq TisAnInteger where
(==) (TisAn integer)
(TisAn integer') =
integer == integer'
-- 2.
data TwoIntegers =
Two Integer Integer
instance Eq TwoIntegers where
(==) (Two integer1 integ... | tkasu/haskellbook-adventure | app/Chap6.hs | bsd-3-clause | 4,768 | 0 | 10 | 1,240 | 1,512 | 850 | 662 | 121 | 2 |
module Imessage.Internal
(
) where
| mitchty/imessage | src/Imessage/Internal.hs | bsd-3-clause | 43 | 0 | 3 | 13 | 9 | 6 | 3 | 2 | 0 |
module Main where
import Game.LambdaPad
main :: IO ()
main = lambdaPad defaultLambdaPadConfig
| zearen-wover/lambda-pad | src/exe/lambda-pad.hs | bsd-3-clause | 96 | 0 | 6 | 15 | 27 | 15 | 12 | 4 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
module Horbits.OrbitSample where
import Control.Lens hiding (elements, (*~))
import Test.QuickCheck
import Horbits.Body
import Horbits.Dimensional.Prelude
import Horbits.Orbit
data OrbitSample = OrbitSample { desc :... | chwthewke/horbits | testsuite/Horbits/OrbitSample.hs | bsd-3-clause | 5,244 | 0 | 15 | 3,027 | 1,163 | 627 | 536 | 101 | 1 |
module Examples.Test.Directory(main) where
import Development.Shake
import Development.Shake.FilePath
import Examples.Util
import System.Directory(createDirectory)
import Data.List
import Control.Monad
import System.Directory(getCurrentDirectory, setCurrentDirectory)
-- Use escape characters, _o=* _l=/ __=<space>
r... | nh2/shake | Examples/Test/Directory.hs | bsd-3-clause | 2,949 | 0 | 20 | 707 | 1,076 | 514 | 562 | 65 | 4 |
{-# LANGUAGE ParallelListComp, ScopedTypeVariables, BangPatterns, Rank2Types, TupleSections #-}
module Tools.TimePlot.Plots (
initGen
) where
import qualified Control.Monad.Trans.State.Strict as St
import Control.Arrow
import Control.Applicative
import Data.List (foldl', sort)
import Data.Maybe
import qu... | jkff/timeplot | Tools/TimePlot/Plots.hs | bsd-3-clause | 16,910 | 5 | 18 | 4,879 | 6,566 | 3,502 | 3,064 | 268 | 5 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ViewPatterns #-}
{-# OPTIONS -fno-warn-orphans #-}
module System.Torrent.FileMap
( FileMap
-- * Construction
, Mode (..)
, def
, mmapFiles
, unmapFiles
-- * Query
, System.Torrent.FileMap.size
-- *... | pxqr/bittorrent | src/System/Torrent/FileMap.hs | bsd-3-clause | 5,027 | 1 | 15 | 1,402 | 1,675 | 875 | 800 | 110 | 2 |
{-# language ScopedTypeVariables #-}
{-# language TypeFamilies #-}
module Data.FVar (
FVar,
module Data.FVar,
) where
import Data.FVar.Core (FVar, nyi)
import qualified Data.FVar.Core as Core
-- | Runs the given action in a transaction on an FVar-store.
-- The location of the FVar-store is given by the ... | soenkehahn/fvar | Data/FVar.hs | bsd-3-clause | 1,044 | 0 | 10 | 204 | 251 | 139 | 112 | 21 | 1 |
{-# LANGUAGE OverloadedLists #-}
module Core.Free where
import qualified Data.Set as S
import Data.Set ((\\))
import Data.Monoid ((<>), mconcat)
import Core.Core
type StringSet = S.Set String
bv :: Pat -> StringSet
bv Wildcard = []
bv PLit{} = []
bv (Capture x) = [x]
bv (Bound x p) = [x] <> bv p
bv (PList xs) = m... | demhydraz/waffle | src/Core/Free.hs | bsd-3-clause | 827 | 0 | 9 | 235 | 509 | 255 | 254 | 27 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Afftrack.API.Brand.AdminManager
( getAdmins
, getAdminStatus
)where
import GHC.Generics
import Data.Aeson
import Control.Applicative
import Network.HTTP.Client
import qualified Data.ByteString.Char8 as BS
import Data.Text
import Afftrack.API.Common
impor... | kelecorix/api-afftrack | src/Afftrack/API/Brand/AdminManager.hs | bsd-3-clause | 772 | 0 | 7 | 199 | 145 | 84 | 61 | 26 | 1 |
module Sound
( MusicName (..)
, Command (..)
, SoundChan
, getSoundThread
, module Control.Concurrent.Chan
) where
import Control.Applicative
import Control.Concurrent
import Control.Concurrent.Chan
import Data.Array
import Graphics.UI.SDL.Mixer
data MusicData = MD
{ title :: Music
, se :: Array Int ... | c000/PaperPuppet | src/Sound.hs | bsd-3-clause | 1,514 | 0 | 15 | 415 | 537 | 276 | 261 | 53 | 7 |
{-# LANGUAGE ForeignFunctionInterface, CPP #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.Raw.ARB.TessellationShader
-- Copyright : (c) Sven Panne 2013
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-... | mfpi/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/ARB/TessellationShader.hs | bsd-3-clause | 5,263 | 0 | 11 | 510 | 595 | 375 | 220 | -1 | -1 |
module ADP.Tests.PaperExample where
import ADP.Multi.All
import ADP.Multi.Rewriting.All
import ADP.Tests.ABABExample(MyChar(..),myString,toString)
type Paper_Algebra alphabet answer = (
answer -> answer -> answer -> answer, -- fz1
answer -> answer -> answer, -- fz2
answer -> answe... | adp-multi/adp-multi | tests/ADP/Tests/PaperExample.hs | bsd-3-clause | 4,184 | 0 | 29 | 1,521 | 1,860 | 1,028 | 832 | 113 | 2 |
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-}
{-# LANGUAGE FlexibleInstances, FlexibleContexts #-}
{-# LANGUAGE EmptyDataDecls, ScopedTypeVariables, KindSignatures #-}
-- | Haskell with only one typeclass
--
-- <http://okmij.org/ftp/Haskell/Haskell1/Class1.hs>
--
-- <http://okmij.org/ftp/Haskell/types... | suhailshergill/liboleg | Data/Class1.hs | bsd-3-clause | 7,105 | 7 | 16 | 1,497 | 1,993 | 1,081 | 912 | -1 | -1 |
module Distribution.Client.Dependency.Modular.Validate where
-- Validation of the tree.
--
-- The task here is to make sure all constraints hold. After validation, any
-- assignment returned by exploration of the tree should be a complete valid
-- assignment, i.e., actually constitute a solution.
import Control.Appli... | IreneKnapp/Faction | faction/Distribution/Client/Dependency/Modular/Validate.hs | bsd-3-clause | 8,995 | 0 | 22 | 2,339 | 1,606 | 848 | 758 | 86 | 9 |
module Main where
-- filter files to get only finished games. reads dense files, outputs sparse ones.
import System.Environment
import System.IO
import Data.List (intercalate)
import System.FilePath
import Text.Printf
import Data.Maybe
import Board
main = do
files <- getArgs
mapM_ workOnFile files
workOnFile... | Tener/deeplearning-thesis | src/get-finished-games.hs | bsd-3-clause | 903 | 0 | 13 | 186 | 254 | 130 | 124 | 23 | 2 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
#ifdef TRUSTWORTHY
{-# LANGUAGE Trustworthy #-}
#endif
-------------------------------------------------------------------------------
-- |
-- Mod... | np/lens | src/Control/Lens/Zoom.hs | bsd-3-clause | 8,289 | 0 | 15 | 1,795 | 1,972 | 1,093 | 879 | 80 | 0 |
module Network.Slack
(
Slack(..),
runSlack,
module Network.Slack.User,
module Network.Slack.Channel,
module Network.Slack.Message
)
where
import Network.Slack.Types
import Network.Slack.User
import Network.Slack.Channel
import Network.Slack.Message
imp... | glutamate/slack | Network/Slack.hs | mit | 1,116 | 0 | 11 | 243 | 239 | 136 | 103 | 23 | 1 |
{-# LANGUAGE TupleSections #-}
module WordCount (wordCount) where
import Data.Map (Map, fromListWith)
import Data.Char (toLower, isAlphaNum)
wordCount :: String -> Map String Int
wordCount = count . tokenize
where
count = fromListWith (+) . map ((,1) . map toLower)
tokenize = filter (not . null) . split
s... | Bugfry/exercises | exercism/haskell/word-count/src/WordCount.hs | mit | 677 | 0 | 11 | 182 | 323 | 168 | 155 | 20 | 3 |
--
--
--
------------------
-- Exercise 10.16.
------------------
--
--
--
module E'10'16 where
import Test.QuickCheck ( quickCheck )
mystery xs
= foldr ( ++ ) [] ( map sing xs )
where
sing x = [ x ]
-- First "map sing xs" is applied to the input list and transforms every
-- item into a singleton list, ... | pascal-knodel/haskell-craft | _/links/E'10'16.hs | mit | 3,004 | 0 | 7 | 1,503 | 180 | 143 | 37 | 8 | 1 |
module AliasVarBinds where
type T a = [a]
| robinp/haskell-indexer | haskell-indexer-backend-ghc/testdata/typelink/AliasVarBinds.hs | apache-2.0 | 43 | 0 | 5 | 9 | 14 | 10 | 4 | 2 | 0 |
{-# LANGUAGE ViewPatterns #-}
{-| Implementation of the Ganeti configuration database.
-}
{-
Copyright (C) 2011, 2012 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions o... | bitemyapp/ganeti | src/Ganeti/Config.hs | bsd-2-clause | 22,311 | 0 | 20 | 5,104 | 4,897 | 2,551 | 2,346 | 381 | 4 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TemplateHaskell #-}
module Ros.Sensor_msgs.FluidPressure where
import qualified Prelude as P
import Prelude ((.), (+), (*))
import qualified Data.Typeable as T
import Control.Applicative
import Ros.Interna... | acowley/roshask | msgs/Sensor_msgs/Ros/Sensor_msgs/FluidPressure.hs | bsd-3-clause | 1,489 | 1 | 10 | 299 | 380 | 221 | 159 | 35 | 0 |
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TupleSections #-}
-- | Security specific migration
module Distribution.Server.Features.Security.Migration (
migratePkgTarball_v1_to_v2
, migrateCandidatePkgTarbal... | edsko/hackage-server | Distribution/Server/Features/Security/Migration.hs | bsd-3-clause | 9,212 | 0 | 20 | 2,319 | 1,951 | 1,010 | 941 | 167 | 4 |
import Data.Char
import System.Environment
import System.Process
import System.Exit
import System.Posix.Directory
import Graphics.Qt
import Graphics.Qt.Events.Tests ()
import Utils
import Test.QuickCheck
import Test.QuickCheck.Property
main = do
["--please-do-random-things-to-my-userdata"] <- getArgs
ch... | changlinli/nikki | src/testsuite/searchCrashes.hs | lgpl-3.0 | 950 | 0 | 11 | 187 | 244 | 127 | 117 | 28 | 2 |
{-# LANGUAGE CPP, LambdaCase, BangPatterns, MagicHash, TupleSections, ScopedTypeVariables, DeriveDataTypeable #-}
#ifdef ghcjs_HOST_OS
{-# LANGUAGE JavaScriptFFI #-}
#endif
{- |
Evaluate Template Haskell splices on node.js
-}
module GHCJS.Prim.TH.Eval (
#ifdef ghcjs_HOST_OS
runTHServer
#endif
) ... | beni55/ghcjs | lib/ghcjs-prim/GHCJS/Prim/TH/Eval.hs | mit | 9,402 | 15 | 18 | 2,415 | 3,048 | 1,547 | 1,501 | 2 | 0 |
{-# LANGUAGE PartialTypeSignatures, NamedWildCards #-}
module ExpressionSigNamed where
bar :: _a -> _a
bar True = (False :: _a)
bar False = (True :: _a)
| forked-upstream-packages-for-ghcjs/ghc | testsuite/tests/partial-sigs/should_compile/ExpressionSigNamed.hs | bsd-3-clause | 155 | 0 | 5 | 27 | 42 | 25 | 17 | 5 | 1 |
{-# LANGUAGE NoMonomorphismRestriction #-}
import Diagrams.Prelude
import Diagrams.Backend.SVG.CmdLine
h = hexagon 1 # fc lightgreen
sOrigin = showOrigin' (with & oScale .~ 0.04)
diagram :: Diagram B
diagram = h # alignR # sOrigin
-- why not snugBL ?
<> h # snugB # snugL # sOrigin
... | jeffreyrosenbluth/NYC-meetup | meetup/Snug.hs | mit | 394 | 0 | 14 | 107 | 116 | 61 | 55 | 10 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Main (main) where
import Codec.Xlsx
-- import Control.Lens
import qualified Data.ByteString.Lazy as L
-- import qualified Data.Map as M
import System.Environment (getArgs)
import System.FilePath.Posix ((</>))
import System.Directory
import... | mjhoy/ybapp | Main.hs | mit | 2,285 | 0 | 20 | 698 | 588 | 273 | 315 | 68 | 6 |
{-# LANGUAGE PolyKinds #-}
-- ------------------------------------------------------
{- multiple type-classes to deal with multiple kind-orders
class Typeable (a :: * ) where
typeOf :: a -> TypeRep
class Typeable1 (a :: * -> *) where
typeOf1 :: forall b. a b -> TypeRep
-}
class T0 a where
f0 :: a ... | uroboros/haskell_design_patterns | chapter7/3_kind_polymorphism.hs | mit | 1,907 | 0 | 9 | 511 | 206 | 115 | 91 | 20 | 0 |
--kMeans.hs
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-}
module Chapter6.Vector where
import Data.Default
class (Default v, Ord v) => Vector v where
distance :: v -> v -> Double
centroid :: [v] -> v
instance Vector (Double, Double) where
distance (a,b) (c,d) = sqrt $ (c-a)*(c-a) + (d-b)*(d-b)
... | hnfmr/beginning_haskell | chapter6/src/Chapter6/Vector.hs | mit | 629 | 0 | 14 | 158 | 297 | 165 | 132 | 15 | 0 |
{-# LANGUAGE PatternSynonyms #-}
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.SVGException
(toString, toString_, pattern SVG_WRONG_TYPE_ERR,
pattern SVG_INVALID_VALUE_ERR, pattern SVG... | ghcjs/jsaddle-dom | src/JSDOM/Generated/SVGException.hs | mit | 2,583 | 0 | 12 | 332 | 630 | 374 | 256 | 39 | 1 |
module HRUtil ( get_cconf, connect, Fanout(..), declare_fanout, Direct(..)
, declare_ctrl_client, declare_ctrl_server
, bkey_client, bkey_server) where
import Text.ParserCombinators.Parsec
import qualified Data.Map as M
import Network.AMQP
import Debug.Trace
-- parse the config file
get_... | cfchou/hrchat | HRUtil.hs | mit | 3,253 | 0 | 16 | 1,021 | 908 | 489 | 419 | 74 | 2 |
module Tests where
import Test.HUnit
-- define test cases.
test1 = TestCase (assertEqual "for (foo 3)," (1,2) (2,3))
{--
test2 = TestCase (do (x,y) <- partA 3
assertEqual "for the first result of partA," 5 x
b <- partB y
assertBool ("(partB " ++ show y +... | marklar/Statistics.SGT | test/Tests.hs | mit | 483 | 0 | 8 | 172 | 59 | 35 | 24 | 4 | 1 |
{-# LANGUAGE FlexibleContexts #-}
module Hasgel.Rendering (
Camera(..), defaultCamera, viewForward, viewBack, viewRight, viewLeft,
viewUp, viewDown,
renderCameraOrientation, renderPlayer, renderShots, renderInvaders,
renderString, axisRenderer, renderGamma, defaultGamma
) where
import Control.Lens ((.~), (^.)... | Th30n/hasgel | src/Hasgel/Rendering.hs | mit | 11,804 | 3 | 22 | 2,602 | 3,423 | 1,740 | 1,683 | -1 | -1 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE Strict #-}
module WordEmbedding.HasText.Internal.Strict.HasText
( unsafeWindowRange
, initMW
, unsafeFreezeMW
, norm2
, scale
, sigmoid
, addUU
, dotUU
, unitVector
, cosSim
) where
import qualified Data.Text as T
i... | Nnwww/hastext | src/WordEmbedding/HasText/Internal/Strict/HasText.hs | mit | 2,826 | 0 | 14 | 703 | 904 | 475 | 429 | 61 | 3 |
module Glucose.Lexer (tokens, tokenise, tokenize) where
import Control.Lens
import Control.Monad.RWS
import Data.Char
import Data.Foldable
import Data.Maybe
import Data.Text (Text, pack, unpack)
import Glucose.Error hiding (unexpected)
import qualified Glucose.Error as Error
import Glucose.Lexer.Char
impo... | sardonicpresence/glucose | src/Glucose/Lexer.hs | mit | 5,640 | 0 | 23 | 1,099 | 2,068 | 1,007 | 1,061 | -1 | -1 |
data False
type Not a = a -> False
data Liar = Liar (Not Liar)
honest :: Not Liar
honest l@(Liar p) = p l
absurd :: False
absurd = honest $ Liar honest
| ankitku/awotap | haskellAbsurd.hs | mit | 156 | 0 | 8 | 38 | 75 | 40 | 35 | -1 | -1 |
module Kriek.Compiler (compile, compileFile) where
import Kriek.Reader (program)
import Text.Megaparsec (parse, parseErrorPretty)
import Data.Maybe
-- Accepts an optional file path of the file being compiled.
--
-- TODO: Don't use strings
compile :: Maybe FilePath -> String -> String
compile path s = case parse progr... | kalouantonis/kriek | src/hs/Kriek/Compiler.hs | mit | 664 | 0 | 10 | 149 | 182 | 93 | 89 | 13 | 2 |
-- | A cellular automaton witch simulates logic circuits
module WireWorld (Wire, main, wireWorldRule) where
import CellularAutomata2D
import GUI
-- | A wire can be empty (no wire), a conductor (no current), or an electron head or tail.
data Wire = Empty | Conductor | ElectronHead | ElectronTail deriving (Show, Eq, En... | orion-42/cellular-automata-2d | WireWorld.hs | mit | 1,305 | 0 | 19 | 273 | 258 | 142 | 116 | 21 | 4 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Functors where
import Text.HTML.Scalpel
import Text.Regex (mkRegexWithOpts, matchRegex)
import Data.Text (strip)
data Funny f a = Funny a (f a)
deriving (Show)
funnyThing :: Funny Maybe Int
funnyThing = Funny 5 $ Just 3
--... | harrisi/on-being-better | list-expansion/Haskell/Learning/Functors.hs | cc0-1.0 | 921 | 0 | 12 | 168 | 272 | 146 | 126 | -1 | -1 |
import Nightwatch.Types
import Nightwatch.Telegram
import Nightwatch.Webapp
import Nightwatch.Websocket
import Control.Concurrent.Chan
main = do
aria2Chan <- newChan
tgOutChan <- newChan
startTelegramBot aria2Chan tgOutChan
startAria2
startAria2WebsocketClient aria2Chan tgOutChan
startWebapp
| vacationlabs/nightwatch | haskell/Main.hs | gpl-2.0 | 307 | 0 | 7 | 41 | 68 | 33 | 35 | 12 | 1 |
{-# LANGUAGE DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-}
module Robots3.Config
( Config -- abstract
, c_hull, cluster_of
, showing_hull, show_hull
, breit
, make, make_with_hull, geschichte
, with_targets
, move, remove, addZug
, look, robots, inhalt
, positions, goals
, valid
, bounds, area
)
w... | Erdwolf/autotool-bonn | src/Robots3/Config.hs | gpl-2.0 | 4,430 | 25 | 17 | 1,234 | 1,666 | 874 | 792 | 136 | 2 |
{-# OPTIONS_GHC -Wall -fwarn-tabs -Werror #-}
-------------------------------------------------------------------------------
-- |
-- Module : Logic.Controls
-- Copyright : Copyright (c) 2014 Michael R. Shannon
-- License : GPLv2 or Later
-- Maintainer : mrshannon.aerospace@gmail.com
-- Stability : ... | mrshannon/trees | src/Logic/Controls.hs | gpl-2.0 | 1,944 | 0 | 14 | 392 | 508 | 297 | 211 | 42 | 3 |
--
-- Copyright (c) 2013-2019 Nicola Bonelli <nicola@pfq.io>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-... | awgn/cgrep | src/CGrep/Types.hs | gpl-2.0 | 997 | 0 | 5 | 190 | 75 | 55 | 20 | -1 | -1 |
-- | Functions for generating league tables (including form tables and mini-leagues).
module Anorak.Tables (buildRecord,
formTable,
goalDiff,
LeagueRecord(..),
leaguePositions,
leagueTable,
... | dwdyer/anorak | src/haskell/Anorak/Tables.hs | gpl-3.0 | 13,494 | 1 | 24 | 4,152 | 2,882 | 1,505 | 1,377 | 149 | 1 |
module H.Prelude.Monad
( Functor(..), Applicative(..), Alternative(..)
, Monad(..), MonadPlus(..), Const(..), ZipList(..)
, (<$>), (<**>), liftA, liftA2, liftA3, optional
, (=<<), (>=>), (<=<), forever, void
, mfilter, filterM, zipWithM, zipWithM_, foldM, foldM_, onFstF, onSndF
, replicateM, replicateM_, g... | ktvoelker/hydrogen | src/H/Prelude/Monad.hs | gpl-3.0 | 2,316 | 0 | 12 | 526 | 1,010 | 576 | 434 | -1 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.