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 FlexibleInstances #-} module Distribution.Server.Framework.MemSize ( MemSize(..), memSizeMb, memSizeKb, memSize0, memSize1, memSize2, memSize3, memSize4, memSize5, memSize6, memSize7, memSize10, memSizeUArray, memSizeUVector ) where import Data.Word import qualified Data.Map as Map import Data...
ocharles/hackage-server
Distribution/Server/Framework/MemSize.hs
bsd-3-clause
7,226
0
15
2,011
2,774
1,455
1,319
158
1
import StackTest main :: IO () main = do -- Newer Cabal: dry run and building should succeed, because they'll -- both ignore the do-not-build writeFile "stack.yaml" "resolver: ghc-8.0.2" stack ["build", "--dry-run"] stack ["build"] -- Older Cabal: both should fail, because they'll both try to -- include...
anton-dessiatov/stack
test/integration/tests/cabal-non-buildable-bug/Main.hs
bsd-3-clause
628
0
8
118
84
43
41
9
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="es-ES"> <title>Report Generation</title> <maps> <homeID>reports</homeID> <mapref locati...
kingthorin/zap-extensions
addOns/reports/src/main/javahelp/org/zaproxy/addon/reports/resources/help_es_ES/helpset_es_ES.hs
apache-2.0
966
82
52
156
390
206
184
-1
-1
{-# LANGUAGE OverloadedStrings #-} module Lamdu.GUI.ExpressionEdit.HoleEdit.Open ( make ) where import Control.Applicative (Applicative(..), (<$>), (<$), (<|>)) import Control.Lens.Operators import Control.Monad (guard, msum, when) import Control.MonadA (MonadA) import Data.List.Lens (suffixed) import Data.Maybe (...
schell/lamdu
Lamdu/GUI/ExpressionEdit/HoleEdit/Open.hs
gpl-3.0
15,058
0
21
2,768
4,152
2,155
1,997
-1
-1
module Hidden1 where import Control.Parallel.Strategies hiding (rdeepseq) fib t n | n <= 1 = 1 | otherwise = n1_2 + n2_2 + 1 where n1 = fib 20 (n-1) n2 = fib 20 (n-2) (n1_2, n2_2) = runEval (do n1_2 <- rpar_abs_1 n1 ...
RefactoringTools/HaRe
old/testing/introDeepSeq/Hidden1_TokOut.hs
bsd-3-clause
515
0
12
256
175
88
87
17
1
module GitHub.Gists.Comments where import GitHub.Internal gistComments i = "/gists/" <> i <> "/comments" gistComment gi ci = gistComments gi <> "/" <> ci --| GET /gists/:gist_id/comments listGistComments :: Int -> GitHub GistCommentsData listGistComments = ghGet . gistComments --| GET /gists/:gist_id/comments/:id g...
SaneApp/github-api
src/GitHub/Gists/Comments.hs
mit
895
30
10
136
361
178
183
-1
-1
{-# LANGUAGE OverloadedStrings #-} module Codec.Soten.Importer.StlImporterTest where import Test.Hspec import Codec.Soten.BaseImporter import Codec.Soten.Importer.StlImporter import Codec.Soten.Util stlImporterTest :: Spec stlImporterTest = do describe "STL Importer" $ do context "CanImport" $ do it "Che...
triplepointfive/soten
test/Codec/Soten/Importer/StlImporterTest.hs
mit
941
0
17
195
195
97
98
22
1
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.CryptoKey (js_getType, getType, js_getExtractable, getExtractable, js_getAlgorithm, getAlgorithm, js_getUsages, getUsages, CryptoKey, castToCryptoKey, gTypeCryptoKey) where import Pre...
manyoo/ghcjs-dom
ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/CryptoKey.hs
mit
2,445
24
10
309
598
357
241
37
1
{-# LANGUAGE DeriveFunctor, FlexibleContexts, MultiParamTypeClasses, TupleSections, TypeOperators #-} {-| An effect for logging -} module Hevents.Eff.Log where import Control.Arrow (second) import Control.Eff import Control.Eff.Lift (Lift, lift) import Data.Typeable -- |The ...
abailly/hevents
src/Hevents/Eff/Log.hs
mit
1,410
0
11
321
433
234
199
20
1
module XMonad.Javran.Config.Workspace ( workspaceIds , workspaceName ) where import Data.Maybe (fromMaybe) import XMonad.Core hiding (workspaces) workspaceIds :: [WorkspaceId] workspaceIds = fst <$> workspaceItems workspaceItems :: [(WorkspaceId, String)] workspaceItems = zip (show <$> [1 :: Int ..]) $ words "...
Javran/xmonad-javran
src/XMonad/Javran/Config/Workspace.hs
mit
441
0
9
67
126
73
53
11
1
module System.USB.WMRX00 ( WMRMessage(..) , WeatherForecast(..) , WindDirection(..) , feedWMRMessageChan ) where import Control.Monad import Control.Monad.IO.Class import System.USB.HID import qualified Data.ByteString ...
gaeldeest/himinn
System/USB/WMRX00.hs
mit
5,371
0
15
2,245
1,528
795
733
108
7
module HW1 where import Prelude hiding (Enum(..), sum) import Data.List hiding (sum) -- Name: Brandon Burgess -- -- * Part 1: Natural numbers -- -- | The natural numbers. data Nat = Zero | Succ Nat deriving (Eq,Show) -- | The number 0. zero :: Nat zero = Zero -- | The number 1. one :: Nat one = ...
siphayne/CS381
HW1/hw1.hs
mit
3,462
0
10
896
811
488
323
54
2
-- |Netrium is Copyright Anthony Waite, Dave Hewett, Shaun Laurens & Contributors 2009-2018, and files herein are licensed -- |under the MIT license, the text of which can be found in license.txt -- -- Date functions that are sensitive to various kinds of calendars. -- -- A 'Calendar' type is provided which allows us ...
netrium/Netrium
share/Calendar.hs
mit
22,271
0
15
4,929
7,732
4,299
3,433
515
4
quickSort :: (Ord a) => [a] -> [a] quickSort [] = [] quickSort (x:xs) = quickSort [a | a <- xs, a <= x] ++ [x] ++ quickSort [b | b <- xs, b > x] -- quickSort [3,2,1] ++ [4] ++ [] ++ [5] ++ [] -- quickSort [2,1] ++ [3] ++ [] ++ [4] ++ [] -- quickSort [1] ++ [2] ++ [] ++ [3] ++ [4] ++ [] -- [] ++ [1] ++ [] ++ [2] ++ [] ...
RAFIRAF/HASKELL
quickSort2.hs
mit
339
0
10
87
111
60
51
3
1
module ListT.HTMLParser.Prelude ( module Exports, ) where import BasePrelude as Exports import MTLPrelude as Exports hiding (Error, shift) import Control.Monad.Trans.Either as Exports hiding (left, right) import ListT as Exports (ListT) import Data.Text as Exports (Text) import Conversion as Exports import Conversio...
nikita-volkov/list-t-html-parser
library/ListT/HTMLParser/Prelude.hs
mit
339
0
5
47
85
61
24
10
0
{-# LANGUAGE Haskell2010 , GeneralizedNewtypeDeriving , DeriveDataTypeable , CPP , FlexibleContexts #-} {-# OPTIONS -Wall -fno-warn-missing-signatures -fno-warn-name-shadowing #-} -- | INTERNAL module: -- The Java Monad Transformer. Most of its API is re-exported by "Foreign.Java" module ...
fehu/haskell-java-bridge-fork
src/Foreign/Java/JavaMonad.hs
mit
9,914
0
15
2,165
1,772
980
792
120
2
main = do putStrLn "Hello, what's your name?" name <- getLine putStrLn ("Hey " ++ name ++ ", you rock!!")
rglew/lyah
getname.hs
mit
113
0
10
27
36
16
20
4
1
module Main where import Data.List import Data.Maybe import Data.Char ------------------------------------------------------------------------------------------------- ----------------------------------------------- Parser ------------------------------------------ type Parser symbol result = [symbol] -> [([symbol], ...
murukeshm/scratchpad
haskell/133059001.hs
gpl-2.0
19,765
336
19
5,047
9,630
5,294
4,336
458
11
{- Programa Haskell -}
saxsoares/PARADIGMAS
HASKELL/haskell1.hs
gpl-2.0
24
0
2
5
3
2
1
1
0
{- | Module : $EmptyHeader$ Description : <optional short description entry> Copyright : (c) <Authors or Affiliations> License : GPLv2 or higher, see LICENSE.txt Maintainer : <email> Stability : unstable | experimental | provisional | stable | frozen Portability : portable | non-portable (<reason>...
nevrenato/Hets_Fork
Search/SPASS/UnWrap.hs
gpl-2.0
3,593
1
15
761
991
524
467
64
6
module Display(display) where import Expr import Data.ByteString.Char8 hiding (head, replicate) data Child = Leaf | Child1 Size | Child2 Size Size type DStr = String -> String type Size = ((Int,Int,Int),Child) height :: Size -> Int height ((t,b,_),_) = b-t+1 display :: Expr -> ByteString displa...
phi16/ASCIIize
Display.hs
gpl-3.0
2,906
0
14
796
1,899
1,053
846
86
12
{-# LANGUAGE OverloadedStrings #-} -- | Properties from the org.mpris.MediaPlayer2.Player interface -- -- All properties are currently read-only -- -- More information at <http://specifications.freedesktop.org/mpris-spec/latest/Player_Interface.html> module DBus.Mpris.MediaPlayer2.Player.Properties ( PlaybackSt...
Fuco1/mpris
src/DBus/Mpris/MediaPlayer2/Player/Properties.hs
gpl-3.0
4,491
0
15
860
987
545
442
85
1
module Main where gerarLinha :: Int -> Int -> Int -> [Int] -> [Int] gerarLinha x xA n listaI | xA >= n = listaI | otherwise = (funcaoAuxiliar x xA) : (gerarLinha x (xA+1) n listaI) funcaoAuxiliar :: Int -> Int -> Int funcaoAuxiliar x xA | x == xA = 1 | otherwise = 0 gerarMatrizIdentidade :: Int -> [[Int...
llscm0202/BIGDATA2017
ATIVIDADE1/exerciciosMatrizes/ex3.hs
gpl-3.0
850
0
13
151
445
236
209
20
1
-- Parser generated by Pappy - do not edit module Lojban where import Pappy.Pos import Pappy.Parse import Pappy.Basic {-# LINE 4 "Lojban.pappy" #-} import JboSyntax import Logic hiding (Term,Connective) import Data.Maybe import Control.Monad.State import Data.Map (Map) import qualified Data.Map as Map import Data.Ch...
lagleki/tersmu-0.2
Lojban.hs
gpl-3.0
612,863
423
46
246,822
156,505
75,858
80,647
11,157
407
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/ManagedConfigurationsforDevice/List.hs
mpl-2.0
6,441
0
22
1,546
866
503
363
135
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
dysinger/amazonka
amazonka-datapipeline/gen/Network/AWS/DataPipeline/QueryObjects.hs
mpl-2.0
6,730
0
14
1,562
947
561
386
98
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/WebApps/Insert.hs
mpl-2.0
4,939
0
19
1,195
786
457
329
115
1
module Main where import System.Environment (getArgs) import System.Directory main :: IO () main = do args <- getArgs mapM_ createDirectory args
tyoko-dev/coreutils-haskell
src/mkdir.hs
agpl-3.0
156
0
7
32
49
26
23
6
1
module StoryMode.Menus ( storyMode, ) where import Data.Map (lookup, findWithDefault) import Data.Initial import System.FilePath import Utils hiding (tryReadMVar) import Base import Editor.Pickle.LevelFile import StoryMode.Types import StoryMode.Configuration import StoryMode.Episode -- * story mode menu ...
nikki-and-the-robots/nikki
src/StoryMode/Menus.hs
lgpl-3.0
3,249
0
18
802
991
503
488
72
4
ans (n:d) = let s = sum d a = s `div` n in a main = do c <- getContents let i = map read $ lines c :: [Int] o = ans i print o
a143753/AOJ
0134.hs
apache-2.0
153
0
11
64
92
45
47
9
1
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QRadioButton.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:15 Warning : this file is machine generated - do ...
keera-studios/hsQt
Qtc/Gui/QRadioButton.hs
bsd-2-clause
47,316
0
14
7,528
15,099
7,657
7,442
-1
-1
----------------------------------------------------------------------------- -- | -- Module : Haddock.Backends.Html.Themes -- Copyright : (c) Mark Lentczner 2010 -- License : BSD-like -- -- Maintainer : haddock@projects.haskell.org -- Stability : experimental -- Portability : portable -------------...
haskell/haddock
haddock-api/src/Haddock/Backends/Xhtml/Themes.hs
bsd-2-clause
6,722
0
14
1,227
1,602
844
758
107
6
module Prelude.Minimal ( -- * Basic data types -- ** @Bool@ Bool(False, True), (&&), (||), not, otherwise, -- ** @Maybe@ Maybe(Nothing, Just), fromMaybe, isNothing, isJust, -- ** @Either@ Either(Left, Right), isLeft, isRight, -- ** @Tuple@ fst, snd, curry, uncurry, ...
duncanburke/prelude-minimal
Prelude/Minimal.hs
bsd-2-clause
3,848
0
6
932
910
703
207
141
0
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE OverloadedStrings #-} module Main ( main ) where import Control.Exception ( bracket ) import Data.Maybe ( fromMaybe ) import qualified Data.Set as Set import Distribution.Nixpkgs.Fetch import Distribution.Nixpkgs.Haskell import Distribution.Nixpkgs.Haskell.FromCabal impor...
psibi/cabal2nix
src/cabal2nix.hs
bsd-3-clause
7,335
0
41
2,415
1,465
764
701
-1
-1
{-# LANGUAGE FlexibleContexts #-} {-| Module : PolyPaver.Eval Description : evaluation of a formula over a box Copyright : (c) Jan Duracz, Michal Konecny License : BSD3 Maintainer : jan@duracz.net Stability : experimental Portability : portable Evaluation of a f...
michalkonecny/polypaver
src/PolyPaver/Eval.hs
bsd-3-clause
29,309
0
21
10,541
7,018
3,602
3,416
456
32
module Andromeda.Types.Language.ControlFlow ( module X ) where import Andromeda.Types.Language.ControlFlow.ControlFlow as X
graninas/Andromeda
src/Andromeda/Types/Language/ControlFlow.hs
bsd-3-clause
125
0
4
12
24
18
6
2
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} -- -- Regs.hs --- SPI peripheral registers for the STM32 -- -- Copyright (C) 2013, Galois, Inc. -- All Rights Reserved. -- module Ivory.BSP.STM32.Peripheral.SPI.Regs where import Ivory.Lan...
GaloisInc/ivory-tower-stm32
ivory-bsp-stm32/src/Ivory/BSP/STM32/Peripheral/SPI/Regs.hs
bsd-3-clause
1,653
0
4
523
43
35
8
8
0
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-do-bind #-} module Purescript.Ide.Externs ( ExternParse, ExternDecl(..), Fixity(..), readExternFile, parseExternDecl, typeParse ) where import Data.Char (digitToInt) import Data.Text (Text...
passy/psc-ide
lib/Purescript/Ide/Externs.hs
bsd-3-clause
3,059
0
12
765
968
491
477
97
2
module MB.Types ( Blog(..) , StartupConfig(..) , BlogM , GenEvent(..) , GenState(..) , Post(..) , Template , ChangeSummary(..) , Page(..) , Processor(..) , RenderCause(..) , BlogInputFS(..) , BlogOutputFS(..) , BlogInputFSState(..) , nullProcessor , noChan...
jtdaugherty/mathblog
src/MB/Types.hs
bsd-3-clause
7,574
0
14
2,871
1,542
911
631
173
1
module Problem8 where import Data.Char (digitToInt) import Data.Function (on) import Data.List (maximumBy) -- -- Problem 8: Largest product in a series -- -- The four adjacent digits in the 1000-digit number that have the greatest -- product are 9 × 9 × 8 × 9 = 5832. -- -- Find t...
c0deaddict/project-euler
src/Part1/Problem8.hs
bsd-3-clause
1,916
0
11
288
155
86
69
12
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ViewPatterns #-} -- | Main stack tool entry point. module Main where import Control.Exception import Control.Mon...
mietek/stack
src/main/Main.hs
bsd-3-clause
21,663
0
23
8,114
4,486
2,256
2,230
475
9
{- Wrap.hs (adapted from wrap.c which is (c) Silicon Graphics, Inc) Copyright (c) Sven Panne 2002-2005 <sven.panne@aedion.de> This file is part of HOpenGL and distributed under a BSD-style license See the file libraries/GLUT/LICENSE This program texture maps a checkerboard image onto two rectangles. Th...
FranklinChen/hugs98-plus-Sep2006
packages/GLUT/examples/RedBook/Wrap.hs
bsd-3-clause
4,458
0
18
1,088
1,360
659
701
85
2
{-# LANGUAGE FlexibleInstances, GeneralizedNewtypeDeriving, TypeSynonymInstances #-} module Folly.DSL ( module Folly.FOL , module Folly.DSL ) where import Control.Monad import Control.Monad.State import Control.Applicative hiding (empty) import Folly.FOL hiding ((===),(!=),(&),(/\),(\/),(==>),(<=>),mk...
danr/folly
Folly/DSL.hs
bsd-3-clause
3,629
0
14
789
1,610
899
711
88
1
{-# LANGUAGE ForeignFunctionInterface #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE RecursiveDo #-} {-# LANGUAGE Trustworthy #-} module GHC.Event.NoIO( ensureIOManagerIsRunning , ioManagerCapabilitiesChanged , threadDelay , registerDelay , threadWaitRead , threadWaitRea...
GaloisInc/halvm-ghc
libraries/base/GHC/Event/NoIO.hs
bsd-3-clause
3,137
0
14
886
939
470
469
85
3
{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE TemplateHaskell #-} module NN.Backend.Torch.Torch where import Data.Word import Gen.Caffe.ConvolutionParameter as CP import Gen.Caffe.DropoutParameter as DP import Gen.Caffe.InnerProductParameter as IP import ...
ajtulloch/dnngraph
NN/Backend/Torch/Torch.hs
bsd-3-clause
3,617
0
13
1,090
1,004
550
454
-1
-1
{-# LANGUAGE RecordWildCards #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Hooks.DynamicIcons -- Description : Dynamically update workspace names based on its contents\/windows on it. -- Copyright : (c) Will Pierlot <willp@outlook.com.au> -- License ...
xmonad/xmonad-contrib
XMonad/Hooks/DynamicIcons.hs
bsd-3-clause
7,155
0
13
1,403
981
582
399
-1
-1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeSynonymInstances #-} -- | Keeps the tracing API calls separate from the Tracer implementation, -- which allows us to avoid a nasty import cycle between tracing and -- the messaging primitives that rely on it, and also between the node -- controller (which requires a...
haskell-distributed/distributed-process
src/Control/Distributed/Process/Management/Internal/Trace/Primitives.hs
bsd-3-clause
5,940
0
16
1,180
1,155
643
512
116
3
{-# LANGUAGE TypeOperators #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} module EFA.Signal.Record where import qualified EFA.Signal.Signal as S import qualified EFA.Signal.Data as D import qualified EFA.Signal.Vector as V import EFA.Signal.Signal (TC(TC), Range(Range), ...
energyflowanalysis/efa-2.1
src/EFA/Signal/Record.hs
bsd-3-clause
26,147
0
18
7,576
8,956
4,684
4,272
490
2
{-# LANGUAGE OverloadedStrings #-} module Main ( main ) where import Test.Hspec import Test.QuickCheck import qualified Data.ByteString as BS import qualified Data.Text as T import Codec.Rot13 main :: IO () main = hspec $ do describe "Codec.Rot13" $ do it "corre...
kvanberendonck/codec-rot13
test/Spec.hs
bsd-3-clause
1,371
0
19
344
318
164
154
28
1
{-# LANGUAGE Rank2Types, ImpredicativeTypes #-} module Main where import Test.QuickCheck import qualified Data.FMList as F import qualified Data.List as L import qualified Data.Foldable as DF t1 t ff lf = quickCheck ((\s -> not(t s) || ((F.toList . ff . F.fromList) s == lf s)) :: [Int] -> Bool) t2 t ff lf = quickC...
sjoerdvisscher/fmlist
tests.hs
bsd-3-clause
1,753
0
17
439
1,073
551
522
40
1
-- Copyright (c) 2016-present, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. {-# LANGUAGE OverloadedStrings #-} module Duckling.Time.GA.Corpus ( corpus ) where import Data.String impor...
facebookincubator/duckling
Duckling/Time/GA/Corpus.hs
bsd-3-clause
1,632
0
10
542
460
280
180
36
1
{-# LINE 1 "GHC.Event.Unique.hs" #-} {-# LANGUAGE Trustworthy #-} {-# LANGUAGE BangPatterns, GeneralizedNewtypeDeriving, NoImplicitPrelude #-} module GHC.Event.Unique ( UniqueSource , Unique(..) , newSource , newUnique ) where import Data.Int (Int64) import GHC.Base import GHC.Conc.Sync (TVa...
phischu/fragnix
builtins/base/GHC.Event.Unique.hs
bsd-3-clause
1,158
0
11
222
255
147
108
27
1
import Dna ( compl ) -- | Given a strand takes its reverse complement, -- where 'A' <-> 'T', 'C' <-> 'G' are complements -- -- >>> AAAACCCGGT -- ACCGGGTTTT revc :: String -> String revc = show . map Dna.compl . read . reverse main = interact revc
mitochon/hoosalind
src/problems/revc.hs
mit
250
0
9
52
53
30
23
4
1
import Test.Hspec (Spec, it, shouldBe) import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith) import SecretHandshake (handshake) main :: IO () main = hspecWith defaultConfig {configFastFail = True} specs specs :: Spec specs = do it "wink for 1" $ handshake (1 :: Int) `shouldBe` ["wink"...
enolive/exercism
haskell/secret-handshake/test/Tests.hs
mit
1,297
0
10
315
410
226
184
29
1
{- | Module : $Header$ - Description : Implementation of logic instance Mon - Copyright : (c) Daniel Hausmann & Georgel Calin & Lutz Schroeder, DFKI Lab Bremen, - Rob Myers & Dirk Pattinson, Department of Computing, ICL - License : GPLv2 or higher, see LICENSE.txt - Maintainer : haus...
nevrenato/Hets_Fork
GMP/versioning/gmp-coloss-0.0.3/GMP/Logics/Mon.hs
gpl-2.0
2,347
0
20
547
477
258
219
-1
-1
---------------------------------------------------- -- -- -- HyLoRes.Statistics: -- -- Functions that collect and print out -- -- statistics -- -- -- --...
nevrenato/HyLoRes_Source
src/HyLoRes/Statistics.hs
gpl-2.0
11,265
0
15
3,335
2,890
1,494
1,396
-1
-1
{-# LANGUAGE OverloadedStrings #-} {- | Module: TestMaker.Problems Description: Parses the tex that holds the problem sets Copyright: (c) Chris Godbout License: GPLv3 Maintainer: chris@mathologist.net Stability: experimental Portability: portable -} module TestMaker.Problems where import qualified Data.ByteString ...
mathologist/hTestMaker
testmaker/src/TestMaker/Problems.hs
gpl-3.0
5,226
0
17
1,202
1,291
640
651
101
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-rds/gen/Network/AWS/RDS/PromoteReadReplica.hs
mpl-2.0
6,540
0
13
1,229
741
456
285
89
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} -- | A collection of example programs that might be interesting to look at -- during execution. module Stg.ExamplePrograms ( -- * Simple introductory programs implies, addTwoNumbers, calculateLength, mapNot, ...
quchen/stg
src/Stg/ExamplePrograms.hs
bsd-3-clause
12,734
0
8
3,615
1,236
798
438
140
1
{-# LANGUAGE OverloadedStrings, TemplateHaskell, FunctionalDependencies #-} module SecondTransfer.Http1.Types ( HttpRequest (..) , headers_Rq , body_Rq , HttpResponse ...
shimmercat/second-transfer
hs-src/SecondTransfer/Http1/Types.hs
bsd-3-clause
2,464
0
11
871
279
168
111
-1
-1
{-# LANGUAGE Haskell98 #-} {-# LINE 1 "Data/Text.hs" #-} {-# LANGUAGE BangPatterns, CPP, MagicHash, Rank2Types, UnboxedTuples #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE Trustworthy #-} {-# LANGUAGE TypeFamilies #-} -- | -- Module : Data.T...
phischu/fragnix
tests/packages/scotty/Data.Text.hs
bsd-3-clause
58,643
0
18
14,070
10,453
5,763
4,690
783
3
{- hlint configuration for hledger manual: http://community.haskell.org/~ndm/darcs/hlint/hlint.htm examples: ignore "Eta reduce" = "" - suppress all eta reduction suggestions. ignore "Eta reduce" = Data.List Prelude - suppress eta reduction hints in the Prelude and Data.List modules. ignore ...
kmels/hledger
hledger/hlint.hs
gpl-3.0
705
0
5
189
15
8
7
2
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-elasticache/gen/Network/AWS/ElastiCache/CreateCacheParameterGroup.hs
mpl-2.0
5,364
0
9
1,063
560
342
218
73
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-sns/gen/Network/AWS/SNS/Subscribe.hs
mpl-2.0
5,137
0
9
1,117
584
360
224
67
1
module StoryMode.AutoUpdate where import Control.Monad.Trans.Error import Utils import Base import StoryMode.Client import StoryMode.Purchasing -- | auto updating of the storymode update :: Configuration -> Application -> (Prose -> IO ()) -> ErrorT String IO () update config app logCommand = catchSomeExceptions...
geocurnoff/nikki
src/StoryMode/AutoUpdate.hs
lgpl-3.0
742
0
14
158
188
97
91
16
2
{-| Module : Idris.Info Description : Get information about Idris. Copyright : 2016 The Idris Community License : BSD3 Maintainer : The Idris Community. -} module Idris.Info ( getIdrisDataDir , getIdrisCRTSDir , getIdrisJSRTSDir , getIdrisLibDir , getIdrisDocDir , getIdrisFlagsLib , getIdrisFl...
bravit/Idris-dev
src/Idris/Info.hs
bsd-3-clause
2,296
0
10
337
450
252
198
63
2
<?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="zh-CN"> <title>Windows WebDrivers</title> <maps> <homeID>top</homeID> <mapref location=...
kingthorin/zap-extensions
addOns/webdrivers/webdriverwindows/src/main/javahelp/org/zaproxy/zap/extension/webdriverwindows/resources/help_zh_CN/helpset_zh_CN.hs
apache-2.0
963
82
52
156
390
206
184
-1
-1
{-# LANGUAGE CPP #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternSynonyms #-} module Lazyfoo.Lesson04 (main) where import Prelude hiding (any, mapM_) import Control.Monad hiding (mapM_) import Data.Foldable import Data.Maybe import Data.Monoid import F...
dalaing/sdl2
examples/lazyfoo/Lesson04.hs
bsd-3-clause
2,473
0
27
694
602
299
303
59
7
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TemplateHaskell #-} module Ros.Test_srvs.AddTwoIntsRequest where import qualified Prelude as P import Prelude ((.), (+), (*)) import qualified Data.Typeable as T import Control.Applicative import Ros.Inter...
bitemyapp/roshask
Tests/test_srvs/golden/AddTwoIntsRequest.hs
bsd-3-clause
1,693
1
11
313
450
258
192
40
0
-- #2735 module Bug where data S = S { s1 :: (), s2 :: () } f s = s { s1 = (), s2 = s1 s }
sdiehl/ghc
testsuite/tests/typecheck/should_compile/T2735.hs
bsd-3-clause
94
0
9
33
57
34
23
3
1
import Test.HUnit (Assertion, (@=?), runTestTT, Test(..), Counts(..)) import System.Exit (ExitCode(..), exitWith) import Grains (square, total) exitProperly :: IO Counts -> IO () exitProperly m = do counts <- m exitWith $ if failures counts /= 0 || errors counts /= 0 then ExitFailure 1 else ExitSuccess testCase :...
tonyfischetti/exercism
haskell/grains/grains_test.hs
mit
1,042
0
12
238
413
210
203
32
2
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TemplateHaskell #-} -- | An implementation of restricted, linear undo, as described in: -- -- > T. Berlage, "A selective undo mechanism for graphical user interfaces -- > based on command objects", ACM Transactions on Compute...
siddhanathan/yi
yi-core/src/Yi/Buffer/Undo.hs
gpl-2.0
6,977
0
17
1,675
1,219
692
527
85
6
{-# LANGUAGE MagicHash #-} module Main where data T a = MkT { runT :: a, (##) :: a } deriving (Read, Show) data T# a = MkT# { runT# :: a, (###) :: a } deriving (Read, Show) t1, t2 :: T Int t1 = MkT (-1) 1 t2 = read $ show t1 t1#, t2# :: T# Int t1# = MkT# (-1) 1 t2# = read $ show t1# main :: IO () main = do pr...
sdiehl/ghc
testsuite/tests/deriving/should_run/T14918.hs
bsd-3-clause
339
6
8
94
176
100
76
14
1
{-# LANGUAGE UnboxedSums, MagicHash #-} module Main where type Ty = (# (Int -> Int) | (Int -> Int) #) {-# NOINLINE apply #-} apply :: Ty -> Int apply (# f | #) = f 0 apply (# | f #) = f 1 main :: IO () main = do print (apply (# (\x -> x * 2) | #)) print (apply (# | (\x -> x * 3) #))
olsner/ghc
testsuite/tests/unboxedsums/unboxedsums10.hs
bsd-3-clause
292
0
13
80
137
75
62
11
1
{- rrdgraph-haskell – Haskell DSL for rendering RRD graphs using RRDtool Copyright © 2011 Johan Kiviniemi <devel@johan.kiviniemi.name> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission no...
ion1/rrdgraph-haskell
Data/RRDGraph/State.hs
isc
4,344
0
15
885
711
379
332
65
5
----------------------------------------------------------------------------- -- -- Module : Language.PureScript.CodeGen.JS.Optimizer.Inliner -- Copyright : (c) Phil Freeman 2013-14 -- License : MIT -- -- Maintainer : Phil Freeman <paf31@cantab.net> -- Stability : experimental -- Portability : -- -- ...
michaelficarra/purescript
src/Language/PureScript/CodeGen/JS/Optimizer/Inliner.hs
mit
11,775
0
20
2,406
4,499
2,367
2,132
237
16
{-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE NamedFieldPuns #-} module Graphics.Ray.Types.Shape ( Shape(..) , SomeShape(..) , Texture(..) , sphere , triangle , plane ) where import Control.Exception.Base (assert) import Data.Colour (Colour) im...
matklad/raytracer
src/Graphics/Ray/Types/Shape.hs
mit
5,691
0
14
1,832
1,513
856
657
156
1
{-| Module : Text.LParse.Parser Description : Core for LParse Copyright : (c) Marcus Völker, 2017-2018 License : MIT Maintainer : marcus.voelker@rwth-aachen.de This module implements LParse's core: The parser data structure, instances of the important typeclasses and functions to run the parser -} module T...
MarcusVoelker/LParse
src/Text/LParse/Parser.hs
mit
4,233
0
20
868
1,192
639
553
46
1
module Core( coreServer , module X ) where import Core.Context as X import Core.Monad as X import Core.Event as X import Core.Message as X import Core.State as X import Core.Log as X import Core.Indexed as X import Core.CoreEvent as X import Network.Transport import Control.Concurrent import Control.Mo...
NCrashed/sinister
src/server/Core.hs
mit
8,323
0
41
3,070
1,988
969
1,019
155
21
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DerivingVia #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE StandaloneDeriving #-} {-# OPTIONS_GHC -Wno-orphans #-} module Unison.Server.Types where -- Types common to endpoints -- import Data.Aeson import qual...
unisonweb/platform
parser-typechecker/src/Unison/Server/Types.hs
mit
6,037
0
10
967
1,549
864
685
-1
-1
import Debug.Trace (trace) -- Try to implement and use a `putString` function without the RW and -- see the behaviour of calling it and calling it multiple times -- type RW = RW type RW = Integer type MIO a = (RW -> (a, RW)) -- Try not to put `(show w)` in the trace and look at the order of the traces putString :: ...
Muzietto/transformerz
haskell/IO_inside/gist.hs
mit
1,614
0
15
457
488
259
229
26
2
{-# LANGUAGE CPP #-} module GHCJS.DOM.Internals ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.Internals #else #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) import GHCJS.DOM.JSFFI.Generated.Int...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/Internals.hs
mit
340
0
5
33
33
26
7
4
0
-- Using names.txt (right click and 'Save Link/Target As...'), a 46K text file containing over five-thousand first names, begin by sorting it into alphabetical order. Then working out the alphabetical value for each name, multiply this value by its alphabetical position in the list to obtain a name score. -- For examp...
daniel-beard/projecteulerhaskell
Problems/p22.hs
mit
997
0
14
215
189
97
92
14
1
{-# LANGUAGE OverloadedStrings #-} module ResponseHeaderSpec (main, spec) where import Data.ByteString import qualified Network.HTTP.Types as H import Network.Wai.Handler.Warp.ResponseHeader import Network.Wai.Handler.Warp.Response import Network.Wai.Handler.Warp.Header import Network.Wai.Handler.Warp.HTTP2.HPACK imp...
creichert/wai
warp/test/ResponseHeaderSpec.hs
mit
3,150
0
17
957
816
433
383
74
1
{- | Module : Tarefa1 - LI1 Description : Módulo Haskell que contém as funções da Tarefa 1 do Projeto de Laboratórios de Informática I. Copyright: Rogério Moreira <a74634@alunos.uminho.pt> Samuel Ferreira <a76507@alunos.uminho.pt> Módulo da Tarefa 1 que contém as funções relativas à verificação dos tabule...
rgllm/uminho
01/LI1/lightbot/src/TA/tarefa1.hs
mit
4,778
0
16
1,276
1,278
659
619
69
2
-- This is the land of the orphans, so NO WHINING {-# OPTIONS_GHC -fno-warn-orphans #-} module Control.Dangerous.Extensions where import Prelude hiding ( log ) import Control.Dangerous import Control.Monad.Cont import Control.Monad.Maybe import Control.Monad.Reader import Control.Monad.State import Control.Monad.Writer...
Soares/Dangerous.hs
src/Control/Dangerous/Extensions.hs
mit
830
0
7
177
272
153
119
24
0
{- Create a list containing all integers within a given range. -} {- Simplest solution could be 'range a y = [x..y] -} range :: Int -> Int -> [Int] range x y | x > y = error "x cannot be lower than y" | x == y = [x] | otherwise = [x] ++ range (x + 1) y
andrewaguiar/s99-haskell
p22.hs
mit
282
0
9
89
86
43
43
4
1
{-# LANGUAGE OverloadedStrings , OverloadedLists #-} module Network.NTCE.FlowRecord.Pretty (renderText, renderBS) where import Text.PrettyPrint.Leijen.Text import Data.Text.Encoding import Data.Text (Text) import qualified Data.Text as T import Data.Text.Lazy (fromChunks, toChunks) import Data.ByteString (B...
voidlizard/ntced-tcp-proxy
src/Network/NTCE/FlowRecord/Pretty.hs
mit
1,275
0
15
546
335
184
151
29
2
import Data.Char import Data.List import Data.Maybe main = do contents <- readFile "day15input.txt" let result = compute $ map words $ lines contents print result type Disk = (Int, Int) compute :: [[String]] -> Int compute input = findValidTime $ parse input ++ [(11, 0)] findVali...
aBhallo/AoC2016
Day 15/day15part2.hs
mit
808
0
19
190
388
206
182
18
1
module Main (main, spec) where import Prelude import Test.Hspec.Core.Spec import Test.Hspec.Core.Runner import Test.Hspec.Expectations import Test.QuickCheck main :: IO () main = hspec spec spec :: Spec spec = do describe "reverse" $ do it "reverses a list" $ do reverse [1 :: Int, 2, 3] `shouldBe` [3, 2,...
hspec/hspec
hspec-core/example/Spec.hs
mit
442
0
15
96
163
92
71
15
1
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE PatternGuards #-} -- | A sqlite backend for persistent. -- -- Note: If you prepend @...
psibi/persistent
persistent-sqlite/Database/Persist/Sqlite.hs
mit
20,820
0
21
6,285
4,950
2,615
2,335
435
5
{-# OPTIONS_GHC -Wall #-} module Todo.Show (showTask, showTasks, showStatus, showDate) where import Todo.Data import Data.Time (formatTime) showTasks :: [Task] -> String showTasks = unlines . map showTask showTask :: Task -> String showTask t = merge [st, date, text] where merge = unwords . skipEmpty skipE...
nadirs/todohs
src/lib/Todo/Show.hs
mit
720
0
12
195
269
140
129
24
4
{-# OPTIONS -funbox-strict-fields #-} -- | -- This module implements the Kind Inference algorithm, and the routines which -- use the product of kind inference to convert haskell source types into the -- simplified kind annotated types used by the rest of the FrontEnd. module FrontEnd.KindInfer ( kiDecls, KindE...
dec9ue/jhc_copygc
src/FrontEnd/KindInfer.hs
gpl-2.0
24,216
0
18
6,311
8,252
4,038
4,214
-1
-1
-- | Basis functions of various kinds, useful for e.g. use with the LinearRegression module module Algorithms.MachineLearning.BasisFunctions where import Algorithms.MachineLearning.Framework import Algorithms.MachineLearning.LinearAlgebra import Algorithms.MachineLearning.Utilities -- | Basis function that is 1 ever...
batterseapower/machine-learning
Algorithms/MachineLearning/BasisFunctions.hs
gpl-2.0
2,009
0
13
412
338
184
154
22
1
{-# LANGUAGE TemplateHaskell #-} module Helpers(tailN) where import Data.List import Control.Monad import Language.Haskell.TH tailN n e = Data.List.foldr (\_ -> appE (conE (mkName "Tail"))) e [1..n]
laugh-at-me/recurrence
src/Helpers.hs
gpl-3.0
202
0
12
29
74
42
32
6
1
{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} module Control.Monad.Select.Internal ( Packed' (..) , Packed (..) , Select ...
davidspies/regret-solver
select-game/src/Control/Monad/Select/Internal.hs
gpl-3.0
2,389
0
12
617
1,047
550
497
61
3
{-# LANGUAGE RecursiveDo, OverloadedStrings, DeriveDataTypeable #-} module InnerEar.Widgets.Client where import Control.Monad import Data.Maybe import Control.Monad.IO.Class (liftIO) import GHCJS.Types import GHCJS.Marshal.Internal import GHCJS.Foreign.Callback import Data.Map(Map, fromList, empty) impor...
JamieBeverley/InnerEar
src/InnerEar/Widgets/Client.hs
gpl-3.0
4,404
0
22
879
1,174
584
590
73
1
#!/usr/bin/env runhaskell {- hakyll build script for hledger.org requires Hakyll >= 2.1, pandoc >= 1.5 -} import Control.Monad (forM_) import Control.Monad.Trans (liftIO) import System.Process (system) import Text.Hakyll (hakyllWithConfiguration, defaultHakyllConfiguration) import Text.Hakyll.HakyllMonad (HakyllConfigu...
trygvis/hledger
site/hakyll.hs
gpl-3.0
5,765
0
9
1,473
463
297
166
73
1
module Grains (square, total) where import Data.Maybe (mapMaybe) square :: Integral a => a -> Maybe a square 1 = Just 1 square n | n <= 0 = Nothing | n > 64 = Nothing | otherwise = fmap (*2) $ square (n - 1) total :: (Integral a) => a total = sum $ mapMaybe square [1..64]
daewon/til
exercism/haskell/grains/src/Grains.hs
mpl-2.0
282
0
9
68
146
75
71
10
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Products/GetPermissions.hs
mpl-2.0
3,535
0
15
785
385
231
154
65
1