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 CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RankNT...
bergey/plots
src/Plots/Types/Points.hs
bsd-3-clause
4,812
0
19
1,171
1,084
610
474
80
1
{-# LANGUAGE OverlappingInstances ,EmptyDataDecls ,FlexibleContexts ,FlexibleInstances ,FunctionalDependencies ,GeneralizedNewtypeDeriving ,KindSignatures ,MultiParamTypeClasses ,NoMonomorphismRestriction ,ScopedTypeVariables ,TemplateHaskell ,TypeOperators ,TypeSynon...
LeifW/xmonad-extras
XMonad/Config/Alt/Internal.hs
bsd-3-clause
12,595
5
22
3,931
3,240
1,781
1,459
-1
-1
module Bead.View.Markdown ( markdownToHtml , serveMarkdown ) where {- A markdown to HTML conversion. -} import Control.Monad.IO.Class import qualified Data.ByteString.Char8 as BS import Data.Either import Data.String import Data.String.Utils (replace) import S...
pgj/bead
src/Bead/View/Markdown.hs
bsd-3-clause
1,713
0
18
447
367
203
164
41
2
{-# LANGUAGE TemplateHaskell #-} module UnitTest.Util.HogeTest (testSuite) where import Test.Framework (defaultMain, Test) import Test.Framework.Providers.QuickCheck2 import Test.Framework.TH main = defaultMain [testSuite] testSuite :: Test testSuite = $(testGroupGenerator) prop_concat :: [[Int]] -> Bool prop_co...
hyone/haskell-unittest-project-template
src/UnitTest/Util/HogeTest.hs
bsd-3-clause
360
0
7
48
105
62
43
10
1
module System.GPIO -- Re-exported types ( Pin(..) , fromInt , ActivePin , Value(..) , Direction -- Exported API , initReaderPin , initWriterPin , readPin , writePin , reattachToReaderPin , reattachToWriterPin , closePin ) where import Control.Exception ...
TGOlson/gpio
lib/System/GPIO.hs
bsd-3-clause
3,434
0
13
698
1,141
578
563
-1
-1
module Tests.Development.Cake where import qualified Tests.Development.Cake.Options import qualified Tests.Development.Cake.Core.Types import Test.Framework tests = [ testGroup "Tests.Development.Cake.Core.Types" Tests.Development.Cake.Core.Types.tests , testGroup "Tests.Development.Cake.Options" ...
nominolo/cake
unittests/Tests/Development/Cake.hs
bsd-3-clause
399
0
7
63
69
45
24
10
1
module Text.Icalendar ( module Text.Icalendar.Event , module Text.Icalendar.Types , events , parser ) where import Data.Maybe import Data.Time import Text.Parsec import qualified Text.Parsec.ByteString as PBS import Text.Icalendar.Event import Text.Icalendar.Parser import Text.Icalendar.Token import Text....
samstokes/icalendar-parser
Text/Icalendar.hs
bsd-3-clause
1,558
0
13
306
491
267
224
38
2
{-# LANGUAGE OverloadedStrings #-} module Parse ( train, test ) where import DataPath import qualified Data.ByteString as B import qualified Data.Attoparsec.ByteString as P --parsing byte file read32BitInt :: (Num a) => B.ByteString -> a read32BitInt b = fromInteger $ sum $ fmap (uncurr...
danielbarter/personal_website_code
blog_notebooks/Niave_Bayes_classification_MNIST/mnistclean/app/Parse.hs
bsd-3-clause
2,317
0
13
610
757
391
366
44
2
{-# LANGUAGE OverloadedStrings #-} module API.Campbx ( feed ) where --------------------------------------------------------------------------------------------------- import Pipes --------------------------------------------------------------------------------------------------- import qualified Data.By...
RobinKrom/BtcExchanges
src/API/Campbx.hs
bsd-3-clause
565
0
6
51
63
39
24
8
1
-- Copyright (c) 2015, Travis Bemann -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- -- o Redistributions of source code must retain the above copyright notice, this -- list of conditio...
tabemann/amphibian
src_old/Network/IRC/Client/Amphibian/Default.hs
bsd-3-clause
3,985
0
13
996
450
273
177
54
3
-- | -- Module : Data.CVector.Mutable -- Copyright : (c) 2012-2013 Michal Terepeta -- (c) 2009-2010 Roman Leshchinskiy -- License : BSD-style -- -- Maintainer : Michal Terepeta <michal.terepeta@gmail.com> -- Stability : experimental -- Portability : non-portable -- -- Wrapper around unboxed ...
michalt/cvector
Data/CVector/Unboxed/Mutable.hs
bsd-3-clause
7,195
0
12
1,482
2,135
1,170
965
148
1
{-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} -- | This module provides the abstract domain for primitive values. module Jat.PState.AbstrDomain ( AbstrDomain (..), mkcon) where import Jat.JatM import Jat.Utils.Pretty import Jat.Constraints (PATerm, ass) import Data.Maybe (isJust) ...
ComputationWithBoundedResources/jat
src/Jat/PState/AbstrDomain.hs
bsd-3-clause
961
0
10
220
323
177
146
23
1
module Main where import qualified Text.Scalar.CLI as CLI main :: IO () main = CLI.main
corajr/scalar-convert
app/Main.hs
bsd-3-clause
90
0
6
17
30
19
11
4
1
{-# LANGUAGE MultiParamTypeClasses,TemplateHaskell,QuasiQuotes #-} module Language.XHaskell where import Data.List (zip4,sort,nub,foldl1) import qualified Data.Traversable as Trvsbl (mapM) -- import Data.Generics import Control.Monad import qualified Language.Haskell.TH as TH import Language.Haskell.TH.Quote import ...
luzhuomi/xhaskell
Language/XHaskell.hs
bsd-3-clause
69,224
2
34
22,722
16,783
8,637
8,146
783
29
-- | Download and import feeds from various sources. module HN.Model.Feeds where import HN.Data import HN.Monads import HN.Model.Items import HN.Types import HN.Curl import qualified HN.Model.Mailman (downloadFeed) import Control.Applicative import Network.URI import Snap.App import Text.Feed.Import import Text.Fe...
jwaldmann/haskellnews
src/HN/Model/Feeds.hs
bsd-3-clause
6,761
0
19
1,318
1,836
903
933
134
3
{-# LINE 1 "System.Environment.ExecutablePath.hsc" #-} {-# LANGUAGE Safe #-} {-# LINE 2 "System.Environment.ExecutablePath.hsc" #-} {-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- | -- Module : System.Environment.ExecutablePath -- Copyright : (c) The Unive...
phischu/fragnix
builtins/base/System.Environment.ExecutablePath.hs
bsd-3-clause
2,382
0
14
419
209
128
81
21
2
-- | This module provides functionality for retrieving and parsing the -- quantum random number data from the Australian National University QRN server. -- -- This module can be used when one only wants to use live data directly from the server, -- without using any of the data store functionality. -- -- In mos...
BlackBrane/quantum-random-numbers
src-lib/Quantum/Random/ANU.hs
mit
1,737
0
7
318
274
154
120
21
1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Napm.Types( Domain(..) , PasswordLength(..) , Passphrase(..) , ContextMap ) where import Control.Applicative import Data.Map (Map) import Data.Text (Text) import qualified Data.Text as T import Test.QuickCheck -- ...
fractalcat/napm
lib/Napm/Types.hs
mit
1,750
0
13
486
331
197
134
34
1
import Control.Monad import Control.Concurrent import Data.Word import Sleep import Led ledGroupA, ledGroupB :: [Word16] ledGroupA = [led3, led5, led7, led9] ledGroupB = [led4, led6, led8, led10] blinkLedLoop :: [Word16] -> Word32 -> IO () blinkLedLoop leds sleep = forever $ sequence_ dos where delays = repeat...
metasepi/chibios-arafura
demos/ARMCM4-STM32F303-DISCOVERY_hs/hs_src/MainBlinkLed.hs
gpl-3.0
610
0
11
128
218
117
101
17
1
<?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="ru-RU"> <title>Passive Scan Rules - Beta | ZAP Extension</title> <maps> <homeID>top</homeID...
veggiespam/zap-extensions
addOns/pscanrulesBeta/src/main/javahelp/org/zaproxy/zap/extension/pscanrulesBeta/resources/help_ru_RU/helpset_ru_RU.hs
apache-2.0
998
80
67
163
442
222
220
-1
-1
#!/usr/bin/env runhaskell {-# LANGUAGE NoImplicitPrelude, OverloadedStrings #-} {-# OPTIONS -Wall #-} import Data.Dynamic import Data.Tensor.TypeLevel import qualified Data.Text.IO as T import Language.Paraiso.Annotation (Annotation) import Language.Paraiso.Generator (generateIO...
drmaruyama/Paraiso
examples-old/LinearWave/Convergence.hs
bsd-3-clause
2,761
0
15
701
1,108
582
526
73
1
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {- | Module : Verifier.SAW.Prelude Copyright : Galois, Inc. 2012-2015 License : BSD3 Maintainer : jhendrix@galois.com Stability : experimental Portability : non-portable (language extensions) -} module Verifier.SAW....
GaloisInc/saw-script
saw-core/src/Verifier/SAW/Prelude.hs
bsd-3-clause
4,624
0
17
1,248
1,382
694
688
103
21
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section[HsLit]{Abstract syntax: source-language literals} -} {-# LANGUAGE CPP, DeriveDataTypeable #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUA...
sgillespie/ghc
compiler/hsSyn/HsLit.hs
bsd-3-clause
8,103
0
12
2,172
1,885
977
908
124
1
-- | Spawn subprocesses and interact with them using "Pipes" -- -- The interface in this module deliberately resembles the interface -- in "System.Process". However, one consequence of this is that you -- will not want to have unqualified names from this module and from -- "System.Process" in scope at the same time. -...
massysett/pipes-cliff
pipes-cliff/lib/Pipes/Cliff.hs
bsd-3-clause
7,997
0
5
1,394
231
178
53
36
0
module Reinforce.Agents ( runLearner , clockEpisodes , clockSteps ) where import Control.Monad import Control.Monad.IO.Class import Control.MonadEnv import qualified Control.MonadEnv as Env (reset) runLearner :: MonadEnv m o a r => MonadIO m => Maybe Integer -> Maybe Integer -> (Maybe Integer -> o -...
stites/reinforce
reinforce-algorithms/src/Reinforce/Agents.hs
bsd-3-clause
1,073
0
15
268
422
211
211
-1
-1
module Main where import IO import Wash.HTMLMonad import Wash.CGI import Data.Char( toLower ) -- autoan-modules import HTMLshortcuts import SQLqueries import Helper import Exception -- EX import Database.MySQL.HSQL -- -- TODO -- SQL-Exception fangen -- Seiten Struktur rausziehen: stdpage ttl bdy menu main :: IO ...
Erdwolf/autotool-bonn
src/control/autoadmin.hs
gpl-2.0
8,256
175
25
2,169
2,810
1,382
1,428
-1
-1
{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Lens.Internal -- Copyright : (C) 2012-16 Edward Kmett -- License : BSD-style (see the file LICENSE) -- Maintainer : Edward Kmett <ekmett@gmail.com> -- Stability : experimental -...
ddssff/lens
src/Control/Lens/Internal.hs
bsd-3-clause
1,676
0
5
200
217
163
54
27
0
module Data.Graph.Inductive.Query.MaxFlow2 (Network, ekSimple, ekFused, ekList) where { import Data.List; import Data.Maybe; import Data.Graph.Inductive.Graph; import Data.Graph.Inductive.Tree; import Data.Graph.Inductive.Internal.FiniteMap; import Data.Graph.Inductive.Internal.Queue; import Data.Gra...
ckaestne/CIDE
other/CaseStudies/fgl/CIDEfgl/Data/Graph/Inductive/Query/MaxFlow2.hs
gpl-3.0
7,718
0
15
2,501
3,320
1,895
1,425
173
3
{-# LANGUAGE OverloadedStrings #-} module Yesod.Form.I18n.English where import Yesod.Form.Types (FormMessage (..)) import Data.Monoid (mappend) import Data.Text (Text) englishFormMessage :: FormMessage -> Text englishFormMessage (MsgInvalidInteger t) = "Invalid integer: " `Data.Monoid.mappend` t englishFormMessage (M...
s9gf4ult/yesod
yesod-form/Yesod/Form/I18n/English.hs
mit
1,469
0
7
174
320
178
142
24
1
module RefacGenCache where import TypeCheck import PrettyPrint import PosSyntax import AbstractIO import Data.Maybe import TypedIds import UniqueNames hiding (srcLoc) import PNT import TiPNT import Data.List import RefacUtils hiding (getParams) import PFE0 (findFile, allFiles, allModules) import MUtils (( # )) import ...
kmate/HaRe
old/refactorer/RefacGenCache.hs
bsd-3-clause
1,783
0
15
456
525
281
244
50
5
{-# NOINLINE f #-} f :: Int -> Int f = {-# SCC f #-} g {-# NOINLINE g #-} g :: Int -> Int g x = {-# SCC g #-} x + 1 main = {-# SCC main #-} return $! f 3
urbanslug/ghc
testsuite/tests/profiling/should_run/scc004.hs
bsd-3-clause
157
0
6
48
53
30
23
-1
-1
-- #hide, prune, ignore-exports -- |Module description module A where
siddhanathan/ghc
testsuite/tests/haddock/should_compile_noflag_haddock/haddockC016.hs
bsd-3-clause
71
0
2
11
6
5
1
1
0
------------------------------------------------------------ -- Card ! Made by Mega Chan ! ------------------------------------------------------------ card_valid :: String -> Bool card_valid str = if ((card_value str) `mod` 10 == 0) then True else False card_value :: String -> Int card_value str = (add_even (map mu...
MegaShow/college-programming
Homework/Haskell Function Programming/card.hs
mit
5,136
0
15
2,235
847
503
344
144
2
{-# OPTIONS_GHC -fno-warn-type-defaults #-} import Test.Hspec (Spec, describe, it, shouldBe) import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith) import Robot ( Bearing ( East , North , South , West ) , bearing , coordinates , mkRobot , m...
exercism/xhaskell
exercises/practice/robot-simulator/test/Tests.hs
mit
3,120
0
21
989
977
487
490
74
1
{-# LANGUAGE NoImplicitPrelude #-} module Typeclasses where import Prelude (not, Bool(..)) data Animal = Dog | Cat class EqClass t where equal :: t -> t -> Bool neq :: t -> t -> Bool neq a b = not (equal a b) instance EqClass Animal where equal Dog Dog = True equal Cat Cat = True equal _ _ = False ...
riwsky/wiwinwlh
src/dictionaries.hs
mit
661
0
10
162
274
143
131
22
1
module Euler.E54 where import Data.List (sort, nub) import Data.Maybe import Euler.Lib (rotations) data Rank = Two | Three | Four | Five | Six | Seven | Eight | Nine | Ten | Jack | Queen | King | Ace deriving (Eq, Ord, Show, Enum) data Suit = Hearts | Spades | Diamonds | Clubs deriving (Eq, Ord, Show) data Card =...
D4r1/project-euler
Euler/E54.hs
mit
5,208
14
12
1,225
2,662
1,386
1,276
149
1
{-# LANGUAGE MagicHash, UnboxedTuples, Rank2Types, BangPatterns, ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-full-laziness -fno-warn-name-shadowing #-} module Data.TrieVector.ArrayArray ( A.run , A.sizeof , A.thaw , A.unsafeThaw , A.write , ptrEq , update , modify , noCopyModify...
AndrasKovacs/trie-vector
Data/TrieVector/ArrayArray.hs
mit
5,418
0
18
1,635
2,049
1,056
993
135
2
{-# LANGUAGE TupleSections #-} module Data.Tuple.Extra where import Data.Tuple (uncurry) import Data.Functor uncurry3 :: (a -> b -> c -> d) -> (a, b, c) -> d uncurry3 f (x,y,z) = f x y z uncurry4 :: (a -> b -> c -> d -> e) -> (a, b, c, d) -> e uncurry4 f (w,x,y,z) = f w x y z uncurry5 :: (a -> b -> c -> d -> e -> f...
circuithub/circuithub-prelude
Data/Tuple/Extra.hs
mit
1,223
0
12
307
884
505
379
26
1
{-# LANGUAGE QuasiQuotes, TypeFamilies, TemplateHaskell, MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleInstances #-} module YesodCoreTest.CleanPath (cleanPathTest, Widget) where import Test.Hspec import Yesod.Core hiding (Request) import Network.Wai import Network.Wai.Test import ...
piyush-kurur/yesod
yesod-core/test/YesodCoreTest/CleanPath.hs
mit
4,465
0
12
1,097
1,154
586
568
112
1
module Main where import qualified Labyrinth.Helpers import qualified Labyrinth.Models import qualified Labyrinth.Game import qualified Labyrinth.Factory import qualified Labyrinth.Board import qualified Labyrinth.Parser import qualified Data.List import qualified System.Random import qualified System.Environment cre...
amoerie/labyrinth
Main.hs
mit
1,335
0
12
208
308
160
148
33
3
module Y2016.M12.D26.Exercise where import Data.Array import Data.Map (Map) -- below imports available via 1HaskellADay git repository import Data.SAIPE.USCounties import Graph.KMeans import Graph.ScoreCard import Graph.ScoreCard.Clusters import Y2016.M12.D15.Exercise import Y2016.M12.D21.Exercise {-- Good mornin...
geophf/1HaskellADay
exercises/HAD/Y2016/M12/D26/Exercise.hs
mit
3,973
0
9
643
304
168
136
19
1
module Main where import Test.Tasty (defaultMain,testGroup,TestTree) import AlgorithmsAtHandHaskell.Swallow.Test import AlgorithmsAtHandHaskell.Coconut.Test main :: IO () main = defaultMain tests tests :: TestTree tests = testGroup "All Tests" [ swallowSuite , coconutSuite ]
antonlogvinenko/algorithms-at-hand
algorithms-at-hand-haskell/test/Test.hs
mit
316
0
6
71
71
42
29
10
1
{-# LANGUAGE NoMonomorphismRestriction #-} import Diagrams.Prelude import Diagrams.Backend.SVG.CmdLine h = hexagon 1 # fc lightgreen sOrigin = showOrigin' (with & oScale .~ 0.04) diagram :: Diagram B diagram = h # snugBL # sOrigin main = mainWith $ frame 0.1 diagram
jeffreyrosenbluth/NYC-meetup
meetup/SnugBL.hs
mit
292
0
8
66
83
44
39
8
1
module Chapter05.Sing where fstString :: [Char] -> [Char] fstString x = x ++ " in the rain" sndString :: [Char] -> [Char] sndString x = x ++ " over the rainbow" sing :: Ord a => a -> a -> [Char] sing x y = if (x > y) then fstString "Signin" else sndString "Somewhere"
brodyberg/LearnHaskell
HaskellProgramming.hsproj/Chapter05/Sing.hs
mit
300
0
8
87
114
62
52
10
2
module Heuristics where import Data.Array import Data.List import NPuzzle manhattan :: NPuzzle.Grid -> NPuzzle.Grid -> Int manhattan end start = sum $ map go (indices start) where manhattan' (gx, gy) (cx, cy) = abs (gx - cx) + abs (gy - cy) go i = manhattan' (end!i) (start!i)
Shakadak/n-puzzle
Heuristics.hs
mit
298
0
10
69
134
72
62
8
1
module FileTools ( find, ls, cat ) where import System.Directory import System.IO.Error import qualified Data.ByteString.Lazy.Char8 as B cat :: FilePath -> IO B.ByteString cat file = catchIOError (B.readFile file) (\e -> return $ B.pack []) ls :: String -> IO [FilePath] ls dir = getDirectoryContents dir >>= return ...
ryuichiueda/UspMagazineHaskell
Study1_Q3/FileTools.hs
mit
653
0
14
160
260
139
121
19
2
module GitStatus where import GitWorkflow type GitStatus = (Char, Char, String, Maybe String) pathStatuses :: IO (Either String [GitStatus]) pathStatuses = do r <- runGitProcess ["status", "-s"] case r of Left err -> return (Left err) Right ss -> return $Right $map readStatus $lines ss where readStatu...
yamamotoj/alfred-git-workflow
src/GitStatus.hs
mit
711
0
14
179
326
176
150
17
3
module Lib where import Data.List as List import Data.List.Split import Data.Map.Strict as Map data BinSize = Small | Large deriving Show data ShelfDifficulty = Normal | Level3 | Level4 deriving Show data Bin = Bin { warehouse :: String, room :: String, bay :: String, ...
NashFP/pick-and-grin
mark_wutka+hakan+kate+haskell/src/Lib.hs
mit
1,261
0
10
335
401
228
173
35
1
{-# LANGUAGE OverloadedStrings #-} {-| Module : Utils.NuxmvCode Description : Utilities for producing nuXmv code Copyright : (c) Tessa Belder 2015-2016 This module contains useful functions for producing nuXmv code. -} module Utils.NuxmvCode where import Data.List (intersperse) import Utils.Concatable as C ...
julienschmaltz/madl
src/Utils/NuxmvCode.hs
mit
7,873
0
15
1,455
2,672
1,446
1,226
119
2
module Network.Mosquitto ( -- * Data structure Mosquitto , Event(..) -- * Mosquitto , initializeMosquittoLib , cleanupMosquittoLib , newMosquitto , destroyMosquitto , setWill , clearWill , connect , disconnect , getNextEvents , subscribe , publish -- * H...
uwitty/mosquitto
src/Network/Mosquitto.hs
mit
9,202
0
18
2,966
2,371
1,194
1,177
205
2
-- Get the difference between the sum of squares and the square of sum for the numbers between 1 and 100 main = print getProblem6Value getProblem6Value :: Integer getProblem6Value = getSquareOfSumMinusSumOfSquares [1..100] getSquareOfSumMinusSumOfSquares :: [Integer] -> Integer getSquareOfSumMinusSumOfSquares nums =...
jchitel/ProjectEuler.hs
Problems/Problem0006.hs
mit
529
0
7
75
127
68
59
9
1
module Data.NameSupply ( NameSupply (..), mkNameSupply, getFreshName , NS, runNS , newName, findName, withName ) where import Common import Control.Monad.Reader import Control.Monad.State import qualified Data.Map as M import qualified Data.Set as S newtype NameSupply = NameSupply { getNames :: [Name] } mkNameSuppl...
meimisaki/Rin
src/Data/NameSupply.hs
mit
1,119
0
11
197
421
228
193
29
1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE FlexibleContexts #-} module EC.ES where import qualified Control.Monad.Primitive as Prim --import qualified System.Random.MWC as MWC import System.Random.MWC import Control.Monad.ST import Control.Monad import Control.Monad.State newtype S s a = S { runS :: S...
banacorn/evolutionary-computation
EC/es.hs
mit
705
0
9
151
106
71
35
10
0
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module Model.Mongo.Common where import Common (loggerName) import Config (Database) import Control.Monad.IO.Class (MonadIO(..)) import Control.Monad.Trans.Class (MonadTrans(..)) import Control.Monad.Trans.Resource (ru...
VictorDenisov/keystone
src/Model/Mongo/Common.hs
gpl-2.0
3,131
0
17
767
997
541
456
87
2
{-# LANGUAGE DoAndIfThenElse #-} ----------------------------------------------------------------------------- -- -- Module : Search.Indexer -- Copyright : Francisco Soares -- License : GPL (Just (Version {versionBranch = [2], versionTags = []})) -- -- Maintainer : Francisco Soares -- Stability : exp...
frsoares/hsimplesearch
src/Search/Indexer.hs
gpl-2.0
3,378
0
17
780
939
531
408
48
3
--unha declaracion require unha definicion --o everflow da warning pero non erro na definicion --na operacion é silencioso x :: Int x = 555555555555555555555555555555555555555555555555 --x ^ 20000 -- da overflow e retorna 0 se o casteamos ou indicamos o tipo con :: Int se non infire que é un integer y :: Integer -- é ...
jmlb23/haskell
ch09/types.hs
gpl-3.0
3,396
0
12
666
452
276
176
37
1
class TupMat t where type TupleComps t :: * fromTups :: TupleComps t -> t -- instance TupMat Double where -- type TupleComps t = Double -- fromTups = id -- instance TupMat (s,t) where -- type TupleComps (s,t) = (s,t) -- fromTups = id -- newtype Row v = R v deriving (AdditiveGroup) instance (VectorSpace v)...
leftaroundabout/constrained-categories
wild-ideas/TupMat.hs
gpl-3.0
802
7
12
188
338
176
162
-1
-1
problem1 = sum [ x | x <- [1..999], (x `mod` 3 == 0) || (x `mod` 5 == 0) ]
vonmoltke/project_euler
haskell/problem1.hs
gpl-3.0
75
0
11
21
59
33
26
1
1
{- Copyright (C) 2014 Richard Larocque <richard.larocque@gmail.com> 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 progr...
richardlarocque/latin-db-builder
Wiki/Latin/AdjectiveDecl.hs
gpl-3.0
15,086
504
11
2,043
5,653
3,238
2,415
347
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} module Pretty.Fields.Persistent ( module Pretty.Fields , idField , namedIdField , textField , doubleField ...
merijn/GPU-benchmarks
benchmark-analysis/src/Pretty/Fields/Persistent.hs
gpl-3.0
2,784
0
13
585
960
489
471
68
1
{-# LANGUAGE OverloadedStrings #-} module Database.Hedsql.Tests.Update ( tests ) where -------------------------------------------------------------------------------- -- IMPORTS -------------------------------------------------------------------------------- import Data.Monoid import Database.Hedsql.Example...
momomimachli/Hedsql-tests
src/Database/Hedsql/Tests/Update.hs
gpl-3.0
2,929
0
11
683
333
197
136
51
1
module Math.LinearAlgebra.GramSchmidt.Tests ( tests ) where import Test.Framework import qualified Test.HUnit as H import Test.Framework.Providers.HUnit import Data.Ratio import Math.LinearAlgebra.GramSchmidt simpleTest = H.assert $ computed == correct where computed = gramSchmidtOrthogonalization $ ...
bcoppens/Lattices
tests/Math/LinearAlgebra/GramSchmidt/Tests.hs
gpl-3.0
594
0
12
131
264
159
105
14
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE TypeOperators #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-duplicate-exports #-} -- | -- Module : Network.Google.AdExchangeSeller -- Copyright : (c) 2015-2016 Brendan Hay -- License : Moz...
rueshyna/gogol
gogol-adexchange-seller/gen/Network/Google/AdExchangeSeller.hs
mpl-2.0
7,300
0
17
1,598
798
586
212
173
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
dysinger/amazonka
amazonka-cloudwatch-logs/gen/Network/AWS/CloudWatchLogs/Types.hs
mpl-2.0
17,159
0
23
4,369
3,425
1,940
1,485
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-monitoring/gen/Network/Google/Resource/Monitoring/Projects/MonitoredResourceDescriptors/List.hs
mpl-2.0
7,694
0
19
1,705
978
569
409
147
1
module Core.Http where import qualified Network.Wreq as Wreq import qualified Data.ByteString.Lazy.Char8 as BSL import qualified Data.ByteString.Char8 as BS import Control.Lens ((^.)) data Version = Version { major :: {-# UNPACK #-} !Int, minor :: {-# UNPACK #-} !Int } deriving (Sho...
inq/manicure
src/Core/Http.hs
agpl-3.0
494
0
11
112
146
85
61
13
1
module Chapter2.Section2.Example where
wangyixiang/beginninghaskell
chapter2/src/Chapter2/Section2/Example.hs
unlicense
41
2
3
5
9
6
3
1
0
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} module HepMC.Parse ( module X , tuple, vector, eol , hmcvers, hmcend , xyzt ) where import Control.Applicative as X (many, (<|>)) import Control.Applicative (liftA2) import C...
cspollard/HHepMC
src/HepMC/Parse.hs
apache-2.0
1,380
0
11
411
407
219
188
44
1
{-# language CPP #-} -- No documentation found for Chapter "ViewStateFlagBits" module OpenXR.Core10.Enums.ViewStateFlagBits ( ViewStateFlags , ViewStateFlagBits( VIEW_STATE_ORIENTATION_VALID_BIT , VIEW_STATE_...
expipiplus1/vulkan
openxr/src/OpenXR/Core10/Enums/ViewStateFlagBits.hs
bsd-3-clause
3,054
1
10
780
395
235
160
-1
-1
-- -- @file -- -- @brief Normalizes RegexTypes -- -- Normalizes a RegexType by applying commutativity of intersection. -- -- @copyright BSD License (see LICENSE.md or https://www.libelektra.org) -- {-# LANGUAGE LambdaCase #-} module Elektra.Normalize (normalize) where import Control.Monad (foldM) import Data.Maybe ...
e1528532/libelektra
src/libs/typesystem/specelektra/Elektra/Normalize.hs
bsd-3-clause
2,296
0
26
619
764
399
365
40
12
{-# LANGUAGE OverloadedStrings, DeriveGeneric #-} module Youtube.Channel ( getChannelId ) where import Network.Wreq import Control.Lens import GHC.Generics import Data.Aeson import Data.Maybe import Prelude hiding (id) import qualified Data.Text as T data ChannelItem = ChannelItem { id :: String } derivi...
kelvinlouis/spotell
src/Youtube/Channel.hs
bsd-3-clause
1,082
0
18
248
300
160
140
29
2
module Utils ( isqrt , numFactors , dataFile ) where import Paths_project_euler isqrt :: Integral i => i -> i isqrt = floor . sqrt . fromIntegral numFactors :: Int -> Int numFactors x = let top = isqrt x nonSquareFactors = [i | i <- [1 .. top], i < top, x `mod` i == 0] addSquareFactor y = ...
anup-2s/project-euler
src/Utils.hs
bsd-3-clause
572
0
12
166
213
114
99
22
2
{-# LANGUAGE Arrows #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE TypeOperators #-} module Spanout.Gameplay (game) where import Prelude hiding (id, (.)) import Spanout.Common import Spanout.Graphics import Spanout.Level import qualified Spanout.Wire as Wire import Control.Applicative import Control.Arrow import Cont...
vtan/spanout
src/Spanout/Gameplay.hs
bsd-3-clause
6,047
4
21
1,484
1,973
1,002
971
132
4
{-# OPTIONS_GHC -fno-warn-orphans -fsimpl-tick-factor=500 #-} module Macro.PkgCereal where import Macro.Types import Data.Serialize as Cereal import Data.ByteString.Lazy as BS serialise :: [GenericPackageDescription] -> BS.ByteString serialise pkgs = Cereal.encodeLazy pkgs deserialise :: BS.ByteString -> [GenericPac...
arianvp/binary-serialise-cbor
bench/Macro/PkgCereal.hs
bsd-3-clause
1,759
0
12
257
492
236
256
52
2
module Data.SequentialIndex.Open ( SequentialIndex , mantissa , exponent , sequentialIndex , tryFromBools , toClosed , fromClosed , root , leftChild , rightChild , parent , prefixBits , toByteString , fromByteString ) where import Control.Monad import Data.Bits import Data.Maybe import ...
aristidb/sequential-index
Data/SequentialIndex/Open.hs
bsd-3-clause
2,111
0
12
451
589
319
270
57
1
module Data.Vhd.Bitmap ( Bitmap (..) , bitmapGet , bitmapSet , bitmapSetRange , bitmapClear ) where import Data.Bits import Data.Word import Foreign.Ptr import Foreign.Storable data Bitmap = Bitmap (Ptr Word8) bitmapGet :: Bitmap -> Int -> IO Bool bitmapGet (Bitmap ptr) n = test `fmap` peekByteOff ptr offset ...
jonathanknowles/hs-vhd
Data/Vhd/Bitmap.hs
bsd-3-clause
1,000
4
10
205
425
223
202
28
1
module Main where import Test.Framework (defaultMain, testGroup) import qualified Tests.Database.Cassandra.CQL.Protocol as Protocol import qualified Tests.Database.Cassandra.CQL.Protocol.Properties as Properties main :: IO () main = defaultMain tests where tests = [ testGroup "Tests.Database.Cassandra.C...
romanb/cassandra-cql-protocol
test/TestSuite.hs
bsd-3-clause
446
0
9
69
85
53
32
9
1
-- | Checks for a `Square` being attacked by one of the players. -- -- https://chessprogramming.wikispaces.com/Square+Attacked+By module Chess.Board.Attacks ( isAttacked , attackedFromBB , inCheck , inCheckWithNoFriendly ) where import Data.Monoid import Chess.Board.Board import Che...
phaul/chess
Chess/Board/Attacks.hs
bsd-3-clause
3,121
0
12
545
667
358
309
-1
-1
module Control.ConstraintClasses.KeyZip ( -- * Constraint KeyZip CKeyZip (..) ) where import Control.ConstraintClasses.Domain import Control.ConstraintClasses.Key import Control.ConstraintClasses.KeyFunctor import Control.ConstraintClasses.Zip import Data.Key -- base import Data.Functor.Product import Data...
guaraqe/constraint-classes
src/Control/ConstraintClasses/KeyZip.hs
bsd-3-clause
1,293
0
12
163
232
141
91
24
0
module Drones where import qualified Test.HUnit as H import NPNTool.PetriNet import NPNTool.PTConstr import NPNTool.NPNConstr (arcExpr, liftPTC, liftElemNet, addElemNet, NPNConstrM) import qualified NPNTool.NPNConstr as NPC import NPNTool.Graphviz import NPNTool.Bisimilarity import NPNTool.Liveness import NPNTool.Alph...
co-dan/NPNTool
tests/Drones.hs
bsd-3-clause
3,560
0
14
770
1,133
563
570
-1
-1
-- | The code that powers the searchbox. module Guide.Search ( SearchResult(..), search, ) where import Imports -- Text import qualified Data.Text.All as T -- Sets import qualified Data.Set as S import Guide.Types import Guide.State import Guide.Markdown -- | A search result. data SearchResult -- | Category...
aelve/hslibs
src/Guide/Search.hs
bsd-3-clause
2,257
0
15
617
558
302
256
-1
-1
{- (c) The University of Glasgow, 2006 \section[HscTypes]{Types for the per-module compiler} -} {-# LANGUAGE CPP, ScopedTypeVariables #-} -- | Types for the per-module compiler module HscTypes ( -- * compilation state HscEnv(..), hscEPS, FinderCache, FindResult(..), Target(..), Target...
vikraman/ghc
compiler/main/HscTypes.hs
bsd-3-clause
119,276
0
21
36,411
15,231
8,485
6,746
1,405
6
module Module2.Task4 where doItYourself = f . g . h f = logBase 2 g = (^ 3) h = max 42
dstarcev/stepic-haskell
src/Module2/Task4.hs
bsd-3-clause
91
0
6
26
44
25
19
5
1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE FlexibleInstances #-} module Database.Relational.Schema.OracleDataDictionary.ConsColumns where import Data.Int (Int32) import Database.Record.TH (derivingShow) import Database.Relational.Query.TH (defineTableTypesAndRecordDefault) $(defineTableTypesAndRecordDefault ...
amutake/haskell-relational-record-driver-oracle
src/Database/Relational/Schema/OracleDataDictionary/ConsColumns.hs
bsd-3-clause
1,052
0
9
343
135
96
39
14
0
module Import.NoFoundation ( module Import ) where import ClassyPrelude.Yesod as Import import Control.Concurrent.STM.TBMQueue as Import import Lens as Import import Model as Import import RPC as Import import Settings...
konn/leport
leport-web/Import/NoFoundation.hs
bsd-3-clause
611
0
5
260
88
65
23
13
0
module OIS ( module OIS.OISEvents , module OIS.OISFactoryCreator , module OIS.OISInputManager , module OIS.OISInterface , module OIS.OISJoyStick , module OIS.OISKeyboard , module OIS.OISMouse , module OIS.OISMultiTouch , module OIS....
ghorn/hois
OIS.hs
bsd-3-clause
620
0
5
165
116
74
42
20
0
{-# LANGUAGE PackageImports #-} {-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MonoLocalBinds #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANG...
kcsongor/generic-lens
generic-lens/src/Data/Generics/Product/Any.hs
bsd-3-clause
2,226
0
7
477
280
181
99
26
0
----------------------------------------------------------------------------- -- | -- Copyright : (C) 2015 Dimitri Sabadie -- License : BSD3 -- -- Maintainer : Dimitri Sabadie <dimitri.sabadie@gmail.com> -- Stability : experimental -- Portability : portable -----------------------------------------------------...
apriori/luminance
src/Graphics/Luminance/Tuple.hs
bsd-3-clause
988
0
12
190
271
150
121
-1
-1
{-# LANGUAGE CPP, OverloadedStrings #-} -- | Serve static files, subject to a policy that can filter or -- modify incoming URIs. The flow is: -- -- incoming request URI ==> policies ==> exists? ==> respond -- -- If any of the polices fail, or the file doesn't -- exist, then the middleware gives up and calls the...
Shimuuar/wai-middleware-static
Network/Wai/Middleware/Static.hs
bsd-3-clause
14,041
0
19
4,374
2,458
1,434
1,024
232
7
module JFP.Threads where import Control.Concurrent import Control.Concurrent.STM import Control.Monad -- | Makes asynchronous message handler for handling hard tasks. Messages sent -- while handling previous message are dropped except last one. Last message is -- always handled. makeSequencer :: (a -> IO ()) -> I...
s9gf4ult/jfprrd
src/JFP/Threads.hs
bsd-3-clause
640
0
15
141
168
81
87
18
1
{-# LANGUAGE QuasiQuotes #-} module Text.Parakeet ( parakeet , templateTeX , templateHTML , OutputFormat (..) , module Parakeet.Types.Options ) where import Control.Monad.Parakeet (runParakeet, SomeException) import Data.Text.Lazy (unpack) import Text.QuasiEmbedFile (rfile) import Parakeet.Parser.Parser (parse) im...
foreverbell/parakeet
src/Text/Parakeet.hs
mit
846
0
13
147
221
131
90
26
2
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE ViewPatterns#-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUA...
tolysz/yesod
yesod-core/test/RouteSpec.hs
mit
12,733
0
22
4,022
2,814
1,454
1,360
200
1
-- -- -- ------------------ -- Exercise 11.32. ------------------ -- -- -- module E'11'32 where -- Notes: -- -- - Use/See templates for proofs by structural induction. -- - Note: Re/-member/-think/-view the definitions of "++", "." and "foldr". -- --------------- -- 1. Proposition: -- --------------- -- -- f...
pascal-knodel/haskell-craft
_/links/E'11'32.hs
mit
3,008
0
2
1,442
102
101
1
1
0
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module %PACKAGE%.%MODEL% ( module Export )where import %PACKAGE%.%MODE...
lambdacms/lambdacms
scaffold-extension/PACKAGE/MODEL.hs
mit
649
11
10
122
134
88
46
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ViewPatterns #-} module Database.Persist.Postgresql.Internal ( P(..) , PgInterval(..) , getGetter ) where import qualified Database.PostgreSQL.Simple as PG import qualified Database.PostgreSQL.Simple.FromField as PGFF import qualified Database.PostgreSQL...
paul-rouse/persistent
persistent-postgresql/Database/Persist/Postgresql/Internal.hs
mit
11,983
0
19
3,291
3,274
1,750
1,524
217
1
import Data.Time.Calendar import Data.Time.Calendar.WeekDate ans = length [(y,m,d) | y <- [1901..2000], m <- [1..12], let (_, _, d) = toWeekDate $ fromGregorian y m 1, d == 7]
stefan-j/ProjectEuler
q19.hs
mit
271
0
12
124
99
55
44
6
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-opsworks/gen/Network/AWS/OpsWorks/DescribeUserProfiles.hs
mpl-2.0
4,524
0
10
842
560
337
223
63
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Network.AWS.Route53Domains.Types.Sum ...
olorin/amazonka
amazonka-route53-domains/gen/Network/AWS/Route53Domains/Types/Sum.hs
mpl-2.0
22,405
0
12
9,025
5,810
2,914
2,896
919
0
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} module Snap.Internal.Http.Server.Socket.Tests (tests) where ------------------------------------------------------------------------------ import Control.Applicative ((<$>)) import qu...
23Skidoo/snap-server
test/Snap/Internal/Http/Server/Socket/Tests.hs
bsd-3-clause
6,678
0
20
1,872
1,410
729
681
59
1
module BootImport where data Foo = Foo Int
mpickering/ghc-exactprint
tests/examples/ghc710/BootImport.hs
bsd-3-clause
44
0
6
9
13
8
5
2
0