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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE... | thesietch/homOS | homOS-backend/src/Lib.hs | mit | 4,528 | 0 | 16 | 1,029 | 1,086 | 575 | 511 | 96 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Chorale.Geo.Coordinates
-- Copyright : 2014-2016 Franz-Benjamin Mocnik
-- License : MIT
--
-- Maintainer : mail@mocnik-science.net
-- Stability : stable
-- Portability : portable
--
-----------------------... | mocnik-science/chorale-geo | src/Chorale/Geo/Coordinates.hs | mit | 4,793 | 1 | 19 | 1,337 | 1,559 | 818 | 741 | 77 | 1 |
module Librato (
withLibrato,
module Librato.Metrics,
module Librato.Types
) where
import Librato.Internal
import Librato.Types
import Librato.Metrics
--data DisplayAttribute
-- = Color
-- | DisplayMax
-- | DisplayMin
-- | DisplayUnitsLong
-- | DisplayUnitsShort
-- | DisplayStacked
-- | DisplayTransform
... | iand675/librato | src/Librato.hs | mit | 555 | 0 | 5 | 124 | 60 | 47 | 13 | 7 | 0 |
-- |
-- Module : Graphics.WaveFront.Foreign
-- Description : Foreign function interface
-- Copyright : (c) Jonatan H Sundqvist, 2015
-- License : MIT
-- Maintainer : Jonatan H Sundqvist
-- Stability : experimental|stable
-- Portability : POSIX (not sure)
-- February 24 2015
-- TODO | - Possible to get r... | SwiftsNamesake/3DWaves | src/Graphics/WaveFront/Foreign.hs | mit | 2,829 | 0 | 3 | 381 | 72 | 70 | 2 | 2 | 0 |
module Yahtzee.Scoring where
import Text.Show.Functions
import Data.Tuple.Select
import Data.List
-- Upper section
scoreN :: Int -> [Int] -> Int
scoreN n = sum . filter (==n)
-- Straights
isSmallStraight :: [Int] -> Bool
isSmallStraight roll = or [[1,2,3,4] `isInfixOf` r,
[2,3,4,5] `is... | kvalle/yahtzee.hs | src/Yahtzee/Scoring.hs | mit | 1,668 | 0 | 11 | 378 | 651 | 369 | 282 | 39 | 2 |
{-# LANGUAGE CPP #-}
-- This example requires manual rebuild (as opposed to dynamic ones, automatically rebuilding the
-- config upon changes). This config is useful for distribution of the editor in binary form as such
-- a build have almost all libraries statically linked in.
-- Here's a building example with "stack"... | ethercrow/yi | example-configs/yi-all-static/Main.hs | gpl-2.0 | 4,167 | 4 | 22 | 962 | 945 | 513 | 432 | 73 | 3 |
{- |
Module : ./HasCASL/MatchCAD.hs
Description : MatchCAD program
Copyright : (c) Ewaryst Schulz, DFKI Bremen 2010
License : similar to LGPL, see HetCATS/LICENSE.txt or LIZENZ.txt
Maintainer : ewaryst.schulz@dfki.de
Stability : experimental
Portability : non-portable (via imports)
Program for ma... | gnn/Hets | HasCASL/MatchCAD.hs | gpl-2.0 | 4,678 | 21 | 13 | 1,460 | 1,225 | 660 | 565 | 103 | 7 |
--
-- Statistics collection
--
-- Copyright © 2012 Operational Dynamics Consulting, Pty Ltd
--
-- The code in this file, and the program it is a part of, is made available
-- to you by its authors as open source software: you can redistribute it
-- and/or modify it under the terms of the GNU General Public License vers... | afcowie/metrics | src/ParseCommandAttoparsec.hs | gpl-2.0 | 3,353 | 0 | 10 | 606 | 502 | 286 | 216 | 47 | 1 |
-- collect all nodes from a tree
-- at a specific level
data Tree a = Empty | Branch a (Tree a) (Tree a) deriving Show
p62b :: Tree a -> Int -> [a]
p62b _ 0 = []
p62b Empty _ = []
p62b (Branch t l r) 1 = [t]
p62b (Branch t l r) n = p62b l (n-1) ++ p62b r (n-1)
| yalpul/CENG242 | H99/61-69/p62b.hs | gpl-3.0 | 263 | 2 | 9 | 68 | 161 | 79 | 82 | 6 | 1 |
{-# LANGUAGE Arrows #-}
{-# LANGUAGE FlexibleContexts #-}
module SugarScape.Agent.Trading
( agentTrade
, replyTradingOffer
) where
import Data.Maybe
import Control.Monad.Random
import Control.Monad.State.Strict
import Data.MonadicStreamFunction
import SugarScape.Agent.Common
import SugarScape.Agent.I... | thalerjonathan/phd | public/towards/SugarScape/experimental/concurrent/src/SugarScape/Agent/Trading.hs | gpl-3.0 | 9,098 | 1 | 18 | 2,449 | 1,761 | 908 | 853 | 148 | 3 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Language.VHDL.Pretty
( pprr
, pprrText
) where
import Data.Char (intToDigit)
import Data.Data (Data)
import qualified Data.Text as T
import Data.Text.Lazy ... | truls/language-vhdl-quote | src/Language/VHDL/Pretty.hs | mpl-2.0 | 36,209 | 0 | 17 | 9,665 | 14,977 | 7,191 | 7,786 | 927 | 2 |
{-# 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-iam/gen/Network/AWS/IAM/CreateRole.hs | mpl-2.0 | 5,238 | 0 | 14 | 1,125 | 709 | 430 | 279 | 90 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-android-publisher/gen/Network/Google/Resource/AndroidPublisher/InAppProducts/Update.hs | mpl-2.0 | 4,563 | 0 | 16 | 1,066 | 545 | 324 | 221 | 86 | 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 #-}
-- ... | olorin/amazonka | amazonka-iam/gen/Network/AWS/IAM/ListAttachedGroupPolicies.hs | mpl-2.0 | 8,417 | 0 | 17 | 1,643 | 1,010 | 609 | 401 | 115 | 1 |
-- Copyright 2012-2014 Samplecount S.L.
--
-- 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 agr... | samplecount/shake-language-c | src/Development/Shake/Language/C/ToolChain.hs | apache-2.0 | 10,167 | 0 | 18 | 2,534 | 1,914 | 1,062 | 852 | 199 | 6 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QAbstractItemView_h.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:20
Warning : this file is machine generate... | uduki/hsQt | Qtc/Gui/QAbstractItemView_h.hs | bsd-2-clause | 116,200 | 0 | 18 | 24,003 | 36,565 | 17,564 | 19,001 | -1 | -1 |
{-|
Module : Network.NSFW.Firewall.Rule
Description : Defines the basic packet filtering rules.
-}
module Network.NSFW.Firewall.Rule
( makeBlacklistFilter, protocolBlacklistFilter, sourceIpBlacklistFilter
) where
import Network.NSFW.Firewall.Common
( Action(DROP, PASS), FirewallState, LogLevel(Log... | m-renaud/NSFW | src/Network/NSFW/Firewall/Rule.hs | bsd-2-clause | 1,492 | 0 | 15 | 265 | 285 | 161 | 124 | 22 | 2 |
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
module Development.Ecstatic.SimplifyDef (
simplify,
isSum, isMul, isAtom, isPrim
) where
import Development.Ecstatic.Types()
import qualified Simplify as S
import Language.C
import qualified Data.Map.Strict ... | kovach/ecstatic | Development/Ecstatic/SimplifyDef.hs | bsd-2-clause | 3,860 | 1 | 21 | 615 | 1,436 | 750 | 686 | 98 | 4 |
import Data.Array
import qualified Data.Array.Unboxed as U
import qualified Data.Foldable as Fld
import Data.List
import qualified Data.Map as Map
import Data.Maybe
import qualified Data.Sequence as Seq
buildArr la a b f = res
where
res = la (a, b) (map (f (res !)) [a .. b])
merge [] xs = xs
merge xs [] =... | pbl64k/HackerRank-Contests | 2014-06-20-FP/BoleynSalary/bs.qs.hs | bsd-2-clause | 2,006 | 0 | 19 | 550 | 985 | 521 | 464 | 42 | 3 |
module Mashroom (Mashroom(White, Red), number) where
data Mashroom = White | Red deriving Show
number :: Integer
number = 7
| YoshikuniJujo/funpaala | samples/45_summary/Mashroom.hs | bsd-3-clause | 126 | 0 | 5 | 22 | 41 | 27 | 14 | 6 | 1 |
module Graphics.Pastel.GD.Test ( testGD ) where
import Graphics.Pastel
import Graphics.Pastel.GD.Draw
import Graphics.GD
import qualified Data.ByteString as BS
testGD :: (Int, Int) -> Drawing -> IO ()
testGD (w,h) d = do image <- drawGD (w,h) d
bs <- savePngByteString image
BS... | willdonnelly/pastel | Graphics/Pastel/GD/Test.hs | bsd-3-clause | 333 | 0 | 9 | 85 | 114 | 64 | 50 | 9 | 1 |
module Control.Concurrent.Suspend
( suspend
, Delay
, usDelay
, msDelay
, sDelay
, mDelay
, hDelay
, (.+.)
) where
------------------------------------------------------------------------------
import Control.Concurrent (threadDelay)
import Control.Monad (when)
-------------------------------... | Palmik/suspend | src/Control/Concurrent/Suspend.hs | bsd-3-clause | 1,022 | 0 | 13 | 171 | 167 | 96 | 71 | 17 | 1 |
import Data.Bits
halfAdder :: Bits a => a -> a -> (a, a)
halfAdder x y = (x `xor` y, x .&. y)
fullAdder :: Bits a => a -> a -> a -> (a, a)
fullAdder x y c_in = (s, c_out)
where s = (x `xor` y) `xor` c_in;
c_out = ((x .&. y) .|. (x .&. c_in)) .|. (y .&. c_in)
fullAdder2 :: Bits a => a -> a -> a -> (a, ... | cameronbwhite/ComputerHardware | adder.hs | bsd-3-clause | 461 | 0 | 11 | 144 | 263 | 148 | 115 | 12 | 1 |
module Kraken.Web.ConfigSpec where
import Control.Applicative
import Control.DeepSeq
import Control.Exception
import Data.Aeson
import Data.String.Conversions
import Network.URI
import Network.Wai.Handler.Warp
import Safe
import ... | zalora/kraken | test/Kraken/Web/ConfigSpec.hs | bsd-3-clause | 1,805 | 0 | 23 | 487 | 440 | 217 | 223 | 46 | 1 |
module GameWindow (
windowResolution
, windowPosition
, backgroundColor
, fps
, window
) where
import Graphics.Gloss
windowResolution :: (Int, Int)
windowResolution = (1280, 720)
windowPosition :: (Int, Int)
windowPosition = (10,10)
backgroundColor :: Color
backgroundColor = black
fps :: In... | stefanjanjic90/DroidThatYouAreLookingFor | GameWindow.hs | bsd-3-clause | 432 | 0 | 5 | 86 | 107 | 66 | 41 | 17 | 1 |
module Foundation where
import Prelude
import Yesod
import Yesod.Static
import Yesod.Auth
import Yesod.Auth.BrowserId
import Yesod.Auth.GoogleEmail
import Yesod.Default.Config
import Yesod.Default.Util (addStaticContentExternal)
import Network.HTTP.Conduit (Manager)
import qualified Settings
import Settings.Developmen... | mkrauskopf/ouch-web | Foundation.hs | bsd-3-clause | 6,586 | 0 | 17 | 1,426 | 907 | 499 | 408 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE TupleSections #-}
module Snap.Snaplet.CustomAuth.OAuth2.Internal
( oauth2Init
, saveAction
, redirectToProvider
) where
import Control.Error.Util hiding (err)
import Control... | kaol/snaplet-customauth | Snap/Snaplet/CustomAuth/OAuth2/Internal.hs | bsd-3-clause | 13,223 | 0 | 22 | 3,084 | 4,343 | 2,154 | 2,189 | -1 | -1 |
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE GADTSyntax #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE RecordWildCards #-}
module TwentyFortyEight
( Player
, getBoard
, moveDirection
, twentyFortyEight
) where
import Contro... | mitchellwrosen/hs2048-free | TwentyFortyEight.hs | bsd-3-clause | 1,855 | 1 | 15 | 494 | 507 | 261 | 246 | -1 | -1 |
module View (view) where
import System.Hclip (setClipboard)
import Util
import VaultData
tagPred :: String -> String -> Bool
tagPred tag =
if tag == ""
then const True
else (== tag)
filterTag :: [VaultEntry] -> String -> [VaultEntry]
filterTag entries tag =
let anyPred = tagPred tag
in ... | oahziur/yige-pass | src/View.hs | bsd-3-clause | 862 | 0 | 12 | 232 | 278 | 140 | 138 | 27 | 2 |
{-# LANGUAGE PatternGuards #-}
-- | Main executive for LambNyaa.
module Network.LambNyaa.Scheduler (schedule) where
import Control.Concurrent
import Control.Monad
import Data.Hashable
import Data.List
import qualified Database.SQLite.Simple as DB
import Network.LambNyaa.Config
import Network.LambNyaa.Item
import Networ... | valderman/lambnyaa | Network/LambNyaa/Scheduler.hs | bsd-3-clause | 2,471 | 0 | 15 | 526 | 770 | 382 | 388 | 57 | 5 |
{-# LANGUAGE CPP #-}
{- some output from log of "cabal test", three old modules fail, three new modules pass:
Test SampleVar
0: forkIO read thread 1
0: stop thread 1
1: read interrupted
0: write sv #1
0: write sv #2 with timeout
0: timeout triggered, write sv #2 blocked, FAIL
Test QSem
0: forkIO wait thread 1
0: sto... | ChrisKuklewicz/SafeSemaphore | tests/TestKillSem.hs | bsd-3-clause | 6,291 | 0 | 14 | 1,424 | 1,454 | 701 | 753 | 138 | 2 |
-- | Some types at top of expression type.
module Toy.Exp.Ext where
import qualified Data.Map as M
import Toy.Base (Var)
import Toy.Exp.Data (ExpRes)
type LocalVars = M.Map Var ExpRes
| Martoon-00/toy-compiler | src/Toy/Exp/Ext.hs | bsd-3-clause | 219 | 0 | 6 | 64 | 50 | 32 | 18 | 5 | 0 |
{-# LANGUAGE ForeignFunctionInterface, CPP #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.Raw.NV.PrimitiveRestart
-- Copyright : (c) Sven Panne 2013
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- S... | mfpi/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/NV/PrimitiveRestart.hs | bsd-3-clause | 1,645 | 0 | 10 | 185 | 156 | 103 | 53 | -1 | -1 |
bindM :: Maybe a -> (a -> Maybe b) -> Maybe b
Just x `bindM` f = f x
Nothing `bindM` _ = Nothing
retM :: a -> Maybe a
retM = Just
appM :: Maybe (a -> b) -> Maybe a -> Maybe b
Just f `appM` Just x = Just $ f x
_ `appM` _ = Nothing
pureM :: a -> Maybe a
pureM = Just
fappM :: Maybe a -> Maybe (a -> b) -> Maybe b
fappM... | YoshikuniJujo/funpaala | samples/34_applicative/applicative.hs | bsd-3-clause | 1,910 | 10 | 10 | 450 | 986 | 515 | 471 | 50 | 1 |
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Main where
import qualified Alerta.Golden as Golden
import qualified Alerta.Hedgehog as Hedgehog
import Test.Tasty (TestTree, defaultMain, testGroup)
import Test.Tasty.Hedgehog (testProperty)
main :: IO ()
main = do
defaultM... | mjhopkins/alerta-client | test/Spec.hs | bsd-3-clause | 436 | 0 | 11 | 102 | 95 | 56 | 39 | 11 | 1 |
{-# OPTIONS_GHC -Wall #-}
module Messages.Strings where
import Messages.Types
showFiles :: [FilePath] -> String
showFiles = unlines . map (" " ++)
showPromptMessage :: PromptMessage -> String
showPromptMessage (FilesWillBeOverwritten filePaths) =
unlines
[ "This will overwrite the following files t... | nukisman/elm-format-short | src/Messages/Strings.hs | bsd-3-clause | 1,869 | 0 | 11 | 400 | 260 | 140 | 120 | 38 | 1 |
module Main where
import Haskus.System.Input
import Haskus.System.Event
import Haskus.System.Sys
import Haskus.System.Terminal
import Haskus.System.Process
import Haskus.System.Linux.Handle
import Haskus.System.Linux.FileSystem
import Haskus.Utils.Flow
import qualified Haskus.Format.Binary.BitSet as BitSet
import Sys... | hsyl20/ViperVM | haskus-system-tools/src/keys/Main.hs | bsd-3-clause | 1,148 | 2 | 25 | 318 | 312 | 160 | 152 | 29 | 3 |
{-# LANGUAGE FlexibleContexts, RankNTypes, CPP #-}
module AWS.RDS.DBSnapshot
( describeDBSnapshots
, createDBSnapshot
, deleteDBSnapshot
, copyDBSnapshot
) where
import Data.Text (Text)
#if MIN_VERSION_conduit(1,1,0)
import Control.Monad.Trans.Resource (MonadThrow, MonadResource, MonadBaseControl)... | IanConnolly/aws-sdk-fork | AWS/RDS/DBSnapshot.hs | bsd-3-clause | 2,920 | 0 | 20 | 655 | 644 | 341 | 303 | 84 | 1 |
-- | Definition of a 'Reporter IO' which uses log-warper to gather logs and
-- uses the HTTP backend to send them to some server(s).
module Pos.Reporting.Production
( ProductionReporterParams (..)
, productionReporter
) where
import Universum
import Control.Exception.Safe (catchIO)
i... | input-output-hk/pos-haskell-prototype | lib/src/Pos/Reporting/Production.hs | mit | 1,722 | 0 | 12 | 412 | 343 | 197 | 146 | 45 | 1 |
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
-- | Methods of reporting different unhealthy behaviour to server.
module Pos.Core.Reporting.Methods
( Reporter (..)
, noReporter
, MonadReporting ... | input-output-hk/pos-haskell-prototype | core/src/Pos/Core/Reporting/Methods.hs | mit | 1,377 | 0 | 10 | 310 | 216 | 123 | 93 | 21 | 1 |
module Case1 where
main :: Int
main =
case [2,2] of
(1:y:ys) -> y + 3
(x:xs) -> 32
| roberth/uu-helium | test/correct/Case1.hs | gpl-3.0 | 108 | 0 | 10 | 44 | 58 | 33 | 25 | 6 | 2 |
module GameServerSpec where
import Control.Exception (bracket)
import Data.String (fromString)
import GameServer
import GameServer.Types
import Network.HTTP.Simple
import Network.HTTP.Types
import Test.Hspec
import GameServer.Log
wit... | abailly/hsgames | game-server/test/GameServerSpec.hs | apache-2.0 | 726 | 0 | 17 | 184 | 189 | 100 | 89 | -1 | -1 |
{-# LANGUAGE Rank2Types, FunctionalDependencies, TemplateHaskell, GeneralizedNewtypeDeriving #-}
module SecondTransfer.TLS.Types (
FinishRequest (..)
-- , ProtocolSelector
, TLSContext ... | shimmercat/second-transfer | hs-src/SecondTransfer/TLS/Types.hs | bsd-3-clause | 6,414 | 0 | 11 | 2,251 | 544 | 332 | 212 | -1 | -1 |
module Language.Haskell.Stylish.Tests.Util
( testStep
) where
--------------------------------------------------------------------------------
import Language.Haskell.Stylish.Parse
import Language.Haskell.Stylish.Step
----------------------------------------------------------------------... | silkapp/stylish-haskell | tests/Language/Haskell/Stylish/Tests/Util.hs | bsd-3-clause | 539 | 0 | 9 | 99 | 108 | 59 | 49 | 9 | 2 |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE Fun... | cchalmers/optical | src/Optical/Each.hs | bsd-3-clause | 3,883 | 0 | 10 | 689 | 978 | 560 | 418 | 82 | 1 |
{-# LANGUAGE ViewPatterns #-}
-- | Main entry point.
module Main where
import Ircbrowse.Config
import Ircbrowse.Model.Migrations
import Ircbrowse.Server
import Ircbrowse.Types
import Ircbrowse.Model.Data
import Ircbrowse.Import
import Snap.App
import Snap.App.Cache
import Snap.App.Migrate
import System.Environment
... | plow-technologies/ircbrowse | src/Main.hs | bsd-3-clause | 828 | 0 | 13 | 177 | 228 | 114 | 114 | 30 | 4 |
module Main where
import Control.Monad
import Language.Haskell.HLint (hlint)
import System.Directory
import System.Exit (exitFailure, exitSuccess)
import System.FilePath
import System.FilePath.Find
main :: IO ()
main = do
pwd <- getCurrentDirectory
let runHlint f = hlint $ f:
[ "--ignore=Redundant do"
... | reflex-frp/reflex | test/hlint.hs | bsd-3-clause | 1,189 | 0 | 17 | 332 | 273 | 147 | 126 | 34 | 2 |
module Tinc.GhcPkgSpec (spec) where
import Control.Monad
import System.Environment
import Helper
import Tinc.Facts
import Tinc.GhcPkg
import Tinc.Package
globalPackages :: [String]
globalPackages = [
"array"
, "base"
, "binary"
, "bytestring"
, ... | sol/tinc | test/Tinc/GhcPkgSpec.hs | mit | 985 | 0 | 14 | 267 | 220 | 132 | 88 | 46 | 1 |
module {{moduleName}}.Swallow (swallow) where
swallow :: String -> String -> String
swallow prefix suffix = prefix ++ suffix
| mankyKitty/holy-haskell-project-starter | scaffold/src/ModuleName/Swallow.hs | mit | 126 | 1 | 6 | 19 | 41 | 24 | 17 | -1 | -1 |
#if __GLASGOW_HASKELL__ >= 701
{-# LANGUAGE Trustworthy #-}
#endif
-----------------------------------------------------------------------------
-- |
-- Module : Graphics.Win32.GDI.Graphics2D
-- Copyright : (c) Alastair Reid, 1997-2003
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Mai... | jwiegley/ghc-release | libraries/Win32/Graphics/Win32/GDI/Graphics2D.hs | gpl-3.0 | 9,705 | 419 | 10 | 1,776 | 2,889 | 1,483 | 1,406 | -1 | -1 |
module Data.Tree.Extra where
import Prelude (Ordering, (.), map)
import Data.List (sortBy)
import Data.Tree (Forest, Tree(..))
sortTreeBy :: (Tree a -> Tree a -> Ordering) -> Tree a -> Tree a
sortTreeBy f (Node x xs) = Node x (sortForestBy f xs)
sortForestBy :: (Tree a -> Tree a -> Ordering) -> Forest a -> Forest a... | chreekat/snowdrift | Data/Tree/Extra.hs | agpl-3.0 | 418 | 0 | 9 | 82 | 204 | 106 | 98 | 10 | 1 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE AutoDeriveTypeable #-}
{-# LANGUAGE DeriveTraversable #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Functor.Identity
-- Copyright : (c) Andy Gill 2001,
-- (c) Oregon Graduate Institute of Science... | green-haskell/ghc | libraries/base/Data/Functor/Identity.hs | bsd-3-clause | 3,199 | 0 | 11 | 843 | 550 | 318 | 232 | 44 | 1 |
{-# LANGUAGE DeriveGeneric, StandaloneDeriving, BangPatterns #-}
module Main where
import qualified Data.ByteString.Lazy as L
import Distribution.PackageDescription
import Criterion.Main
import qualified Data.Binary as Binary
import Data.Binary.Get ... | x456/binary | benchmarks/GenericsBench.hs | bsd-3-clause | 1,439 | 0 | 13 | 394 | 429 | 228 | 201 | 39 | 2 |
module Stackage.Build
( build
, defaultBuildSettings
, BuildSettings (..)
) where
import Control.Monad (unless)
import Prelude hiding (pi)
import Stackage.CheckCabalVersion (checkCabalVersion)
import Stackage.Config
import ... | Tarrasch/stackage | Stackage/Build.hs | mit | 4,615 | 0 | 26 | 1,688 | 1,016 | 503 | 513 | 100 | 4 |
module Main where
import Files
main = do
cFiles <- allCFiles
putStrLn $ "C files:" ++ show cFiles
| juhp/stack | test/integration/tests/mutable-deps/files/app/Main.hs | bsd-3-clause | 104 | 0 | 8 | 24 | 33 | 17 | 16 | 5 | 1 |
{-# LANGUAGE StandaloneKindSignatures #-}
{-# LANGUAGE GADTs, PolyKinds, ExplicitForAll #-}
module SAKS_005 where
import Data.Kind (Type, Constraint)
type TypeRep :: forall k. k -> Type
data TypeRep a where
TyInt :: TypeRep Int
TyMaybe :: TypeRep Maybe
TyApp :: TypeRep a -> TypeRep b -> TypeRep (a b)
| sdiehl/ghc | testsuite/tests/saks/should_compile/saks005.hs | bsd-3-clause | 315 | 0 | 10 | 61 | 83 | 47 | 36 | -1 | -1 |
-- BANNERSTART
-- - Copyright 2006-2008, Galois, Inc.
-- - This software is distributed under a standard, three-clause BSD license.
-- - Please see the file LICENSE, distributed with this software, for specific
-- - terms and conditions.
-- Author: Adam Wick <awick@galois.com>
-- BANNEREND
--
import Control.Concurrent
... | thumphries/HaLVM | examples/Core/ExitTest/ExitTest.hs | bsd-3-clause | 848 | 0 | 7 | 134 | 148 | 71 | 77 | 23 | 1 |
{-
Copyright (C) 2014 Jesse Rosenthal <jrosenthal@jhu.edu>
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.
This program is dis... | gbataille/pandoc | src/Text/Pandoc/Readers/Docx/Lists.hs | gpl-2.0 | 8,062 | 0 | 20 | 1,867 | 2,499 | 1,341 | 1,158 | 159 | 4 |
-- from Jon Hill
module ShouldFail where
buglet = [ x | (x,y) <- buglet ]
| olsner/ghc | testsuite/tests/typecheck/should_fail/tcfail033.hs | bsd-3-clause | 75 | 0 | 8 | 17 | 27 | 17 | 10 | 2 | 1 |
-- !!! printing Floats; was a bug in hbc (reported by andy)
--
main = print ((fromIntegral (42 :: Int)) :: Float)
| wxwxwwxxx/ghc | testsuite/tests/numeric/should_run/arith006.hs | bsd-3-clause | 115 | 0 | 9 | 23 | 29 | 17 | 12 | 1 | 1 |
module TestPopulation where
import Data.AEq
import Control.Monad.Bayes.Class
import Control.Monad.Bayes.Enumerator
import Control.Monad.Bayes.Sampler
import Control.Monad.Bayes.Population as Population
import Sprinkler
weightedSampleSize :: MonadSample m => Population m a -> m Int
weightedSampleSize = fmap length . ... | adscib/monad-bayes | test/TestPopulation.hs | mit | 1,251 | 0 | 11 | 211 | 348 | 185 | 163 | 31 | 2 |
{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances #-}
module Syntax where
import Control.Monad
import NarrowingSearch
-- -----------------------
data Blk = BIEnv [GlobHyp]
| BICtx Context
| BIForm HNFormula
| BIUnifyForm [Int] HNFormula Env
| BIUnifyTy... | frelindb/agsyHOL | Syntax.hs | mit | 13,860 | 0 | 21 | 4,427 | 5,396 | 2,620 | 2,776 | 455 | 6 |
module TetrisAttack.Board.Combos (
handleCombos, gatherCombos
) where
--------------------------------------------------------------------------------
import Data.List (nub)
import TetrisAttack.Board.Types
import TetrisAttack.Constants
import TetrisAttack.Grid
import TetrisAttack.Tile
------------------------------... | Mokosha/HsTetrisAttack | TetrisAttack/Board/Combos.hs | mit | 3,529 | 0 | 17 | 969 | 1,187 | 654 | 533 | 58 | 6 |
module Atomo.Env where
import Atomo.Error
import Atomo.Internals
import Atomo.Primitive (primFuncs)
import Control.Monad.Error
import Data.IORef
import Data.Maybe (fromJust)
import Debug.Trace
type Scope = IORef [(Index, IORef AtomoVal)]
type Env = [Scope]
nullScope :: IO Scope
nullScope = newIORef []
nullEnv :: I... | vito/atomo-old | Atomo/Env.hs | mit | 5,524 | 0 | 22 | 2,218 | 2,072 | 1,013 | 1,059 | 108 | 6 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedLists #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE LambdaCase #-}
module Main (... | adnelson/semver-range | tests/Unit.hs | mit | 12,768 | 0 | 23 | 3,423 | 3,351 | 1,931 | 1,420 | 240 | 3 |
module Scripting.Fuligite.RunFile where
import qualified Scripting.Fuligite.DefaultState as DS
import Scripting.Fuligite.Expr (Expr(..), Object, ObjKey,
EvalMonad2, doEM)
import Scripting.Fuligite.Eval (eval, declareVar, lookupPath)
import Scripting.Fuligite.Literal (toString)
import Scriptin... | tomjefferys/fuligite | src/Scripting/Fuligite/RunFile.hs | mit | 2,473 | 0 | 21 | 731 | 790 | 408 | 382 | 62 | 4 |
module Graphics.Urho3D.Input.Events(
MouseButtonDown(..)
, MouseButtonUp(..)
, MouseMove(..)
, MouseWheel(..)
, EventKeyDown(..)
, EventKeyUp(..)
, EventTextInput(..)
, EventTextEditing(..)
, EventJoystickConnected(..)
, EventJoystickDisconnected(..)
, EventJoystickButtonDown(..)
, EventJoysti... | Teaspot-Studio/Urho3D-Haskell | src/Graphics/Urho3D/Input/Events.hs | mit | 17,617 | 0 | 12 | 3,417 | 3,525 | 1,934 | 1,591 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module BT.Mining where
import Network.Bitcoin (HashData, blockData, HashData, hdTarget, BTC)
import qualified Data.ByteString as B hiding (head)
import qualified Data.ByteString.Char8 as BC
import Prelude hiding (take, drop)
import Data.Text.Encoding as E
import BT.Types
import BT... | c00w/BitToll | haskell/BT/Mining.hs | mit | 5,983 | 1 | 14 | 1,036 | 1,780 | 880 | 900 | 106 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Monad
import Control.Monad.Except (MonadError (..))
import Data.Char
import Data.Foldable (fold)
import Data.Time.Format (TimeLocale (..), defaultTimeLocale, formatTime)
import ... | Tosainu/blog | src/Main.hs | mit | 10,398 | 0 | 29 | 2,665 | 2,425 | 1,169 | 1,256 | 213 | 2 |
-- Figurate Numbers #1 - Pentagonal Number
-- http://www.codewars.com/kata/55ab9eee6badbdaf72000075/
module Codewars.G964.Penta (pNum, gpNum, spNum) where
import Control.Arrow ((&&&))
f :: (Int -> [Int]) -> Int -> Bool
f g = uncurry (&&) . (uncurry (==) . (floor . ff &&& ceiling . ff) &&& any ((== 5) . (`mod` 6)) . ... | gafiatulin/codewars | src/6 kyu/Penta.hs | mit | 619 | 0 | 15 | 123 | 284 | 163 | 121 | -1 | -1 |
module Main where
import System.Environment
import System.IO
import Control.Monad
import Parser
import Evaluator
import Vals
flushStr :: String -> IO ()
flushStr str = putStr str >> hFlush stdout
readPrompt :: String -> IO String
readPrompt prompt = flushStr prompt >> getLine
evalString :: Env -> String -> IO Strin... | eligottlieb/chaitin | src/Main.hs | mit | 1,195 | 6 | 16 | 253 | 515 | 253 | 262 | 35 | 2 |
module Main where
import Data.Foldable (traverse_)
import System.Environment (getArgs)
data Q5 = Q5 Rational Rational deriving (Show)
instance Num Q5 where
(Q5 p1 q1) + (Q5 p2 q2) = Q5 (p1 + p2) (q1 + q2)
(Q5 p1 q1) * (Q5 p2 q2) = Q5 (p1 * p2 + 5 * q1 * q2) (p1 * q2 + p2 * q1)
negate (Q5 p q) = Q5 (-p) (-... | genos/Programming | workbench/Binet.hs | mit | 1,056 | 0 | 15 | 352 | 595 | 301 | 294 | 27 | 1 |
module Parser (parseExpr) where
import Text.Parsec
import Text.Parsec.String (Parser)
import Text.Parsec.Language (haskellStyle)
import qualified Text.Parsec.Expr as Ex
import qualified Text.Parsec.Token as Tok
type Id = String
data Expr
= Lam Id Expr
| App Expr Expr
| Var Id
| Num Int
| Op Binop Expr Ex... | riwsky/wiwinwlh | src/parser.hs | mit | 1,778 | 0 | 11 | 407 | 689 | 355 | 334 | 69 | 2 |
module Test1SpecWE where
import Test.Hspec
import Test.QuickCheck
import Control.Exception (evaluate)
main :: IO ()
main = hspec spec
spec::Spec
spec = do
describe "Prelude.head" $ do
it "returns the first element of a list" $ do
head [23 ..] `shouldBe` (23 :: Int)
it "returns the first element of another lis... | codeboardio/kali | test/src_examples/haskell/error_one_file/Root/Test/Test1SpecWE.hs | mit | 367 | 0 | 15 | 73 | 126 | 68 | 58 | 13 | 1 |
{-# LANGUAGE BangPatterns, DataKinds, DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Hadoop.Protos.ClientNamenodeProtocolProtos.SetTimesResponseProto (SetTimesResponseProto(..)) where
import Prelude ((+), (/))
import qualified Prelude as Prelude'
imp... | alexbiehl/hoop | hadoop-protos/src/Hadoop/Protos/ClientNamenodeProtocolProtos/SetTimesResponseProto.hs | mit | 2,861 | 1 | 16 | 531 | 554 | 291 | 263 | 53 | 0 |
-- Final Interpreters
-- Using typeclasses we can implement a final interpreter which models a set of extensible terms using functions bound to typeclasses rather than data constructors. Instances of the typeclass form interpreters over these terms.
-- For example we can write a small language that includes basic arit... | Airtnp/Freshman_Simple_Haskell_Lib | Intro/WIW/Interpreter/Final-interpreters.hs | mit | 1,574 | 0 | 9 | 370 | 430 | 228 | 202 | 41 | 1 |
module Control.Biegunka.BiegunkaSpec
( spec
) where
import Control.Exception (bracket)
import Data.Maybe (fromMaybe)
import System.Directory (getHomeDirectory)
import System.FilePath ((</>))
import qualified System.Posix as Posix
import Test.Hspec
import ... | biegunka/biegunka | test/spec/Control/Biegunka/BiegunkaSpec.hs | mit | 1,754 | 0 | 16 | 450 | 461 | 231 | 230 | 43 | 1 |
module ChordData where
import Data.Map
import Sound.ALSA.Sequencer.Event (Pitch, Channel)
type Interval = Int
-- Input chord which is represented by its list of intervals or symbolic shorthand.
-- Received chords are matched against the list of input chords to find the dispatch
-- rules. Additionally, an entry match... | dmgolubovsky/chordemux | src/ChordData.hs | mit | 1,436 | 0 | 9 | 340 | 192 | 120 | 72 | 21 | 1 |
module Colored where
import Colors
class Colored a where
getColor :: a -> ColorFG
| mrlovre/LMTetrys | src/Colored.hs | gpl-2.0 | 88 | 0 | 7 | 20 | 25 | 14 | 11 | 4 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module Text.Bristle where
-- Parse mustache(5) templates
--
-- Variable: {{name}}
-- - Search for key in current context, parent context recursively
-- - Nothing is rendered if key not found
-- - HTML is escaped
--
-- Variable: {{{name}}}
-- - Same as variable, but HTML is n... | sgillis/bristle | src/Text/Bristle.hs | gpl-2.0 | 3,165 | 0 | 14 | 811 | 827 | 423 | 404 | 59 | 2 |
{-# LANGUAGE NoImplicitPrelude, OverloadedStrings #-}
module Lamdu.Infer.Recursive
( inferEnv
) where
import Prelude.Compat
import qualified Lamdu.Expr.Val as V
import Lamdu.Infer (InferCtx, freshInferredVar)
import qualified Lamdu.Infer as Infer
import Lamdu.Infer.Internal.Scope... | da-x/Algorithm-W-Step-By-Step | Lamdu/Infer/Recursive.hs | gpl-3.0 | 689 | 0 | 10 | 163 | 147 | 85 | 62 | 17 | 1 |
module Mudblood.Colour
( parseColour
, colourToGdk
) where
import Data.Colour
import Data.Colour.SRGB
import Data.Colour.Names
import qualified Graphics.UI.Gtk as G
type MBColour = Colour Double
parseColour :: String -> Maybe MBColour
parseColour col@('#':rest) = Just $ sRGB24read col
parseColour col = r... | talanis85/mudblood | src/Mudblood/Colour.hs | gpl-3.0 | 521 | 0 | 10 | 106 | 180 | 96 | 84 | 14 | 1 |
module Board where
import qualified Data.Vector as V
type Location = (Int, Int)
data Shape = Square | Triangle | Hexagon
data Board = Board { minX :: Maybe Int ,
maxX :: Maybe Int ,
minY :: Maybe Int ,
maxY :: Maybe Int ,
minZ ::... | joshuaunderwood7/HaskeLinGeom | Board.hs | gpl-3.0 | 4,361 | 2 | 15 | 966 | 1,674 | 870 | 804 | 82 | 3 |
-- | Generic model wrapper.
module Biobase.SElab.Model.Types where
import Control.Lens
import Data.Text (Text)
import GHC.Generics (Generic)
import Biobase.Types.Accession
import Biobase.SElab.CM.Types (CM)
import Biobase.SElab.HMM.Types (HMM)
import qual... | choener/BiobaseInfernal | Biobase/SElab/Model/Types.hs | gpl-3.0 | 902 | 0 | 12 | 259 | 241 | 134 | 107 | 20 | 2 |
{-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module SecretSanta.CyclicArrangement
( CyclicArrangement
, selectCyclicArrangement
) where
import Control.Applicative ((<$>),(<*>),(<|>))
import Control.Arrow (second)
import Control.Monad.State
import Data.List (d... | recursion-ninja/SecretSanta | Constraint/CyclicArrangement.hs | gpl-3.0 | 5,223 | 0 | 14 | 1,249 | 1,165 | 630 | 535 | 85 | 3 |
{-# LANGUAGE BangPatterns, FlexibleContexts #-}
-- | kd-Tree data structure for building multi-dimensional, real-valued
-- indices.
--
-- /References/
--
-- (1) <http://en.wikipedia.org/wiki/Kdtree>
module Data.KDTree
( Tree
, empty
, fromList
, elems
, Distance
, sqrEuclidianDistance
, closest
, with... | kaoskorobase/mescaline | lib/mescaline/Data/KDTree.hs | gpl-3.0 | 6,328 | 0 | 16 | 2,095 | 2,166 | 1,138 | 1,028 | 121 | 5 |
module Monite.Test (
runTests
, runTest
, process
) where
import Monite.Interpret
import System.Process
import System.IO
import System.Exit (exitFailure)
import System.Directory (setCurrentDirectory, getDirectoryContents, removeFile)
import Control.Monad.IO.Class
import Control.Monad (foldM)
import Data.List ... | sebiva/monite | src/Monite/Test.hs | gpl-3.0 | 2,285 | 0 | 13 | 638 | 565 | 296 | 269 | 50 | 2 |
{-# OPTIONS_GHC -optc-DDBUS_API_SUBJECT_TO_CHANGE #-}
{-# LINE 1 "DBus/Connection.hsc" #-}
-- HDBus -- Haskell bindings for D-Bus.
{-# LINE 2 "DBus/Connection.hsc" #-}
-- Copyright (C) 2006 Evan Martin <martine@danga.com>
{-# LINE 5 "DBus/Connection.hsc" #-}
{-# LINE 6 "DBus/Connection.hsc" #-}
module DBus.Connecti... | hamaxx/unity-2d-for-xmonad | xmonad-files/DBus-0.4/dist/build/DBus/Connection.hs | gpl-3.0 | 8,651 | 0 | 21 | 1,958 | 1,808 | 927 | 881 | 159 | 4 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-autoscaler/gen/Network/Google/Resource/Autoscaler/Autoscalers/Get.hs | mpl-2.0 | 3,497 | 0 | 16 | 837 | 463 | 276 | 187 | 72 | 1 |
{-# LANGUAGE OverlappingInstances #-}
module Pkg.PParser where
import Text.Trifecta hiding (span, stringLiteral, charLiteral, natural, symbol, char, string, whiteSpace)
import Idris.Core.TT
import Idris.REPL
import Idris.AbsSyntaxTree
import Idris.ParseHelpers
import Paths_idris
import Control.Monad.State.Strict
i... | DanielWaterworth/Idris-dev | src/Pkg/PParser.hs | bsd-3-clause | 2,772 | 0 | 20 | 1,089 | 909 | 452 | 457 | 71 | 2 |
{-# LANGUAGE ScopedTypeVariables #-}
module Court.Builder
( builder
, buildNext
) where
import Control.Concurrent
import Control.Exception
import Control.Monad
import Data.List
import Data.Maybe
import Data.Time
import System.Directory
import System.FilePath
import System.IO
import System.Locale
import System... | thoferon/court | src/Court/Builder.hs | bsd-3-clause | 3,173 | 0 | 17 | 822 | 1,028 | 500 | 528 | 91 | 3 |
module System.HDFS.HDFSClient (
Config,
hdfsListFiles, Location(_path),
hdfsReadCompleteFile,
hdfsFileBlockLocations, hdfsFileDistribution,
hdfsWriteNewFile
) where
import Control.Exception (catch, SomeException)
import Data.Bool (bool)
import qualified Data.Int as I
import qualified Data.Text.Lazy as TL
i... | michaxm/haskell-hdfs-thrift-client | src/System/HDFS/HDFSClient.hs | bsd-3-clause | 6,235 | 0 | 15 | 1,029 | 1,605 | 850 | 755 | 99 | 3 |
module Problem147 where
main :: IO ()
main = print . sum $ [ count (x, y) | x <- [1 .. m], y <- [1 .. n] ]
where
m = 47
n = 43
sizes (m, n) = [ (x, y) | x <- [1 .. 2 * m], y <- [1 .. 2 * n], x + y <= 2 * min m n ]
count sz@(m, n) = countDiamonds sz + m * n * (m + 1) * (n + 1) `div` 4
countDiamonds sz = s... | adityagupta1089/Project-Euler-Haskell | src/problems/Problem147.hs | bsd-3-clause | 698 | 0 | 12 | 235 | 409 | 223 | 186 | 15 | 3 |
import Criterion.Main
--
import Data.Sound
import Data.Sound.WAVE hiding (ByteString)
test :: Sound
test = sine 3 1 100 0
main :: IO ()
main = defaultMain [
bgroup "Encoding"
[ bench "8 bits per sample" $ nf (\n -> encode $ fromSound n test) 8
, bench "16 bits per sample" $ nf (\n -> encode $ fromSoun... | Daniel-Diaz/wavy | bench/encoding.hs | bsd-3-clause | 422 | 0 | 14 | 111 | 165 | 86 | 79 | 11 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
-- | Server types and operations for items that don't involve server state
-- nor our custom monads.
module Game.LambdaHack.Server.ItemRev
( ItemRev, buildItem, newItem, UniqueSet
-- * Item discovery types
, DiscoveryKindRev, serverDiscos, ItemSeedDict
-- * The @F... | beni55/LambdaHack | Game/LambdaHack/Server/ItemRev.hs | bsd-3-clause | 7,187 | 0 | 18 | 1,807 | 2,023 | 1,093 | 930 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable, FlexibleContexts #-}
import qualified Language.Conversion.Dep2Con as Dep2Con
import qualified Language.Structure.Constituency as Con
import qualified Language.Structure.Dependency as Dep
import qualified Language.Structure.Dependency.Parse as Dep
import Syst... | pepijnkokke/Dep2Con | src/Dep2Con.hs | bsd-3-clause | 1,446 | 0 | 13 | 363 | 318 | 177 | 141 | 37 | 4 |
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Main where
import Control.Exception (evaluate)
import Control.Monad.IO.Class
import Data.Aeson
import qualified Data.ByteString as B
import qualified Data.ByteString.Char8 as C hiding (length, map)
import qualified Data.CaseInsensitive a... | anchor/haskell-netsuite | tests/UnitTests.hs | bsd-3-clause | 8,650 | 0 | 19 | 2,605 | 2,006 | 1,076 | 930 | 143 | 2 |
module ComplexSpec (main, spec) where
import Test.Hspec
import Test.QuickCheck
import Control.Exception (evaluate)
import Data.Maybe
import qualified Data.Aeson as A
import Complex
import qualified Data.ByteString.Lazy.Char8 as L
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "Complex" $ do
i... | balopat/quantum-computing | test/ComplexSpec.hs | bsd-3-clause | 559 | 0 | 17 | 114 | 195 | 105 | 90 | 17 | 1 |
-- FIXME: Should probably be merged with the Barcode module.
module Math.PersistentHomology.Bar where
import Math.Misc.PlusInfinity
import qualified Math.VectorSpaces.Metric2 as Met
-- | A bar in a barcode. Construct with 'bar'.
data Bar a = C a (PlusInfinity a)
deriving (Eq)
-- | 'bar @l u@' constructs... | michiexile/hplex | pershom/src/Math/PersistentHomology/Bar.hs | bsd-3-clause | 1,851 | 0 | 10 | 422 | 922 | 463 | 459 | 34 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Dropbox.Conflict where
import FileConflict
import qualified Dropbox.FileNameParser as P
import Data.Monoid ((<>))
parse :: ConflictParser
parse baseName =
case P.parse baseName of
Just (P.FileInfo realBaseName host date) ->
Just (realBaseName, "Version "... | dan-t/confsolve | Dropbox/Conflict.hs | bsd-3-clause | 378 | 0 | 12 | 81 | 100 | 56 | 44 | 11 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.