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 TypeOperators, OverloadedStrings, ScopedTypeVariables #-}
module Main where
import Control.Monad
import Control.Exception
import Data.Maybe (isJust, isNothing, fromMaybe)
import Data.List (isInfixOf, intercalate)
import Data.List.Split (splitOn)
import Data.Char (toLower)
import Data.Monoid
import Syst... | megantti/rtorrent-cli | Main.hs | mit | 7,653 | 0 | 18 | 2,564 | 2,410 | 1,211 | 1,199 | 201 | 9 |
module ReverseList.ReverseRecursively where
revR :: [Int] -> [Int]
revR [] = []
revR [x] = [x]
revR (x:xs) = revR xs ++ x : [] | cojoj/Codewars | Haskell/Codewars.hsproj/ReverseList/ReverseRecursively.hs | mit | 131 | 0 | 7 | 29 | 75 | 41 | 34 | 5 | 1 |
module Text.Pandoc.CrossRef.Util.Options (Options(..)) where
import Text.Pandoc.Definition
import Text.Pandoc.CrossRef.Util.Template
data Options = Options { cref :: Bool
, chaptersDepth :: Int
, listings :: Bool
, codeBlockCaptions :: Bool
... | infotroph/pandoc-crossref | lib/Text/Pandoc/CrossRef/Util/Options.hs | gpl-2.0 | 1,810 | 0 | 11 | 906 | 317 | 202 | 115 | 34 | 0 |
{- |
Module : ./GUI/GtkAddSentence.hs
Description : Gtk GUI for adding a sentence
Copyright : (c) C. Maeder DFKI GmbH 2010
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Christian.Maeder@dfki.de
Stability : provisional
Portability : non-portable (imports existential types)
This module pr... | gnn/Hets | GUI/GtkAddSentence.hs | gpl-2.0 | 2,383 | 0 | 14 | 495 | 662 | 319 | 343 | 51 | 2 |
---------------------------------------------------------------------
-- File: Parse.hs
-- Author: Drahoslav Zan
-- Date: Jun 01 2012
-- Project: Symbolic Expression Formating in ASCII (SEFA)
---------------------------------------------------------------------
-- Copyright (C) 2012 Drahoslav Zan... | drahoslavzan/PrettyExpression | Parse.hs | gpl-3.0 | 2,332 | 6 | 12 | 423 | 438 | 242 | 196 | 34 | 2 |
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
module System.UtilsBoxSpec.CoreTypes where
data (f :+: g) e = Inl (f e) | Inr (g e)
infixr 6 :+:
instance (Functor f, Functor g) => Functor (f :+: g) where
fmap f (Inl x) = ... | changlinli/utilsbox | System/UtilsBoxSpec/CoreTypes.hs | gpl-3.0 | 699 | 4 | 11 | 167 | 272 | 146 | 126 | 18 | 0 |
{-
This file is part of TAE.
TAE 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 3 of the License, or
(at your option) any later version.
TAE is distributed in the hope that it will be useful,
but... | cdettmering/tae | IO.hs | gpl-3.0 | 1,482 | 0 | 8 | 282 | 327 | 171 | 156 | 17 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Services/Versions/Get.hs | mpl-2.0 | 6,532 | 0 | 21 | 1,516 | 947 | 551 | 396 | 140 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-oauth2/gen/Network/Google/Method/OAuth2/TokenInfo.hs | mpl-2.0 | 2,586 | 0 | 13 | 582 | 379 | 224 | 155 | 55 | 1 |
module Handler.Home where
import Handler.Ratings
import Import
import Forms
import Data.CountryCodes
import Data.Double.Conversion.Text
import Yesod.Form.Bootstrap3
getHomeR :: Handler Html
getHomeR = do
mauth <- maybeAuth
whatDo <- case mauth of
Nothing -> return pleaseLoginW
Just userEnt -> do
... | enolan/emp-pl-site | Handler/Home.hs | agpl-3.0 | 5,719 | 0 | 20 | 1,535 | 952 | 513 | 439 | -1 | -1 |
showVal :: LispVal -> String
showVal (String contents) = "\"" ++ contents ++ "\""
showVal (Atom name) = name
showVal (Number contents) = show contents
showVal (Bool True) = "#t"
showVal (Bool False) = "#f"
showVal (List contents) = "(" ++ unwordsList contents ++ ")"
showVal (DottedList head tail) = "(" ++ unwordsList h... | chenchenhz/first_haskell | haskell_parser_tutorial/interpreter.hs | agpl-3.0 | 472 | 0 | 9 | 83 | 191 | 95 | 96 | 11 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE FlexibleContexts #-}
{-# OPTIONS_GHC -Wno-unused-top-binds #-}
-- A number of standard aggregation functions.
module Spark.Core.Internal.Groups(
GroupData,
LogicalGroupData,
-- Typed functions
grou... | tjhunter/karps | haskell/src/Spark/Core/Internal/Groups.hs | apache-2.0 | 8,719 | 1 | 14 | 1,718 | 2,284 | 1,208 | 1,076 | 158 | 3 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
-- The communication protocol with the server
module Spark.Core.Internal.Client where
import Data.Text(Text)
import Lens.Family2((^.), (&), (.~))
import Data.Default(def)
import Spark.Core.StructuresInternal
... | tjhunter/karps | haskell/src/Spark/Core/Internal/Client.hs | apache-2.0 | 3,704 | 0 | 17 | 637 | 870 | 490 | 380 | 117 | 0 |
import System.Environment (getArgs)
import Data.Binary (decodeFile)
import Data.Guesser
import SGD
main = do
[guesserPath, tagset, inPath] <- getArgs
guesser <- decodeFile guesserPath
tagFile 10 guesser tagset inPath
| kawu/crf-guesser | examples/Guess.hs | bsd-2-clause | 231 | 0 | 8 | 41 | 72 | 38 | 34 | 8 | 1 |
{-# LANGUAGE TypeOperators, TypeFamilies, FlexibleContexts, ExplicitForAll, ScopedTypeVariables #-}
module Windows where
import CLaSH.Prelude
import qualified Data.List as L
type Elm = Unsigned 16
type Temp = Signed 32
vrotate xs = tail xs <: head xs
windowsI :: (KnownNat (n + 1), ((m + n) + 1) ~ ((m + 1) + n))
... | christiaanb/clash-compiler | examples/Windows.hs | bsd-2-clause | 1,979 | 0 | 15 | 614 | 1,091 | 572 | 519 | -1 | -1 |
import Lseed.Data
import Lseed.Data.Functions
import Lseed.Grammar.Parse
import Lseed.Constants
import Lseed.Mainloop
import Control.Monad
import Debug.Trace
import System.Environment
import System.Time
import System.Random
import Lseed.Renderer.Cairo
import Data.Maybe
import Graphics.Rendering.Cairo
main = do
args <... | nomeata/L-seed | src/renderAsPNG.hs | bsd-3-clause | 986 | 1 | 25 | 251 | 305 | 149 | 156 | 33 | 2 |
module Sexy.Instances.Functor.Either () where
import Sexy.Classes (Functor(..))
import Sexy.Data (Either(..))
instance Functor (Either a) where
-- (<$>) :: (b -> c) -> Either a b -> Either a c
_ <$> (Left x) = Left x
f <$> (Right x) = Right (f x)
| DanBurton/sexy | src/Sexy/Instances/Functor/Either.hs | bsd-3-clause | 255 | 0 | 8 | 52 | 100 | 55 | 45 | 6 | 0 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
module Test.Mismi.EC2.Data where
import Mismi.EC2.Data
import P
import Test.Mismi.EC2.Core.Arbitrary ()
import Test.QuickChec... | ambiata/mismi | mismi-ec2/test/Test/Mismi/EC2/Data.hs | bsd-3-clause | 576 | 0 | 8 | 111 | 114 | 63 | 51 | 17 | 1 |
module Genetic.ScoreScaling where
import Genetic.Core
import Data.Vector (Vector)
import qualified Data.Vector as V
import qualified Data.Vector.Algorithms.Tim as VA
import Control.Monad
import Control.Monad.ST
import Control.Arrow
import Data.Function
import Prelude hiding (length)
sclIdentity :: Monad m => Gener... | cikusa/genetic | Genetic/ScoreScaling.hs | bsd-3-clause | 1,526 | 0 | 15 | 314 | 614 | 325 | 289 | -1 | -1 |
{-# LANGUAGE FlexibleInstances, OverloadedStrings, RankNTypes #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Kraken.Daemon where
import Data.Aeson
import Network.HTTP.Types
import Network.Wai
import Network.Wai.Handler.Warp.Run
import Network.Wai.UrlMap
import ... | zalora/kraken | src/Kraken/Daemon.hs | bsd-3-clause | 999 | 0 | 12 | 196 | 247 | 133 | 114 | 23 | 1 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module Control.Monad.Codec
( CodecFor(..)
, Codec
, (=.)
, fmapArg
) where
import Data.Profunctor
-- | A serializer/deserializer pair ... | chpatrick/codec | src/Control/Monad/Codec.hs | bsd-3-clause | 1,624 | 0 | 13 | 409 | 533 | 289 | 244 | 36 | 1 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
{-|
Module : Numeric.ER.RnToRm.UnitDom.ChebyshevBase.Polynom
Description : multivariate polynomials in the Chebyshev basis
Copyright : (c) 2007-2008 Michal Konecny
License : BS... | michalkonecny/polypaver | src/Numeric/ER/RnToRm/UnitDom/ChebyshevBase/Polynom.hs | bsd-3-clause | 9,574 | 70 | 16 | 2,029 | 2,538 | 1,399 | 1,139 | -1 | -1 |
{-# LANGUAGE Arrows #-}
import Control.Arrow
import qualified Control.Arrow.Machine as P
import Control.Arrow.Transformer.Reader (ReaderArrow, elimReader)
import Control.Monad.Reader (ReaderT, ask)
import Control.Monad.Trans (lift)
import Control.Lens
mainPlan = P.constructT (^. P.uc0 . P.rd P.kl) $
do
P.await... | as-capabl/machinecell | example/reader/reader.hs | bsd-3-clause | 1,088 | 1 | 13 | 314 | 537 | 276 | 261 | 38 | 1 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.GL.Texturing.Queries
-- Copyright : (c) Sven Panne 2002-2013
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability : portab... | hesiod/OpenGL | src/Graphics/Rendering/OpenGL/GL/Texturing/Queries.hs | bsd-3-clause | 6,603 | 0 | 11 | 990 | 1,148 | 608 | 540 | 124 | 16 |
module Foreign.Storable.Complex () where
| RyanGlScott/storable-complex | in-base/Foreign/Storable/Complex.hs | bsd-3-clause | 41 | 0 | 3 | 4 | 10 | 7 | 3 | 1 | 0 |
{-# LANGUAGE MultiParamTypeClasses, PatternGuards, TypeSynonymInstances #-}
{- |
Module : XMonad.Layout.TrackFloating
Copyright : (c) 2010 & 2013 Adam Vogt
2011 Willem Vanlint
License : BSD-style (see xmonad/LICENSE)
Maintainer : vogt.adam@gmail.com
Stability : unstable
Portability :... | jthornber/XMonadContrib | XMonad/Layout/TrackFloating.hs | bsd-3-clause | 5,653 | 0 | 23 | 1,542 | 1,079 | 560 | 519 | 73 | 2 |
{-# LANGUAGE DeriveDataTypeable #-}
module PolyPaver.Args
(
Args,
PolyPaver(..),
Order(..),
paverDefaultArgs,
setDefaults,
checkArgs
)
where
import System.Console.CmdArgs hiding (args)
import qualified System.Console.CmdArgs as Args
--import Data.Typeable
--import Data.Data
--import D... | michalkonecny/polypaver | src/PolyPaver/Args.hs | bsd-3-clause | 6,326 | 0 | 17 | 1,735 | 845 | 480 | 365 | 92 | 3 |
{-# LANGUAGE TemplateHaskell #-}
module SyntaxHighlighting.Coloring(FullColoring, parseColoringFile, getProperty, definedStyles, intAsColor, colorDistance, highestComponent) where
{- Defines rendering properties for styles -}
import Utils.Utils
import Utils.ToString
import Utils.Image
import qualified Assets
impor... | pietervdvn/ALGT | src/SyntaxHighlighting/Coloring.hs | bsd-3-clause | 3,666 | 120 | 15 | 672 | 1,424 | 749 | 675 | 86 | 1 |
-- c-repl: a C read-eval-print loop.
-- Copyright (C) 2008 Evan Martin <martine@danga.com>
module CodeSnippet (
CodeSnippet(..),
parse,
runTests
) where
import Control.Monad.Error
import Data.Char
import Data.List
import Test.HUnit
import Text.ParserCombinators.Parsec hiding (parse)
import qualified Text.Parser... | LeifW/c-repl | CodeSnippet.hs | bsd-3-clause | 3,735 | 0 | 18 | 978 | 1,246 | 634 | 612 | 85 | 9 |
import KMC.Kleenex.Lang
import KMC.Util.Heredoc
import KMC.RangeSet
import Data.Word
import Debug.Trace
import KMC.Visualization
import KMC.SSTConstruction hiding (Var)
import KMC.FSTConstruction
s1 :: String
s1 = [strQ|
main := (~aaa | aa)*
aaa := /aaa/ "bcd"
aa := /aa/ "de"
|]
s2 :: Str... | diku-kmc/repg | test/Tests/FSTConstruction.hs | mit | 1,789 | 0 | 9 | 362 | 696 | 363 | 333 | -1 | -1 |
module Game.Board where
data Player = First
| Second
deriving (Eq)
nextPlayer :: Player -> Player
nextPlayer p = if p == First then Second else First
class Board b where
-- these first three functions are technically
-- all that is necessary to use MCTS:
gameOver :: b -> Bool
... | rudyardrichter/MCTS | old/source/Game/Board.hs | mit | 493 | 0 | 8 | 154 | 115 | 65 | 50 | 12 | 2 |
module Code.Nonprefix where
import Code.Formal
import Challenger.Partial
import Inter.Types
import Autolib.Reporter
import Autolib.Set
import Autolib.ToDoc
import Data.Typeable
data Nonprefix = Nonprefix deriving ( Read, Show, Typeable )
instance OrderScore Nonprefix where
scoringOrder _ = Increasing
instanc... | florianpilz/autotool | src/Code/Nonprefix.hs | gpl-2.0 | 1,722 | 10 | 24 | 450 | 548 | 266 | 282 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | kim/amazonka | amazonka-cognito-identity/gen/Network/AWS/CognitoIdentity/GetCredentialsForIdentity.hs | mpl-2.0 | 4,969 | 0 | 11 | 960 | 597 | 358 | 239 | 68 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- Module : Test.AWS.DataPipeline.Internal
-- Copyright : (c) 2013-2015 Brendan Hay
-- License : This Source Code Form is subject to the terms of
-- the Mozilla Public License, v. 2.0.
-- A copy of th... | olorin/amazonka | amazonka-datapipeline/test/Test/AWS/DataPipeline/Internal.hs | mpl-2.0 | 631 | 0 | 4 | 140 | 25 | 21 | 4 | 4 | 0 |
{-# LANGUAGE CPP, ScopedTypeVariables #-}
module Propellor.Exception where
import Propellor.Types
import Propellor.Types.Exception
import Propellor.Message
import Utility.Exception
import Control.Exception (AsyncException)
#if MIN_VERSION_base(4,7,0)
import Control.Exception (SomeAsyncException)
#endif
import Contro... | ArchiveTeam/glowing-computing-machine | src/Propellor/Exception.hs | bsd-2-clause | 1,307 | 4 | 11 | 190 | 367 | 200 | 167 | 20 | 1 |
import Control.Concurrent
import qualified Control.Concurrent.Chan as Chan
import Control.Exception
import Control.Monad
import Data.Functor
import Data.List.Extra
import Data.Time
import Data.IORef
import Prelude hiding (catch)
import Paths
import qualified Graphics.UI.Threepenny as UI
import Graphics.UI.Threepenny.... | yuvallanger/threepenny-gui | samples/Chat.hs | bsd-3-clause | 3,226 | 0 | 19 | 870 | 973 | 486 | 487 | 76 | 1 |
{-# LANGUAGE MultiParamTypeClasses
, FlexibleInstances
, UndecidableInstances
, DeriveDataTypeable
#-}
module Numeric.Coalgebra.Incidence
( Interval'(..)
, zeta'
, moebius'
) where
import Data.Data
import Numeric.Algebra.Class
import Numeric.Algebra.Unital
import Nu... | athanclark/algebra | src/Numeric/Coalgebra/Incidence.hs | bsd-3-clause | 1,040 | 0 | 9 | 214 | 342 | 181 | 161 | 25 | 1 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
Desugaring arrow commands
-}
{-# LANGUAGE CPP #-}
module DsArrows ( dsProcExpr ) where
#include "HsVersions.h"
import Match
import DsUtils
import DsMonad
import HsSyn hiding (collectPatBinders, collectPatsBinders, ... | elieux/ghc | compiler/deSugar/DsArrows.hs | bsd-3-clause | 45,720 | 0 | 23 | 13,556 | 9,522 | 4,907 | 4,615 | 700 | 19 |
-- | 'Strive.Actions.Kudos'
module Strive.Options.Kudos
( GetActivityKudoersOptions
) where
import Strive.Internal.Options (PaginationOptions)
-- | 'Strive.Actions.getActivityKudoers'
type GetActivityKudoersOptions = PaginationOptions
| tfausak/strive | source/library/Strive/Options/Kudos.hs | mit | 241 | 0 | 5 | 25 | 31 | 21 | 10 | 4 | 0 |
module Lisp.Builtins where
import Control.Lens
import Control.Monad.Trans (liftIO)
import qualified Data.Map as M
import qualified Data.Set as S
import Lisp.Evaluator
import Lisp.Parser
import Lisp.Printer
import Lisp.Reader
import Lisp.Types
dSum :: [Double] -> Double
dSum = sum
plus :: LispFunction
plus = liftFunc... | michaelochurch/summer-2015-haskell-class | Lisp/Builtins.hs | mit | 6,668 | 0 | 14 | 2,028 | 2,160 | 1,139 | 1,021 | -1 | -1 |
{-# LANGUAGE Haskell2010 #-}
{-# LINE 1 "Data/Array/Storable.hs" #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Array.Storable
-- Copyright : (c) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maint... | phischu/fragnix | tests/packages/scotty/Data.Array.Storable.hs | bsd-3-clause | 1,638 | 0 | 5 | 324 | 71 | 59 | 12 | 9 | 0 |
{-# LANGUAGE DeriveDataTypeable, TypeFamilies, TemplateHaskell #-}
module Distribution.Server.Features.PreferredVersions.State where
import Distribution.Server.Framework.Instances ()
import Distribution.Server.Framework.MemSize
import Distribution.Package
import Distribution.Version
import Data.Acid (Query, Update... | mpickering/hackage-server | Distribution/Server/Features/PreferredVersions/State.hs | bsd-3-clause | 9,614 | 0 | 14 | 1,832 | 2,214 | 1,196 | 1,018 | 131 | 17 |
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="sr-SP">
<title>Retire.js Add-on</title>
<maps>
<homeID>retire</homeID>
<mapref location... | thc202/zap-extensions | addOns/retire/src/main/javahelp/org/zaproxy/addon/retire/resources/help_sr_SP/helpset_sr_SP.hs | apache-2.0 | 964 | 77 | 67 | 156 | 413 | 209 | 204 | -1 | -1 |
{-# LANGUAGE TypeFamilies, FlexibleContexts #-}
-- Results in context reduction stack overflow
module Class1 where
import Data.Kind (Type)
class C a where
foo :: a x -> a y
class C (T a) => D a where
type T a :: Type -> Type
bar :: a -> T a x -> T a y
instance C Maybe where
foo Nothing = Nothing
instanc... | sdiehl/ghc | testsuite/tests/indexed-types/should_compile/Class1.hs | bsd-3-clause | 372 | 0 | 9 | 99 | 146 | 75 | 71 | -1 | -1 |
-- !!! Testing Int and Word
module Main(main) where
import Data.Int
import Data.Word
import Data.Bits
import Data.Ix -- added SOF
import Control.Exception
main :: IO ()
main = test
test :: IO ()
test = do
testIntlike "Int" (0::Int)
testIntlike "Int8" (0::Int8)
testIntlike "Int16" (0::Int16)
testIntl... | holzensp/ghc | testsuite/tests/numeric/should_run/arith011.hs | bsd-3-clause | 5,451 | 14 | 17 | 1,532 | 2,160 | 1,061 | 1,099 | 143 | 2 |
module Data.NGH.PSSM
( scan
) where
import qualified Data.Map as M
type Probability = Float
type AACid = Char
type Seq = String
type PSSM = [M.Map AACid Probability]
score_here :: PSSM -> Seq -> Maybe Probability
score_here [] _ = Just 0.0
score_here _ [] = Nothing
score_here (p:ps) (a:as) = do
rest <- sc... | luispedro/NGH | Data/NGH/PSSM.hs | mit | 545 | 0 | 12 | 128 | 238 | 125 | 113 | 18 | 2 |
-- PaginationHelper
-- http://www.codewars.com/kata/515bb423de843ea99400000a/
{-
Random test for pageIndex is broken:
should work for random collections and ipp values
Falsifiable (after 2 tests and 1 shrink):
expected: Just 0
but got: Nothing
[0]
Positive {getPositive = 1}
-1
-}
module Codewar... | gafiatulin/codewars | src/5 kyu/Pagination.hs | mit | 1,100 | 0 | 13 | 321 | 293 | 149 | 144 | 16 | 3 |
module Arm.ArmType (
instructionBlockOffset
)
where
import Arm.Internal.Type
import Data.Int (Int64)
-- | Return the offsset of the arm instruction inside the section
instructionBlockOffset :: ArmInstr -> Int64
instructionBlockOffset = blockOffset
| mathk/arm-isa | Arm/ArmType.hs | mit | 269 | 0 | 5 | 52 | 42 | 26 | 16 | 6 | 1 |
{-# LANGUAGE CPP #-}
-- |
-- Vanilla thread management in Haskell is low level and
-- it does not approach the problems related to thread deaths.
-- When it's used naively the following typical problems arise:
--
-- * When a forked thread dies due to an uncaught exception,
-- the exception does not get raised in the ma... | nikita-volkov/slave-thread | library/SlaveThread.hs | mit | 8,521 | 0 | 24 | 1,605 | 909 | 514 | 395 | -1 | -1 |
{-|
Module : Variable
Copyright : (c) Stéphane Vialette, 2015
License : MIT
Maintainer : vialette@gmail.com
Stability : experimental
-}
module PPOL.Sat.Variable
(
-- Variable data type
Variable(..)
)
where
-- | 'Variable' type
data Variable a = Variable a deriving (Show, Eq, Ord)
| vialette/PPOL | src/PPOL/Sat/Variable.hs | mit | 301 | 0 | 6 | 63 | 44 | 28 | 16 | 4 | 0 |
-- Copyright (c) 2016-present, SoundCloud Ltd.
-- All rights reserved.
--
-- This source code is distributed under the terms of a MIT license,
-- found in the LICENSE file.
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TemplateHaskell #-}
module Kubern... | soundcloud/haskell-kubernetes | lib/Kubernetes/Model/V1/ResourceQuotaList.hs | mit | 2,128 | 0 | 14 | 742 | 351 | 210 | 141 | 43 | 1 |
-- This is the module where an end user writes the actual domain specific analysis.
{-# LANGUAGE OverloadedStrings #-}
module Skel.Pharma.UserAnalysis (userAnalysis) where
import qualified Data.Conduit.List as CL
import Data.Semigroup
import Data.Text (pack)
import Skel.Pharma.UserModel
... | teuffy/min-var-ci | src/Skel/Pharma/UserAnalysis.hs | mit | 882 | 0 | 10 | 162 | 130 | 76 | 54 | 10 | 1 |
module Language.FOmega.Derivation where
import Language.FOmega.Syntax hiding (
star, box, lam, pi, app, var, (==>)
)
import qualified Language.FOmega.Syntax as S
import Prelude hiding (pi)
import Control.Monad.Reader
import Control.Monad.Trans.Except
import Control.Applicative
import System.IO.Unsafe
-- type de... | 8l/asif | src/Language/FOmega/Derivation.hs | mit | 9,751 | 0 | 22 | 3,732 | 4,560 | 2,182 | 2,378 | 256 | 10 |
module Main (main) where
import Control.Applicative
import Control.Monad
import Data.Version (showVersion)
import System.Console.CmdTheLine
import System.FilePath ((<.>))
import System.Exit (exitSuccess, exitFailure)
import Text.Parsec (ParseError)
import Language.PureScript.Lua.Options
import Language.PureScript.... | osa1/psc-lua | psc-lua/Main.hs | mit | 3,093 | 0 | 21 | 615 | 1,013 | 536 | 477 | 75 | 3 |
{-# LANGUAGE BangPatterns, DataKinds, DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Hadoop.Protos.ClientDatanodeProtocolProtos.ListReconfigurablePropertiesRequestProto
(ListReconfigurablePropertiesRequestProto(..)) where
import Prelude ((+), ... | alexbiehl/hoop | hadoop-protos/src/Hadoop/Protos/ClientDatanodeProtocolProtos/ListReconfigurablePropertiesRequestProto.hs | mit | 3,308 | 1 | 16 | 560 | 554 | 291 | 263 | 55 | 0 |
module Kafka.Internal
( module Kafka.Internal.Request
, module Kafka.Internal.Response
, module Kafka.Internal.Transport
, module Kafka.Internal.Types
) where
import Kafka.Internal.Request
import Kafka.Internal.Response
import Kafka.Internal.Transport
import Kafka.Internal.Types
| abhinav/kafka-client | src/Kafka/Internal.hs | mit | 301 | 0 | 5 | 45 | 60 | 41 | 19 | 9 | 0 |
-- Problems/Problem030.hs
module Problems.Problem030 (p30) where
import Helpers.Numbers
main = print p30
p30 :: Int
p30 = sum $ filter (\x -> x == sumOfFifthPowerDigits x) [10..999999]
sumOfFifthPowerDigits :: Int -> Int
sumOfFifthPowerDigits num = sum $ map (\x -> floor $ (fromIntegral x) ** (fromIntegral 5)) $ in... | Sgoettschkes/learning | haskell/ProjectEuler/src/Problems/Problem030.hs | mit | 335 | 0 | 13 | 55 | 123 | 66 | 57 | 7 | 1 |
module Language.Plover.Generics where
import Control.Monad.Free
import Data.Monoid
import qualified Data.Foldable as F (Foldable, fold)
import Language.Plover.Types
visitAny :: (Functor f, F.Foldable f) => (Free f Any -> Bool) -> Free f a -> Bool
visitAny f x =
let Any result = visitMon (\t -> if f t then Pure (Any... | imh/plover | src/Language/Plover/Generics.hs | mit | 1,203 | 0 | 15 | 333 | 696 | 346 | 350 | 31 | 2 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
-----------------------------------------------------------------------------
-- |
-- Module holding types shared by consumer and producer modu... | haskell-works/kafka-client | src/Kafka/Types.hs | mit | 5,371 | 0 | 9 | 1,015 | 979 | 587 | 392 | 107 | 12 |
{-# LANGUAGE OverloadedStrings, RecordWildCards #-}
module Main where
import Text.XML.HXT.Core
main = do
s <- getContents
print s
| danchoi/bshxt | Main.hs | mit | 141 | 0 | 7 | 29 | 30 | 17 | 13 | 6 | 1 |
import System.Environment(getArgs)
type Speed = Float
type Dir = (Float, Float)
type Point = (Float, Float)
type TimeStamp = Float
type TimeIncrement = Float
type Distance = Float
data Ship = Ship {
position :: Point,
direction :: Dir,
speed :: Speed
} deriving (Show)
data World = World {
firstShip :: Ship... | mihaimaruseac/blog-demos | ships/ships.hs | mit | 2,338 | 0 | 12 | 558 | 1,109 | 577 | 532 | 67 | 1 |
-- Filter Coffee
-- http://www.codewars.com/kata/56069d0c4af7f633910000d3/
module Codewars.G964.FilterCoffee where
import Data.List (intercalate, sort)
search :: Int -> [Int] -> String
search budget = intercalate "," . map show . sort . filter (<= budget)
| gafiatulin/codewars | src/7 kyu/FilterCoffee.hs | mit | 259 | 0 | 8 | 36 | 71 | 40 | 31 | 4 | 1 |
{-# OPTIONS_HADDOCK show-extensions #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-|
Module ... | brunjlar/neural | src/Data/FixedSize/Matrix.hs | mit | 2,750 | 0 | 14 | 588 | 651 | 367 | 284 | 37 | 1 |
-- |
-- Module : False.Targets.C
-- Copyright : Joe Jevnik
--
-- License : GPL-2
-- Maintainer : joejev@gmail.org
-- Stability : stable
-- Portability : GHC
--
-- PNodes to C
{-
Program structure:
C89 is the target.
The stack is stored in a structure called f_stack.
All the operators are function that ... | llllllllll/false | False/Targets/C.hs | gpl-2.0 | 3,013 | 0 | 11 | 790 | 838 | 456 | 382 | 65 | 1 |
{-
Given: A string s of length at most 200 letters and four integers a, b, c and d.
Return: The slice of this string from indices a through b and c through d (with space in between), inclusively.
-}
str = "HumptyDumptysatonawallHumptyDumptyhadagreatfallAlltheKingshorsesandalltheKingsmenCouldntputHumptyDumptyinhisplace... | forgit/Rosalind | ini3.hs | gpl-2.0 | 529 | 0 | 12 | 106 | 147 | 77 | 70 | 11 | 1 |
--
-- Copyright (c) 2013 Citrix Systems, 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 by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This progra... | OpenXT/network | nws/NetworkFirewall.hs | gpl-2.0 | 9,120 | 0 | 20 | 2,457 | 1,961 | 987 | 974 | 147 | 3 |
{-# OPTIONS -Wall #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Graphics.UI.Bottle.Widgets.Spacer (
make, makeWidget, indentRight, indentRightWidget, makeHorizontal,
makeHorizontalExpanding, makeVerticalExpanding) where
import Data.Monoid(mempty)
import Data.Vector.Vector2(Vector2(..))
import Graphics.UI.... | nimia/bottle | bottlelib/Graphics/UI/Bottle/Widgets/Spacer.hs | gpl-3.0 | 1,507 | 0 | 11 | 170 | 419 | 243 | 176 | 31 | 1 |
{-# OPTIONS_GHC -F -pgmF htfpp #-}
module Pudding.Test.Utilities.DoubleFunctions
(htf_thisModulesTests) where
import Test.Framework
import Test.HUnit
import Pudding.Utilities.DoubleFunctions
import Pudding.Utilities.FloatEq
prop_fmodCutoff :: Double -> (NonZero Double) -> Bool
prop_fmodCutoff a (NonZero b) = (abs (a... | jfulseca/Pudding | src/Pudding/Test/Utilities/DoubleFunctions.hs | gpl-3.0 | 1,490 | 0 | 10 | 217 | 503 | 275 | 228 | 32 | 1 |
import Wanda
import Graphics.UI.Gtk
main = initGUI >> wandaMain >> mainGUI
| arsenm/Wandahs | WandaMain.hs | gpl-3.0 | 78 | 0 | 6 | 14 | 23 | 13 | 10 | 3 | 1 |
module Hadolint.Rule.DL3013 (rule) where
import Data.List (isInfixOf)
import qualified Data.Text as Text
import Hadolint.Rule
import Hadolint.Shell (ParsedShell)
import qualified Hadolint.Shell as Shell
import Language.Docker.Syntax
rule :: Rule ParsedShell
rule = simpleRule code severity message check
where
co... | lukasmartinelli/hadolint | src/Hadolint/Rule/DL3013.hs | gpl-3.0 | 2,811 | 0 | 14 | 743 | 651 | 361 | 290 | 67 | 2 |
module Trello.Client.Internal
( getMyBoards
) where
import Network.HTTP.Client (Manager)
import Servant.Client (BaseUrl, ClientM, client)
import Trello.API (Key, Token, api)
import Trello.API.Types (Board)
type RawClient a =
Maybe Key -> Maybe Token -> Manager -> BaseUrl -> ClientM [Board]
getMyBoards :... | cblp/tasknight-dashboard | trello-client/lib/Trello/Client/Internal.hs | gpl-3.0 | 365 | 0 | 10 | 62 | 120 | 70 | 50 | 10 | 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/Accountstatuses/Get.hs | mpl-2.0 | 5,869 | 0 | 19 | 1,386 | 917 | 531 | 386 | 128 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
import CodeWorld
{-
Copyright 2020 The CodeWorld Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.... | google/codeworld | codeworld-game-server/src/Bot.hs | apache-2.0 | 6,425 | 0 | 23 | 1,848 | 1,762 | 856 | 906 | 170 | 9 |
-- * Essentially, Haskell98!
{-# LANGUAGE NoMonomorphismRestriction #-}
-- * Typed tagless-final interpreters for simply-typed lambda-calculus
-- * de Bruijn indices
-- based on the code accompanying the paper by
-- Jacques Carette, Oleg Kiselyov, and Chung-chieh Shan
module TTFdB where
-- * Abstracting over the f... | egaburov/funstuff | Haskell/tytag/codes3/TTFdB.hs | apache-2.0 | 6,690 | 0 | 14 | 1,719 | 945 | 526 | 419 | 49 | 1 |
{-# LANGUAGE OverloadedLists #-}
module BEDSpec where
import Test.Hspec
import Data.Map
import Text.Parsec.ByteString
import Bio.Motions.BED
import Data.Either(isLeft)
test :: Spec
test = context "when parsing BED file" $ do
let chrInfos = [("chr1", 50), ("chr2", 40), ("super_chromosome", 20), ("bajtAlina", 7)]
... | Motions/motions | test/BEDSpec.hs | apache-2.0 | 1,633 | 0 | 15 | 484 | 514 | 299 | 215 | 32 | 1 |
{- Copyright 2014 David Farrell <shokku.ra@gmail.com>
- 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... | shockkolate/lambdircd | src.old/Config.hs | apache-2.0 | 1,955 | 0 | 20 | 441 | 350 | 172 | 178 | 34 | 2 |
module Sodium.Memory (SodiumBytes) where
import Sodium.Error
import Sodium.FFI
import Control.Monad (foldM_, when, forM_, void)
import Data.ByteArray
import Data.List.NonEmpty (NonEmpty(..))
import Data.Semigroup (Semigroup(..))
import Data.Void
import Foreign.ForeignPtr
import Foreign.Ptr
import System.IO.Unsafe (un... | rblaze/private-cloud | src/Sodium/Memory.hs | apache-2.0 | 3,285 | 0 | 19 | 992 | 1,105 | 549 | 556 | 85 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
module PrivateCloud.Cloud.Monad
( PrivateCloud
, cloudId
, conflictSuffix
, connection
, context
, dbName
, exclusions
, initCloudSettings
, rootDir
, runPrivateClo... | rblaze/private-cloud | src/PrivateCloud/Cloud/Monad.hs | apache-2.0 | 3,337 | 0 | 14 | 723 | 874 | 465 | 409 | 82 | 2 |
{- This module provides type-level finite maps.
The implementation is similar to that shown in the paper.
"Embedding effect systems in Haskell" Orchard, Petricek 2014 -}
{-# LANGUAGE TypeOperators, PolyKinds, DataKinds, KindSignatures,
TypeFamilies, UndecidableInstances, MultiParamTypeClasses,
... | dorchard/type-level-sets | src/Data/Type/Map.hs | bsd-2-clause | 9,629 | 0 | 16 | 2,792 | 4,055 | 2,140 | 1,915 | 166 | 1 |
module Haskonf.HaskonfSpec (main, spec) where
import Control.Monad (unless)
import Haskonf (appDir, binName, build, copyReal,
doesConfigExist, rebuild, runFrom)
import Paths_haskonf
import System.Environment (getProgName)
impo... | manpages/haskonf | test/Haskonf/HaskonfSpec.hs | bsd-2-clause | 1,554 | 0 | 16 | 473 | 366 | 191 | 175 | 35 | 1 |
{-|
Utility functions shared by several modules of "Typechecker".
-}
module Typechecker.Util(TypecheckM
,whenM
,anyM
,allM
,unlessM
,concatMapM
,tcError
,pu... | Paow/encore | src/types/Typechecker/Util.hs | bsd-3-clause | 31,062 | 0 | 20 | 9,090 | 9,136 | 4,324 | 4,812 | -1 | -1 |
import Test.QuickCheck
import Lib
main :: IO ()
main = do
quickCheck prop_functor
prop_functor :: CatA -> Bool
prop_functor x = (functor . f) x == (g . functor) x
instance Arbitrary CatA where
arbitrary = elements [AA, AB]
instance Arbitrary CatB where
arbitrary = elements [BA, BB]
| matthewfranglen/category-set-graph | test/Spec.hs | bsd-3-clause | 300 | 0 | 8 | 65 | 115 | 60 | 55 | 11 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Real.PkgAesonTH where
import Real.Types
import Data.Aeson as Aeson
import Data.Aeson.TH as Aeson
import Data.ByteString.Lazy as BS
import Data.Maybe
serialise :: [GenericPackageDescription] -> BS.ByteString
serialise pkgs = Aeson.encode pkg... | thoughtpolice/binary-serialise-cbor | bench/Real/PkgAesonTH.hs | bsd-3-clause | 1,712 | 0 | 6 | 150 | 423 | 189 | 234 | 45 | 1 |
-- A class used to keep track of file positions.
module Language.Scala.Position
( Index
, HasPosition (..)
, Position
, Positioned (..)
, noPosition
, lineNumber
, columnNumber
, startPositionInFile
, advanceLine
, advanceColumn
, nextLine
, nextColumn
, nextTab
... | jystic/language-scala | src/Language/Scala/Position.hs | bsd-3-clause | 2,570 | 0 | 12 | 503 | 771 | 414 | 357 | 67 | 1 |
{-# LANGUAGE BangPatterns, CPP, DeriveDataTypeable, MagicHash #-}
{-# LANGUAGE ScopedTypeVariables #-}
#if __GLASGOW_HASKELL__ >= 708
{-# LANGUAGE TypeFamilies #-}
#endif
{-# OPTIONS_GHC -fno-full-laziness -funbox-strict-fields #-}
module Data.HashMap.Base
(
HashMap(..)
, Leaf(..)
-- * Constructio... | athanclark/lh-bug | deps/unordered-containers/Data/HashMap/Base.hs | bsd-3-clause | 39,869 | 0 | 21 | 13,297 | 13,515 | 6,729 | 6,786 | 788 | 17 |
module Raven.Client.Connection
( listenAtEnd
, sendReq
)where
import Network.Transport
import Control.Concurrent
import Graphics.UI.Gtk hiding (Action, backspace)
import Codec.Picture
import Data.ByteString.Char8 (ByteString)
import qualified Data.ByteString.Char8 as B
import Data.Vector (Vector)
import qualif... | denumerate/raven | src/Raven/Client/Connection.hs | bsd-3-clause | 2,196 | 0 | 22 | 523 | 684 | 350 | 334 | 50 | 6 |
{-# LANGUAGE NamedFieldPuns #-}
{-|
Module : Data.RangeSet
Description : A set of elments represented as a list of ranges.
Copyright : (c) 2016 Micxjo Funkcio
License : BSD3
Maintainer : micxjo@fastmail.com
Stability : experimental
-}
module Data.RangeSet
( -- * RangeSet type
... | micxjo/range-set | src/Data/RangeSet.hs | bsd-3-clause | 3,877 | 0 | 14 | 1,016 | 1,248 | 650 | 598 | 80 | 2 |
module Bertrand.REPL
( repl
) where
import System.IO
import Control.Monad
import Control.Monad.Extra
-- import Control.Monad.State
import Data.Either
import Data.Maybe
import Data.Monoid
import qualified Data.Map as M
import Bertrand.Shell
import Bertrand.Data
import Bertrand.System (prelude)
import Bertrand... | fujiy00/bertrand | src/Bertrand/REPL.hs | bsd-3-clause | 5,493 | 0 | 23 | 2,010 | 1,476 | 771 | 705 | 97 | 6 |
{-# LANGUAGE OverloadedStrings, TupleSections, FlexibleContexts #-}
-- | This program is a convenience utility for running the Futhark
-- test suite, and its test programs.
module Main ( ProgramTest (..)
, TestRun (..)
, TestCase (..)
, main) where
import Control.Applicative
import... | CulpaBS/wbBach | src/futhark-test.hs | bsd-3-clause | 18,074 | 0 | 26 | 4,613 | 5,068 | 2,565 | 2,503 | 389 | 7 |
module Text.Highlighter.Lexers.GoodDataCL (lexer) where
import Text.Regex.PCRE.Light
import Text.Highlighter.Types
lexer :: Lexer
lexer = Lexer
{ lName = "GoodData-CL"
, lAliases = ["gooddata-cl"]
, lExtensions = [".gdc"]
, lMimetypes = ["text/x-gooddata-cl"]
, lStart = root'
, lFlags = [casel... | chemist/highlighter | src/Text/Highlighter/Lexers/GoodDataCL.hs | bsd-3-clause | 1,384 | 0 | 10 | 271 | 409 | 217 | 192 | 32 | 1 |
module Text.Highlighter.Lexers.Vala (lexer) where
import Text.Regex.PCRE.Light
import Text.Highlighter.Types
lexer :: Lexer
lexer = Lexer
{ lName = "Vala"
, lAliases = ["vala", "vapi"]
, lExtensions = [".vala", ".vapi"]
, lMimetypes = ["text/x-vala"]
, lStart = root'
, lFlags = [multiline]
... | chemist/highlighter | src/Text/Highlighter/Lexers/Vala.hs | bsd-3-clause | 4,507 | 0 | 12 | 671 | 1,134 | 578 | 556 | 69 | 1 |
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
module Bot
( bot
) where
import Data.Foldable (for_)
import Data.Monoid ((<>))
import Safe (lastMay)
import Web.Telegram.API.Bot (Chat (..), GetUpdatesRequest (..), Message (..),
Response (..), TelegramClient, Upda... | MCL1303/TaskBot | lib/Bot.hs | bsd-3-clause | 1,941 | 0 | 18 | 674 | 520 | 275 | 245 | 47 | 6 |
{-# OPTIONS_GHC -Wall -fwarn-tabs #-}
{-# LANGUAGE CPP, DeriveDataTypeable #-}
-- HACK: in GHC 7.10, Haddock complains about Control.Monad.STM and
-- System.IO.Unsafe being imported but unused. However, if we use
-- CPP to avoid including them under Haddock, then it will fail to
-- compile!
#ifdef __HADDOCK__
{-# OPTI... | bitemyapp/stm-chans | src/Control/Concurrent/STM/TBMQueue.hs | bsd-3-clause | 12,706 | 0 | 17 | 3,369 | 1,794 | 921 | 873 | 170 | 4 |
module Data.Number.IReal.Scalable where
import Data.Bits
import Data.Ratio
import Data.Number.IReal.IntegerInterval
import Data.Number.IReal.Auxiliary
-- | Scaling. @scale x n@ computes @x * 2^n@ using bit shifts.
class Scalable a where
scale :: a -> Int -> a
-- | Correctly rounded result for negative n.
-- Round... | sydow/ireal | Data/Number/IReal/Scalable.hs | bsd-3-clause | 1,194 | 2 | 14 | 303 | 482 | 243 | 239 | 33 | 0 |
module Main where
import MinFree
import Test.Hspec
main :: IO ()
main = hspec minfreeTest
minfreeTest :: Spec
minfreeTest = do
describe "Validate minfree function" $
it "minfree should find the smallest number not in the supplied set" $
minfree [08, 23, 09, 00, 12, 11, 01, 10, 31, 07, 41, 04, 14, 21, 05,... | bdkoepke/pearls | HSpecTests.hs | bsd-3-clause | 584 | 0 | 10 | 131 | 212 | 127 | 85 | 13 | 1 |
{-# LANGUAGE TupleSections #-}
-- Parsing.
module GHC.ParMake.Parse (getModuleDeps, depsListToDeps)
where
import Control.Concurrent
import Control.Monad
import Data.Char (isAlphaNum, isSpace)
import Data.Functor ((<$>))
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Maybe (catMaybes)
impor... | 23Skidoo/ghc-parmake | src/GHC/ParMake/Parse.hs | bsd-3-clause | 5,398 | 0 | 19 | 1,555 | 1,352 | 729 | 623 | 91 | 3 |
module Foundation where
import Prelude
import Yesod
import Yesod.Static
import Yesod.Auth
-- import Yesod.Auth.Email
-- import Yesod.Auth.BrowserId
import Yesod.Auth.GoogleEmail
import Yesod.Default.Config
import Yesod.Default.Util (addStaticContentExternal)
import Network.HTTP.Conduit (Manager)
import qualified Setti... | jabaraster/MetShop | Foundation.hs | bsd-3-clause | 6,235 | 0 | 18 | 1,423 | 909 | 497 | 412 | -1 | -1 |
{-# LANGUAGE ForeignFunctionInterface, CPP #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.Raw.ARB.ProvokingVertex
-- Copyright : (c) Sven Panne 2013
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- S... | mfpi/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/ARB/ProvokingVertex.hs | bsd-3-clause | 1,512 | 0 | 10 | 162 | 150 | 100 | 50 | -1 | -1 |
{- |
Module : Data.Dequeue.Show
Description : A newtype used entirely to provide 'Read' and 'Show' instances for 'Dequeue's.
Copyright : (c) Henry Bucklow 2010
License : BSD3
Maintainer : henry@elsie.org.uk
Stability : provisional
Portability : portable
A newtype used entirely for its derived 'Re... | oconnore/dequeue | src/Data/Dequeue/Show.hs | bsd-3-clause | 572 | 0 | 6 | 105 | 40 | 26 | 14 | 2 | 0 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE UnicodeSyntax #-}
{-|
[@ISO639-1@] -
[@ISO639-2@] gil
[@ISO639-3@] gil
[@Native name@] Taetae ni Kiribati
[@English name@] Gilbertese
-}
module Text.Numeral.Language... | telser/numerals | src-test/Text/Numeral/Language/GIL/TestData.hs | bsd-3-clause | 7,045 | 0 | 8 | 2,091 | 1,723 | 1,151 | 572 | 193 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.