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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
--------------------------------------------------------------------------------
module Main where
--------------------------------------------------------------------------------
import Control.Applicative ((<$>), (<*>))
import Control.Monad (forM_)
import System.Random (ran... | jaspervdj/firefly | examples/collision.hs | bsd-3-clause | 3,186 | 0 | 16 | 848 | 1,048 | 519 | 529 | 67 | 4 |
module HFiaR.AI (aiDropIn) where
import HFiaR
import Data.Maybe
-- | Drop a tile in a column choosen by the Artificial Inteligence
aiDropIn :: Monad m => HFiaRT m (Either HFiaRError ())
aiDropIn =
do
r <- result;
case r of
Left GameNotEnded ->
bestColumn >>= dropIn
... | elbrujohalcon/hfiar | src/HFiaR/AI.hs | bsd-3-clause | 1,844 | 0 | 16 | 684 | 590 | 297 | 293 | 44 | 4 |
import qualified Protein ( AminoAcid(..) )
import qualified Rna ( toBases, toCodons, toAminoAcids )
-- | Given an RNA string s corresponding to a strand of mRNA, return the protein
-- string encoded by s.
--
-- >>> AUGGCCAUGGCGCCCAGAACUGAGAUCAAUAGUACCCGUAUUAACGGGUGA
-- MAMAPRTEINSTRING
prot :: String -> String
prot =... | mitochon/hoosalind | src/problems/prot.hs | mit | 484 | 0 | 12 | 84 | 110 | 63 | 47 | 8 | 1 |
module Main where
import Control.Monad (when)
import Pipes (runEffect, (>->))
import qualified Pipes.Prelude as P
import System.Environment (getArgs)
import System.Exit (exitFailure)
import System.IO (IOMode (..), withFile)
impor... | cbpark/hep-kinematics | examples/hepmc_pipesparse.hs | bsd-3-clause | 741 | 0 | 12 | 246 | 209 | 110 | 99 | 19 | 1 |
{-| Parsing data from a simulated description of the cluster.
This module holds the code for parsing a cluster description.
-}
{-
Copyright (C) 2009, 2010, 2011, 2012 Google Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published b... | dblia/nosql-ganeti | src/Ganeti/HTools/Backend/Simu.hs | gpl-2.0 | 4,065 | 0 | 16 | 1,013 | 867 | 464 | 403 | 63 | 1 |
module Dotnet.System.ValueType where
import Dotnet
import qualified Dotnet.System.Object
data ValueType_ a
type ValueType a = Dotnet.System.Object.Object (ValueType_ a)
| FranklinChen/Hugs | dotnet/lib/Dotnet/System/ValueType.hs | bsd-3-clause | 172 | 0 | 7 | 21 | 41 | 27 | 14 | -1 | -1 |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeOperators #-}
--------------------------------------------------------------------------------
-- |
-- Module : Data.Comp.Equality
-- Copyright : (c) 2010-2011 Patrick Bahr
-- License : BSD3
-- Maintainer : Patrick Bahr... | spacekitteh/compdata | src/Data/Comp/Equality.hs | bsd-3-clause | 2,051 | 0 | 11 | 456 | 499 | 276 | 223 | 32 | 1 |
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances, DeriveDataTypeable,
OverloadedStrings #-}
-- |This module provides ''check box'' widgets and ''radio button''
-- widgets. In addition, this module provides a generalized
-- ''multi-state'' check box type which allows you to set multiple
-- states in the checkbox,... | KommuSoft/vty-ui | src/Graphics/Vty/Widgets/CheckBox.hs | bsd-3-clause | 10,886 | 0 | 22 | 3,526 | 2,474 | 1,295 | 1,179 | 190 | 1 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE GADTs... | sdiehl/ghc | testsuite/tests/perf/compiler/T12227.hs | bsd-3-clause | 4,081 | 0 | 13 | 1,268 | 1,189 | 658 | 531 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Network.WebexTeams.TypesSpec where
import Data.Aeson (decode, eitherDecode, encode)
import Data.Monoid ((<>))
import Test.Hspec
import Network.WebexTeams.Types
spec :: Spec
spec = do
describe "Error" $ ... | nshimaza/cisco-spark-api | webex-teams-api/test/Network/WebexTeams/TypesSpec.hs | mit | 58,784 | 0 | 20 | 24,555 | 5,391 | 2,866 | 2,525 | 463 | 1 |
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE ScopedTypeVariables #-}
-- |
-- Module : Data.Recall
-- Copyright : Nick Spinale 2015
-- License : MIT
--
-- Maintainer : nickspinale@carleton.edu
-- Stability : experimental
-- Portability : portable
--
-- A typ... | nickspinale/recall | Data/Recall.hs | mit | 4,715 | 0 | 14 | 1,245 | 1,594 | 838 | 756 | 73 | 3 |
#!/usr/bin/env runhaskell
-- translate.hs
import System.Environment
import System.IO
import Text.Pandoc.JSON
import Text.Pandoc (readMarkdown, def)
doRead :: String -> Pandoc
doRead = readMarkdown def
doExtract :: Pandoc -> [Block]
doExtract (Pandoc meta blocks) = blocks
doTranslate :: String -> Block -> [Block]
doT... | fno2010/trans-with-pandoc | translate.hs | mit | 848 | 0 | 13 | 194 | 282 | 145 | 137 | 24 | 2 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ScopedTypeVariables #-}
module CommonTests
( tests
) where
import Data.Fixed (Pico, Fixed(..), E12)
import Data.Time.Calendar (fromGregorian)
import Data.Time.Clock (UTCTime(..))
import Test.Tasty.SmallCheck (testProperty)
impo... | qrilka/xlsx | test/CommonTests.hs | mit | 2,904 | 0 | 16 | 596 | 680 | 341 | 339 | 47 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE TypeOperators #-}
module Pos.Util.Jsend
( -- * JSend data types and functions
ResponseStatus(..)
, HasDiagnostic(..)
, noDiagnosticKey
-- * Generic parsing and rendering helpers.
, jsendErrorGenericToJSON
, jsendErrorGen... | input-output-hk/pos-haskell-prototype | lib/src/Pos/Util/Jsend.hs | mit | 4,902 | 0 | 16 | 1,171 | 1,228 | 669 | 559 | -1 | -1 |
-- Drying Potatoes
-- http://www.codewars.com/kata/58ce8725c835848ad6000007
module Codewars.G964.Potatoes where
potatoes :: Int -> Int -> Int -> Int
potatoes p0 w0 p1 = w0 * (100 - p0) `div` (100 - p1)
| gafiatulin/codewars | src/7 kyu/Potatoes.hs | mit | 204 | 0 | 8 | 33 | 62 | 36 | 26 | 3 | 1 |
module Rx.Observable.Repeat where
import Prelude hiding (repeat)
import Control.Concurrent (yield)
import Control.Monad (forever)
import Tiempo (TimeInterval)
import Rx.Scheduler (Scheduler, Sync, currentThread, scheduleTimedRecursive)
import Rx.Observable.Types
repeat' :: Scheduler s -> IO a -> Observable ... | roman/Haskell-Reactive-Extensions | rx-core/src/Rx/Observable/Repeat.hs | mit | 862 | 0 | 11 | 141 | 265 | 137 | 128 | 19 | 1 |
module Repositories
( Repository (..)
, RepositoryForm (..)
, RepositoryOwner (..)
, toRepository
, toRepositoryOwner
) where
import Data.Aeson
( ToJSON
, FromJSON
, (.=)
, (.:)
, (.:?)
)
import qualified Data.Aeson as AE
import Data.Int (Int64)
import Data.Text (Text)
import qualified GitHub.Endpoints.Rep... | gust/feature-creature | feature-creature/backend/src/Repositories.hs | mit | 4,306 | 0 | 12 | 1,433 | 1,131 | 604 | 527 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE TemplateHaskell #-}
module Circuit.Format.Circ where
import Circuit
import Circuit.Utils
import Circuit.Parser
import qualified Circuit.Builder as B
import Control.Monad
import Control.Monad.Trans
import Text.Parsec hiding (spaces, parseTe... | spaceships/circuit-synthesis | src/Circuit/Format/Circ.hs | mit | 6,556 | 0 | 20 | 1,729 | 2,429 | 1,209 | 1,220 | -1 | -1 |
module Examples.Tests.Motif where
import Improb.AST
-- TODO: Read in from the actual file and roll in the IO monad
motifString = unlines
[ "tempo: 60"
, "motif := (C4,1) -> (F4,1) -> (G4,1) -> (R,1)"
, "variation1 := (C4,1) -> (Ab4,1) -> (E4,1) -> (R,1)"
, "variation2 := (C4,1) -> (F4,1) -> (E4,1) -> ... | michaelbjames/improb | Examples/Tests/Motif.hs | mit | 2,566 | 0 | 24 | 918 | 824 | 458 | 366 | 51 | 1 |
module Velvet.Scraper (vencode) where
import Data.ByteString.Lazy.Char8 (ByteString)
import qualified Data.Text.IO as Text
import Data.Csv (encodeByName)
import Data.Traversable (traverse)
import Velvet.Scraper.Parser (parseLogFile, VelvetInfo, viHeader)
parseAssemblies :: [FilePath] -> IO [VelvetInfo]
parseAssembli... | jtobin/velvet-scraper | Velvet/Scraper.hs | mit | 555 | 0 | 8 | 64 | 157 | 91 | 66 | 12 | 1 |
-- |
-- This module exports functions specialized for the `Op` type.
module Contravariant.Extras.Op
(
-- |
-- A berserk collection of @contrazip@ functions with arities of up to 42.
module Contravariant.Extras.Op.Contrazip,
)
where
import Contravariant.Extras.Op.Contrazip
| nikita-volkov/contravariant-extras | library/Contravariant/Extras/Op.hs | mit | 280 | 0 | 5 | 43 | 29 | 22 | 7 | 4 | 0 |
module Data.Module where
import Data.Expression
import Data.Term.Types
import qualified Data.Map as Map
data Module = Module (Map.Map String (Term Expression))
| antitypical/Surface | src/Data/Module.hs | mit | 162 | 0 | 10 | 22 | 50 | 30 | 20 | 5 | 0 |
module One where
import Data.List
prime :: Int -> Bool
prime n = loopi 3
where loopi :: Int -> Bool
loopi i
| i*i > n = True
| 0 == rem n i = False
| otherwise = loopi $ i +2
sumPrimes :: Int -> Int
sumPrimes lim = loopi 3 2
where loopi :: Int -> Int -> Int
loopi i r... | zeniuseducation/poly-euler | Alfa/one/one.hs | epl-1.0 | 442 | 0 | 11 | 183 | 186 | 95 | 91 | 17 | 3 |
{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances #-}
{- |
Module : $Header$
Description : Coding of a CASL subset into SoftFOL
Copyright : (c) Klaus Luettich and Uni Bremen 2005
License : GPLv2 or higher, see LICENSE.txt
Maintainer : luecke@informatik.uni-bremen.de
Stability... | nevrenato/Hets_Fork | Comorphisms/SuleCFOL2SoftFOL.hs | gpl-2.0 | 47,507 | 0 | 31 | 17,245 | 14,169 | 7,211 | 6,958 | 909 | 20 |
{- |
Module : ./OWL2/MedusaToJson.hs
Description : JSON output for Medusa
Copyright : (c) Uni Magdeburg 2016
License : GPLv2 or higher, see LICENSE.txt
Maintainer : till@iws.cs.ovgu.de
Stability : provisional
Portability : non-portable
JSON output for Medusa
-}
module OWL2.MedusaToJson (medusaTo... | spechub/Hets | OWL2/MedusaToJson.hs | gpl-2.0 | 1,377 | 0 | 9 | 294 | 352 | 200 | 152 | 23 | 1 |
{-|
Module : Cli
Description : A simplistic command line interface
Copyright : Erik Edlund
License : GPL-3
Maintainer : erik.edlund@32767.se
Stability : experimental
Portability : POSIX
-}
module Cli where
import Codec.Picture
import Data.Maybe
import System.Console.GetOpt
import Text.Printf
import Set... | edlund/setseer | sources/Cli.hs | gpl-3.0 | 4,560 | 0 | 15 | 1,402 | 1,449 | 829 | 620 | 143 | 2 |
{-# LANGUAGE FlexibleContexts #-}
import Data.List
import Data.Foldable
import Control.Monad.Except
import Control.Monad.State
infixl 2 :@
infixr 3 :->
type Symb = String
-- Терм
data Expr =
Var Symb
| Expr :@ Expr
| Lam Symb Expr
deriving (Eq,Show)
-- Тип
data Type =
TVar Symb
| Type :-> T... | ItsLastDay/academic_university_2016-2018 | subjects/Haskell/12/solution.hs | gpl-3.0 | 3,726 | 0 | 15 | 925 | 1,779 | 917 | 862 | 96 | 2 |
{-# LANGUAGE NoImplicitPrelude #-}
-- import additional bits and pieces to test
import Prelude (id, (+), (*), (.), Eq, (==), Show)
class Functor f where
fmap :: (a -> b) -> f a -> f b
--------------------------------------------------------------------------------
-- 1. Although it is not possible for a Functor i... | thalerjonathan/phd | coding/learning/haskell/typeclassopedia/FunctorLaws.hs | gpl-3.0 | 1,956 | 2 | 9 | 396 | 202 | 124 | 78 | 10 | 0 |
{-# LANGUAGE ImplicitParams #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE OverloadedStrings #-}
module TestImport
( module TestImport
, module X
) where
import Application (makeFoundation, makeLogWare)
import ClassyPrelude as X hiding (trace)
import Database.Persist as X hid... | nishiuramakoto/logiku | test/TestImport.hs | gpl-3.0 | 7,665 | 0 | 18 | 2,040 | 2,191 | 1,157 | 1,034 | -1 | -1 |
{-# LANGUAGE NoImplicitPrelude, TemplateHaskell, RecordWildCards #-}
-- | A vertical-expand (combo-like) choice widget
module Graphics.UI.Bottle.Widgets.Choice
( make
, IsSelected(..)
, Config(..)
, ExpandMode(..)
) where
import Prelude.Compat
import qualified Control.Lens as Lens
impo... | da-x/lamdu | bottlelib/Graphics/UI/Bottle/Widgets/Choice.hs | gpl-3.0 | 3,121 | 0 | 16 | 871 | 741 | 410 | 331 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-shopping-content/gen/Network/Google/Resource/Content/Collectionstatuses/Get.hs | mpl-2.0 | 5,293 | 0 | 18 | 1,249 | 799 | 464 | 335 | 115 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-compute/gen/Network/Google/Resource/Compute/Projects/MoveInstance.hs | mpl-2.0 | 3,430 | 0 | 14 | 776 | 391 | 236 | 155 | 64 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module Data.TestFixedWidth (tests) where
import Distribution.TestSuite
import Data.FixedWidth
import Data.Bits
import Data.List
import Data.Ratio
import Data.Int
import Data.Word
$(declareFW "Bit7" 7 "bit7")
$(declareUFW "UBit7" 7 "ubit7")
-- Type check at compilation time.
checkB... | yjwen/hada | test/Data/TestFixedWidth.hs | lgpl-3.0 | 9,082 | 0 | 14 | 4,016 | 3,379 | 1,879 | 1,500 | 180 | 1 |
-- combintions 2 "abc" -> [ab, ac, bc]
-- c 3 "abcd" -> ["abc", "abd", "acd", "bcd"]
c :: Int -> [a] -> [[a]]
c 0 _ = [[]]
c _ [] = [[]]
c 1 [x] = [[x]]
c 1 (x:xs) = [[x]] ++ (c 1 xs)
c n (x:xs) =
if length xs > n-1
then (h x (c (n-1) xs)) ++ (c n xs)
else (h x (c (n-1) xs))
-- h 'a' ["bc", "cd", "bd"] ->... | ekalosak/haskell-practice | pr26.hs | lgpl-3.0 | 458 | 0 | 12 | 138 | 306 | 167 | 139 | 15 | 2 |
module P4 where
import Data.List
import Data.Char
import Data.Maybe
safeHead :: [a] -> Maybe a
safeHead [] = Nothing
safeHead (x:_) = Just x
caps :: String -> Bool
caps s = fmap toUpper (safeHead s) == safeHead s && safeHead s /= Nothing
allCaps :: [String] -> Bool
allCaps msgs = and $ map caps msgs
dropTrailing... | slevin/experiements | haskell/cis/h4/P4.hs | unlicense | 579 | 0 | 10 | 111 | 234 | 122 | 112 | 17 | 1 |
module Main where
import qualified JavaLight.UseJll as JL
import qualified Typesafe.Example as TS
main :: IO ()
main = do
JL.main
TS.main
| haroldcarr/learn-haskell-coq-ml-etc | haskell/topic/parsing/bnfc-meta-examples/app/Main.hs | unlicense | 145 | 0 | 7 | 29 | 45 | 27 | 18 | 7 | 1 |
-- Copyright 2020 Google LLC
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in ... | google/cabal2bazel | bzl/tests/hierarchical/Main.hs | apache-2.0 | 639 | 0 | 5 | 112 | 28 | 22 | 6 | 3 | 1 |
import Control.Monad
import System.IO
import System.Process
main :: IO ()
main = do
bootTime <- getBootTime
hout <- dmesg
processHandle bootTime hout
getBootTime :: IO Float
getBootTime = do
contents <- readFile "/proc/uptime"
return $ head $ map readFloat . words $ contents
readFloat :: String -> Float
r... | mkomitee/adventures-in-haskell | dmesg.hs | bsd-2-clause | 1,190 | 0 | 12 | 278 | 295 | 146 | 149 | 30 | 1 |
module Main where
import System.ZMQ (version)
import Text.Printf (printf)
main :: IO ()
main = version >>= putStrLn . fmt where
fmt (major, minor, patch) = printf "Current 0MQ version is %d.%d.%d" major minor patch | krattai/noo-ebs | docs/zeroMQ-guide2/examples/Haskell/version.hs | bsd-2-clause | 220 | 0 | 8 | 40 | 75 | 42 | 33 | 6 | 1 |
{-# LANGUAGE ParallelListComp #-}
module My.Data.List(module Data.List,classesBy,nubOrd,sums,zipRest,wrap,count) where
import Data.List
nubOrd :: Ord a => [a] -> [a]
nubOrd = map head . group . sort
classesBy :: (a -> a -> Bool) -> [a] -> [[a]]
classesBy (==) [] = []
classesBy (==) (e:l) = let (x,t) = partition (... | lih/Alpha | src/My/Data/List.hs | bsd-2-clause | 802 | 2 | 17 | 233 | 447 | 237 | 210 | 19 | 1 |
module Konnect where
import KTypes
import KParse
import GHC.IO.Handle (Handle)
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as BSL
import qualified Data.ByteString.Char8 as BSC
import qualified Network as N
import qualified Data.Word as W
import qualified Data.Binary.Get as G
import qu... | carrutstick/hasq | src/Hasq/Konnect.hs | bsd-3-clause | 2,390 | 0 | 13 | 683 | 829 | 421 | 408 | 66 | 2 |
module Settings.Packages.Directory (directoryPackageArgs) where
import Expression
import GHC (directory)
import Predicates (stagedBuilder, package)
-- TODO: I had to define symbol __GLASGOW_HASKELL__ as otherwise directory.c is
-- effectively empty. I presume it was expected that GHC will be used for
-- compiling all... | quchen/shaking-up-ghc | src/Settings/Packages/Directory.hs | bsd-3-clause | 571 | 0 | 7 | 84 | 65 | 39 | 26 | 7 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Mismi.S3.Patch.Network (
chunkedFile
) where
import Control.Monad
import Control.Monad.Trans.Resource
import Control.Monad.IO.Class
import Data.Conduit
impor... | ambiata/mismi | mismi-s3/src/Mismi/S3/Patch/Network.hs | bsd-3-clause | 1,241 | 0 | 13 | 374 | 309 | 165 | 144 | 32 | 2 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE ConstraintKinds #-}
{-# OPT... | AjayRamanathan/plots | src/Plots/Types/Line.hs | bsd-3-clause | 1,755 | 0 | 11 | 353 | 475 | 255 | 220 | 32 | 1 |
{-# LANGUAGE OverloadedStrings, TypeFamilies #-}
import Control.Monad.Trans.Free (iterT)
import Data.Monoid (mconcat)
import qualified Data.Text as T
import qualified Filesystem.Path.CurrentOS as F
import Filesystem.Path ((</>), (<.>))
import qualified Filesystem as F
import Network (withSocketsDo)
import Options.Appl... | bitemyapp/suns-cmd | Executable.hs | bsd-3-clause | 2,863 | 4 | 29 | 993 | 750 | 396 | 354 | 86 | 1 |
module Graphics.ChalkBoard.Active where
import Control.Applicative
import Graphics.ChalkBoard.Types
import Graphics.ChalkBoard.Utils
import Graphics.ChalkBoard.Board
import Graphics.ChalkBoard.O
import Data.Ratio
import Data.Time.Clock
import Control.Concurrent.MVar
data Active a
= Active Rational -- start
... | andygill/chalkboard2 | Graphics/ChalkBoard/Active.hs | bsd-3-clause | 9,689 | 43 | 14 | 2,394 | 3,890 | 1,982 | 1,908 | 178 | 3 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE Rank2Types #-}
module Data.LDAG
( LDAG, layers, allLayers
, Layer, nodes, allNodes
, Node, nodeLabel, outgoing, dead
, LayerMap
, NodeMap
, LayerID
, No... | GaloisInc/cryfsm | Data/LDAG.hs | bsd-3-clause | 2,929 | 0 | 21 | 627 | 1,188 | 646 | 542 | -1 | -1 |
{-# LANGUAGE FlexibleContexts #-}
module Kalium.Nucleus.Vector.Sanity where
import Kalium.Prelude
import Kalium.Nucleus.Vector.Program
import Control.Monad.Writer
sanity_nameUniqueness :: Program -> Bool
sanity_nameUniqueness program
= liftA2 (==) nub id . execWriter
$ itraverse fnsnu (view programFuncs prog... | rscprof/kalium | src/Kalium/Nucleus/Vector/Sanity.hs | bsd-3-clause | 934 | 0 | 11 | 270 | 375 | 180 | 195 | -1 | -1 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE UndecidableInstances #-}
{-|
Module : Numeric.AERN.Poly.IntPol... | michalkonecny/aern | aern-poly/src/Numeric/AERN/Poly/IntPoly/Conversion.hs | bsd-3-clause | 14,419 | 0 | 13 | 3,429 | 3,212 | 1,664 | 1,548 | 301 | 1 |
module Language.TECS.Jack.ToDeck.Compile (compile) where
import Language.TECS.Jack.Syntax as Jack
import qualified Language.TECS.Deck.Syntax as Deck
import Language.TECS.Jack.ToDeck.Layout
import Control.Monad.RWS
import Control.Applicative
import Data.Sequence (Seq, singleton)
import Data.Foldable (toList)
import Co... | gergoerdi/tecs | src/Language/TECS/Jack/ToDeck/Compile.hs | bsd-3-clause | 6,294 | 0 | 14 | 1,548 | 2,439 | 1,189 | 1,250 | 175 | 4 |
{-# LANGUAGE FlexibleContexts, RankNTypes, ScopedTypeVariables #-}
module EC2Tests.KeyPairTests
( runKeyPairTests
)
where
import Control.Applicative ((<$>))
import Crypto.PubKey.RSA (generate)
import Crypto.Random.API (cprgCreate)
import Crypto.Random (SystemRNG, createEntropyPool)
import Data.Certificate... | worksap-ate/aws-sdk | test/EC2Tests/KeyPairTests.hs | bsd-3-clause | 1,658 | 0 | 21 | 395 | 414 | 224 | 190 | 39 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
module Generate where
import Control.Monad.Except (MonadError, MonadIO, forM_, liftIO, throwError)
import qualified Data.Graph as Graph
import qualified Data.Map as Map
import qualified Data.Maybe as Maybe
import qualified Data.Set as Set
import qual... | laszlopandy/elm-make | src/Generate.hs | bsd-3-clause | 4,262 | 0 | 22 | 1,075 | 1,095 | 594 | 501 | 105 | 3 |
{-# LANGUAGE TypeFamilies, PolyKinds, DataKinds #-}
-- {-# LANGUAGE CUSKs #-} -- enabled by default
module CuskFam where
type family F a -- non-injective
type family X :: F a
-- Used to fail with:
--
-- • Couldn't match expected kind ‘F a1’ with actual kind ‘F a’
-- NB: ‘F’ is a non-inje... | sdiehl/ghc | testsuite/tests/polykinds/CuskFam.hs | bsd-3-clause | 531 | 0 | 5 | 139 | 32 | 24 | 8 | 4 | 0 |
{-
This module defines our application's monad and any application-specific
information it requires.
-}
module Application
( Application
, applicationInitializer
) where
import Control.Monad.Trans (liftIO)
import Snap.Extension
import Snap.Extension.Timer.Impl
import Snap.Extens... | benarmston/hpastie | src/Application.hs | bsd-3-clause | 2,199 | 0 | 9 | 361 | 215 | 127 | 88 | 24 | 1 |
module LeapYearKata.Day7Spec (spec) where
import Test.Hspec
import LeapYearKata.Day7 (isLeapYear)
spec :: Spec
spec = do
it "is a leap year when divisible by 4" $ do
isLeapYear 1996 `shouldBe` True
it "is not a leap year when not divisible by 4" $ do
isLeapYear... | Alex-Diez/haskell-tdd-kata | old-katas/test/LeapYearKata/Day7Spec.hs | bsd-3-clause | 548 | 0 | 11 | 179 | 124 | 62 | 62 | 13 | 1 |
--------------------------------------------------------------------------------
-- Copyright © 2011 National Institute of Aerospace / Galois, Inc.
--------------------------------------------------------------------------------
-- | Bounded Linear Temporal Logic (LTL) operators. For a bound @n@, a property
-- @p@ ho... | seni/copilot-libraries | src/Copilot/Library/LTL.hs | bsd-3-clause | 3,073 | 0 | 11 | 746 | 460 | 266 | 194 | 22 | 1 |
{-
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: 2.0
Kubernetes API version: v1.9.12
Generated by Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
-}
{-|
Module : Kubernetes.OpenAPI.API.Authori... | denibertovic/haskell | kubernetes/lib/Kubernetes/OpenAPI/API/AuthorizationV1.hs | bsd-3-clause | 9,105 | 0 | 10 | 1,048 | 1,346 | 797 | 549 | -1 | -1 |
{-# LANGUAGE GeneralizedNewtypeDeriving, ScopedTypeVariables, DeriveDataTypeable #-}
{-# LANGUAGE TypeFamilies, ConstraintKinds #-}
-- | Both System.Directory and System.Environment wrappers
module Development.Shake.Internal.Rules.Directory(
doesFileExist, doesDirectoryExist,
getDirectoryContents, getDirectory... | ndmitchell/shake | src/Development/Shake/Internal/Rules/Directory.hs | bsd-3-clause | 16,200 | 0 | 19 | 3,031 | 2,606 | 1,425 | 1,181 | -1 | -1 |
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, FlexibleContexts #-}
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Layout.IM
-- Description : Layout modfier for multi-windowed instant messengers like Psi or Tkabber.
-- Copyright : (c) Roman Chepl... | xmonad/xmonad-contrib | XMonad/Layout/IM.hs | bsd-3-clause | 4,781 | 0 | 18 | 1,001 | 845 | 464 | 381 | 49 | 2 |
{-# LANGUAGE TupleSections, TemplateHaskell, ScopedTypeVariables #-}
{-# OPTIONS -Wall -fno-warn-orphans -fno-warn-unused-imports -fno-warn-missing-signatures #-}
import Data.Numbering
import Test.QuickCheck
import Test.Framework.TH
import Test.Framework.Providers.QuickCheck2
import Control.Applicative
import qualified... | DanielSchuessler/numbering | tests.hs | bsd-3-clause | 2,732 | 0 | 15 | 601 | 902 | 455 | 447 | -1 | -1 |
{-# OPTIONS #-}
-----------------------------------------------------------------------------
-- |
-- Module : Language.Py.ParserUtils
-- Copyright : (c) 2009 Bernie Pope
-- License : BSD-style
-- Maintainer : bjpop@csse.unimelb.edu.au
-- Stability : experimental
-- Portability : ghc
--
-- Various utilit... | codeq/language-py | src/Language/Py/ParserUtils.hs | bsd-3-clause | 12,004 | 0 | 14 | 2,457 | 3,287 | 1,703 | 1,584 | 185 | 7 |
--------------------------------------------------------------------------
-- Copyright (c) 2007-2016, ETH Zurich.
-- All rights reserved.
--
-- This file is distributed under the terms in the attached LICENSE file.
-- If you do not find this file, copies can be found by writing to:
-- ETH Zurich D-INFK, Universitaetst... | kishoredbn/barrelfish | hake/K1om.hs | mit | 8,871 | 0 | 21 | 3,682 | 1,339 | 741 | 598 | 165 | 1 |
module Main where
import System.IO
import System.Random
import Control.Monad.Random
import Data.Time.Clock
import FRP.BearRiver
import AgentMonad
import GlossRunner
import Init
import Simulation
durationSecs :: Double... | thalerjonathan/phd | thesis/code/concurrent/sugarscape/SugarScapePure/src/Main.hs | gpl-3.0 | 1,798 | 0 | 13 | 526 | 402 | 215 | 187 | 42 | 2 |
f :: m a -> m
f = undefined
| roberth/uu-helium | test/kinderrors/KindError8.hs | gpl-3.0 | 28 | 0 | 6 | 9 | 18 | 9 | 9 | 2 | 1 |
{-# LANGUAGE CPP, GADTs #-}
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
-- ----------------------------------------------------------------------------
-- | Handle conversion of CmmProc to LLVM code.
--
module LlvmCodeGen.CodeGen ( genLlvmProc ) where
#include "HsVersions.h"
import GhcPrelude
import Llvm
import Llvm... | shlevy/ghc | compiler/llvmGen/LlvmCodeGen/CodeGen.hs | bsd-3-clause | 75,123 | 0 | 25 | 22,106 | 20,496 | 10,140 | 10,356 | 1,302 | 65 |
{-
- Copyright (c) 2010 Mats Rauhala <mats.rauhala@gmail.com>
-
- Permission is hereby granted, free of charge, to any person
- obtaining a copy of this software and associated documentation
- files (the "Software"), to deal in the Software without
- restriction, including without limitation the rights to us... | MasseR/zsh-battery | Symbols.hs | bsd-3-clause | 1,247 | 0 | 4 | 250 | 25 | 16 | 9 | 5 | 1 |
{-# LANGUAGE CPP, MagicHash, UnboxedTuples #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE MultiWayIf #-}
{-# OPTIONS_GHC -O2 -funbox-strict-fields #-}
-- We always optimise this, otherwise performance of a non-optimised
-- comp... | ezyang/ghc | compiler/utils/Binary.hs | bsd-3-clause | 39,213 | 60 | 23 | 12,962 | 12,008 | 5,844 | 6,164 | 704 | 2 |
{-# LANGUAGE Haskell2010 #-}
{-# LINE 1 "System/FilePath/Posix.hs" #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE Safe #-}
{-# LANGUAGE PatternGuards #-}
-- This template expects CPP definitions for:
-- Posix = Posix | Windows
-- False = False | True
-- |
-- Module :... | phischu/fragnix | tests/packages/scotty/System.FilePath.Posix.hs | bsd-3-clause | 38,641 | 0 | 18 | 7,510 | 5,160 | 2,971 | 2,189 | 303 | 6 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | kim/amazonka | amazonka-importexport/gen/Network/AWS/ImportExport/GetStatus.hs | mpl-2.0 | 8,409 | 0 | 40 | 2,091 | 1,583 | 917 | 666 | 155 | 1 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE OverloadedStrings #-}
module HN.Controllers where
import HN.Monads
import HN.Model.Items
import HN.Types
import HN.Data
import HN.View.Home as V
import qualified Data.Text as T
import Snap.App
import S... | lwm/haskellnews | src/HN/Controllers.hs | bsd-3-clause | 2,082 | 0 | 18 | 651 | 599 | 304 | 295 | 63 | 2 |
{-# LANGUAGE BangPatterns #-}
module Proposal229a where
data T a b = a :! b
(!) :: x -> T a b -> (x, a, b)
~u ! !(!m :! !n) = (u, m, n)
| sdiehl/ghc | testsuite/tests/parser/should_compile/proposal-229a.hs | bsd-3-clause | 139 | 0 | 9 | 38 | 78 | 44 | 34 | -1 | -1 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE CPP #-}
#ifdef __GLASGOW_HASKELL__
{-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-}
#endif
-----------------------------------------------------------------------------
-- |
-- Module : Control.Concurrent.QSem
-- Copyright : (c) The University of Glasgow 2001
-... | beni55/haste-compiler | libraries/ghc-7.8/base/Control/Concurrent/QSem.hs | bsd-3-clause | 3,050 | 0 | 15 | 719 | 458 | 258 | 200 | -1 | -1 |
{-# LANGUAGE TemplateHaskell #-}
module Compiler.JMacro.Lens where
import Control.Lens
import Compiler.JMacro.Base
makeLenses ''JStat
makePrisms ''JStat
makeLenses ''JExpr
makePrisms ''JExpr
makeLenses ''JVal
makePrisms ''JVal
makeLenses ''Ident
makePrisms ''Ident
| beni55/ghcjs | src/Compiler/JMacro/Lens.hs | mit | 269 | 0 | 6 | 31 | 83 | 37 | 46 | 12 | 0 |
a = 1
b = 2
bad = '
| wxwxwwxxx/ghc | testsuite/tests/ghci/prog013/Bad.hs | bsd-3-clause | 20 | 2 | 4 | 9 | 23 | 10 | 13 | -1 | -1 |
{-| Module: Web.Ogma.Graph
Copyright: Ogma Project 2016–2017
License: AGPL-3
Stability: experimental
Specify the relation between a set of 'Resource's by defining a labeled
graph. This library relies a lot on the dependent types of Haskell. It is
heavily inspired by Servant.
-}
{-# LANGUAGE Allo... | ogma-project/ogma | src/Web/Ogma/Graph.hs | mit | 5,743 | 0 | 17 | 1,607 | 2,275 | 1,194 | 1,081 | -1 | -1 |
{-# OPTIONS_GHC -O0 #-}
{-# LANGUAGE CPP, DeriveGeneric, DeriveDataTypeable, LambdaCase, MagicHash, StandaloneDeriving #-}
{- |
Communication between the compiler (GHCJS) and runtime (on node.js) for
Template Haskell
-}
module GHCJS.Prim.TH.Types ( Message(..)
, THResultType(..)
... | forked-upstream-packages-for-ghcjs/ghcjs | ghcjs-prim/src/GHCJS/Prim/TH/Types.hs | mit | 5,724 | 0 | 9 | 1,219 | 753 | 403 | 350 | -1 | -1 |
import Common
main = print $ sum [ x | x <- [1..9999], (d $ d x) == x, d x /= x ]
d :: Int -> Int
d n = sum $ divisors n
| lekto/haskell | Project-Euler-Solutions/problem0021.hs | mit | 124 | 0 | 12 | 39 | 85 | 43 | 42 | 4 | 1 |
module Types where
import Communication
import Data.ByteString.Char8 (ByteString, unpack)
import Data.Hashable (Hashable, hashWithSalt)
import qualified Data.Map as M
import Control.Concurrent (ThreadId)
import Control.Concurrent.STM (TVar)
import Control.... | jahaynes/crawler | src/Types.hs | mit | 3,837 | 0 | 11 | 1,077 | 820 | 472 | 348 | 77 | 0 |
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{- | Try joining data to a JSON -}
module Main where
import Control.Lens
import Data.Aeson
import qualified Data.Text as T
import qualified Data.Text.IO as T
import qualified Data.ByteString.Char8 as B
im... | danchoi/ghb | Ghb/Join.hs | mit | 949 | 0 | 18 | 174 | 204 | 122 | 82 | -1 | -1 |
-- | We model an M/M/1 queue, i.e. a single-server queue with Poisson
-- arrivals and service times.
--
-- See "Stochastic Dynamic Programming and the Control of Queueing
-- Systems", Linn I. Sennot,, p. 242 for details.
module Algorithms.MDP.Examples.MM1 where
import qualified Algorithms.MDP.CTMDP as CTMDP
-- | A de... | prsteele/mdp | src/Algorithms/MDP/Examples/MM1.hs | mit | 5,560 | 0 | 15 | 1,946 | 1,177 | 697 | 480 | 103 | 6 |
-- |
-- Module : Data.Edison.Seq.RevSeq
-- Copyright : Copyright (c) 1998-1999, 2008 Chris Okasaki
-- License : MIT; see COPYRIGHT file for terms and conditions
--
-- Maintainer : robdockins AT fastmail DOT fm
-- Stability : stable
-- Portability : GHC, Hugs (MPTC and FD)
--
-- This mo... | robdockins/edison | edison-core/src/Data/Edison/Seq/RevSeq.hs | mit | 16,354 | 0 | 13 | 4,452 | 8,375 | 4,316 | 4,059 | -1 | -1 |
---------------------------------------------------------
--
-- Module : Data.Time.Calendar.Hebrew
-- Copyright : Michael Snoyman
-- License : BSD3
--
-- Maintainer : Michael Snoyman <michael@snoyman.com>
-- Stability : Unstable
-- Portability : portable
--
-- Conversion to and from Hebrew dat... | snoyberg/hebrew-time | src/Data/Time/Calendar/Hebrew.hs | mit | 678 | 0 | 5 | 149 | 63 | 49 | 14 | 10 | 0 |
module PansiteSpec.Config.UtilSpec (spec) where
import Data.List
import Pansite
import Test.Hspec
import Test.QuickCheck
genRoutePath :: Gen String
genRoutePath = intercalate "/" <$> listOf (listOf $ elements ['a'..'z'])
unsplitRoutePathProp :: Property
unsplitRoutePathProp = ... | rcook/pansite | spec/PansiteSpec/Config/UtilSpec.hs | mit | 520 | 0 | 10 | 113 | 135 | 71 | 64 | 13 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE TypeFamilies, FlexibleContexts #-}
module Database.Persist.Class.PersistUnique
( PersistUnique (..)
, getByValue
, insertBy
, replaceUnique
, checkUnique
) where
import qualified Prelude
import Prelude hiding ((++), show)
import Control.Monad (liftM)
import Co... | gbwey/persistentold | persistent/Database/Persist/Class/PersistUnique.hs | mit | 6,421 | 0 | 13 | 1,263 | 1,410 | 752 | 658 | -1 | -1 |
{-# LANGUAGE TupleSections, RecordWildCards,
DeriveDataTypeable, BangPatterns, LambdaCase, GADTs
#-}
module Luck.Main where
import Control.Monad
import Control.Monad.Random
import Common.Pretty (render, prettyPrint, pp)
import Common.SrcLoc
import Common.Util
import Common.Types hiding (subst)
import Common.Con... | QuickChick/Luck | luck/src/Luck/Main.hs | mit | 9,558 | 0 | 24 | 2,634 | 2,641 | 1,372 | 1,269 | 186 | 15 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Protolude
import Servant
import Network.Wai.Handler.Warp
import Types
type FinanceAPI = "transaction" :> QueryParam "id" Integer :> Get '[JSON] Transaction
server :: S... | collaborare/MyFinances | src/Main.hs | mit | 555 | 0 | 9 | 88 | 133 | 74 | 59 | 17 | 1 |
{-# LANGUAGE RecordWildCards #-}
module Shexkell.Text.Compact.ShexParser (
module Text.ParserCombinators.Parsec
, shexDoc
) where
import Shexkell.Data.ShEx
import Shexkell.Data.Common
import Shexkell.Data.TripleExpr
import Shexkell.Text.Compact.Control
import Shexkell.Text.Compact.NodeConstraint
import Shexkel... | weso/shexkell | src/Shexkell/Text/Compact/ShexParser.hs | mit | 8,539 | 0 | 15 | 1,619 | 2,587 | 1,292 | 1,295 | 214 | 3 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE TypeFamilies, FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
module Database.Persist.Class.PersistStore
( HasPersistBackend (..)
, liftPersist
, PersistStore (..)
, getJust
, bel... | junjihashimoto/persistent | persistent/Database/Persist/Class/PersistStore.hs | mit | 7,147 | 0 | 14 | 1,659 | 1,558 | 830 | 728 | 104 | 2 |
{-# htermination catchHugsException :: IO a -> (HugsException -> IO a) -> IO a #-}
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/Prelude_catchHugsException_1.hs | mit | 83 | 0 | 2 | 15 | 3 | 2 | 1 | 1 | 0 |
module PrintJasm where
import Data.Char
import Data.Map hiding (map, foldr)
import Prelude hiding (lookup)
import Control.Monad.State
import AbsJasm
-- Env Stuff
-- class name, var count, var table
data JEnv = Env Ident Integer [Context]
type Context = Map Ident Integer
newEnv :: JProgram -> JEnv
newEnv (Prog cn _... | davidsundelius/JLC | src/PrintJasm.hs | mit | 13,699 | 0 | 19 | 5,640 | 5,067 | 2,437 | 2,630 | 329 | 44 |
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE OverloadedStrings #-}
module Hgamelaunch.UserTools
( login,
register,
modify,
modifyYn,
attemptLogin,
attemptRegister,
registerRegular,
changePassword,
changeEmail
... | C0DEHERO/Hgamelaunch | Hgamelaunch/UserTools.hs | mit | 3,606 | 0 | 13 | 697 | 1,156 | 565 | 591 | 88 | 3 |
-- Algorithms/Implementation/Find Digits
module Main where
import qualified HackerRank.Algorithms.FindDigits as M
main :: IO ()
main = M.main
| 4e6/sandbox | haskell/hackerrank/FindDigits.hs | mit | 144 | 0 | 6 | 20 | 31 | 20 | 11 | 4 | 1 |
{-# OPTIONS_GHC -O2 -Wall -fwarn-tabs -Werror #-}
-------------------------------------------------------------------------------
-- |
-- Module : Main
-- Copyright : Copyright (c) 2014 Michael R. Shannon
-- License : MIT
-- Maintainer : mrshannon.aerospace@gmail.com
-- Stability : unstable
-- Porta... | mrshannon/lorenz | src/Main.hs | mit | 634 | 0 | 7 | 103 | 50 | 33 | 17 | 5 | 1 |
-- This file is part of Tombot, licensed under the GNU GPL 2 license.
-- See the file "LICENSE" for more information.
-- Copyright Shou, 2013
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables,
PartialTypeSignatures, TypeApplications, FlexibleContexts
#-}
module Tombot.IRC where
-- {{{ Imports
import... | Shou/Tombot | Tombot/IRC.hs | gpl-2.0 | 16,260 | 0 | 22 | 4,422 | 6,389 | 3,162 | 3,227 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Monad (forM_, guard, when, unless)
import Network.HTTP.Client (newManager, Manager)
import Network.HTTP.Client.TLS (tlsManagerSettings)
import Web.Telegram.API.Bot.API
import Web.Telegram.API.Bot.Responses
import Web.Telegram.API.Bot.Data
import Web.T... | swordfeng/tg-biobot | src/Main.hs | gpl-3.0 | 7,326 | 0 | 26 | 2,450 | 1,908 | 962 | 946 | 127 | 13 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveGeneric #-}
module Main (main) where
import Data.ByteString
import Data.ByteString.Lazy as L (toStrict)
-- import qualified Data.ByteString.Char8 as C8
import Control.Applicative
import qualified Control.Concurrent.Map as M
import ... | jjl/ctaas | src/Main.hs | gpl-3.0 | 1,583 | 0 | 11 | 373 | 510 | 266 | 244 | 32 | 1 |
{-# LANGUAGE Arrows #-}
-- | This module defines the game as a big Signal Function that transforms a
-- Signal carrying a Input 'Controller' information into a Signal carrying
-- 'GameState'.
--
-- There is no randomness in the game, the only input is the user's.
-- 'Controller' is an abstract representation of a basic... | keera-studios/pang-a-lambda | Experiments/collisions/Game.hs | gpl-3.0 | 9,834 | 3 | 14 | 2,339 | 1,135 | 679 | 456 | 80 | 1 |
module Data.BTree.KVBackend.Util where
bsToFilePath :: S.Serialize k => k -> FilesKV FilePath
bsToFilePath path =
do dir <- ask
return $ dir </> (B.unpack $ B.map fix $ B64.encode $ S.encode path)
where
fix '/' = '-'
fix c = c
| br0ns/hindsight | src/Data/BTree/KVBackend/Util.hs | gpl-3.0 | 248 | 0 | 13 | 62 | 102 | 51 | 51 | 7 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | dysinger/amazonka | amazonka-cognito-sync/gen/Network/AWS/CognitoSync/DeleteDataset.hs | mpl-2.0 | 5,220 | 0 | 9 | 1,114 | 596 | 366 | 230 | 73 | 1 |
{- |
Module : $Header$
Description : Property tests for tempuhs-server
Copyright : (c) plaimi 2014
License : AGPL-3
Maintainer : tempuhs@plaimi.net
-} module Main (main) where
import Test.Framework
(
Test,
defaultMain,
)
import Tempuhs.Props.Timespan
(
timespanLaws,
)
main :: IO ()
ma... | plaimi/tempuhs-server | prop/Prop.hs | agpl-3.0 | 381 | 0 | 6 | 88 | 67 | 41 | 26 | 12 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.