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 FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE ViewPatterns #-} {-# OPTIONS_GHC -fno-warn-missing-methods #-} ----------------------------------------------------------------------------- -- | -- Module : Diagrams.TwoD.Ap...
wherkendell/diagrams-contrib
src/Diagrams/TwoD/Apollonian.hs
bsd-3-clause
8,789
0
16
2,291
1,770
981
789
91
1
{-# OPTIONS -w #-} module Plugin.Free.Type where import Control.Monad import Plugin.Free.Parse import Data.List import Plugin.Free.Util type TyVar = String type TyName = String data Type = TyForall TyVar Type | TyArr Type Type | TyTuple [Type] | TyCons TyName [Type] | TyVar TyVa...
zeekay/lambdabot
Plugin/Free/Type.hs
mit
7,270
0
21
3,801
1,942
959
983
192
19
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE BangPatterns #-} module Network.Wai.Handler.Warp.RequestHeader ( parseHeaderLines ) where import Control.Exception (throwIO) import Control.Monad (when) import qualified Data.ByteString as S import qualified Data.ByteString.Char8 as B (unpack) import Data.Byte...
utdemir/wai
warp/Network/Wai/Handler/Warp/RequestHeader.hs
mit
4,646
0
17
1,247
1,197
643
554
88
2
module LF.ComorphFram ( mapTheory , mapMorphism , mapSen , mapSymb ) where import LF.Morphism import LF.Sign import Common.Result import Common.DocUtils import Common.AS_Annotation import qualified Data.Map as Map import qualified Data.Set as Set import Data.Maybe (fromMaybe, isNothing) mapTheory :: ...
mariefarrell/Hets
LF/ComorphFram.hs
gpl-2.0
5,985
0
19
2,305
1,818
909
909
119
6
module PackageTests.BuildDeps.InternalLibrary0.Check where import Control.Monad import Data.Version import PackageTests.PackageTester import System.FilePath import Test.Tasty.HUnit suite :: Version -> FilePath -> Assertion suite cabalVersion ghcPath = do let spec = PackageSpec { directory = "PackageT...
Helkafen/cabal
Cabal/tests/PackageTests/BuildDeps/InternalLibrary0/Check.hs
bsd-3-clause
742
0
13
180
162
86
76
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="el-GR"> <title>GraalVM JavaScript</title> <maps> <homeID>graaljs</homeID> <mapref locat...
thc202/zap-extensions
addOns/graaljs/src/main/javahelp/help_el_GR/helpset_el_GR.hs
apache-2.0
967
77
66
156
407
206
201
-1
-1
module Pat2 where data P = S P deriving Show zero :: P zero = (error "Z no longer defined for P at line: 4") two :: P two = S ( S (error "Z no longer defined for P at line: 4"))
SAdams601/HaRe
old/testing/removeCon/Pat2_TokOut.hs
bsd-3-clause
183
0
9
48
57
32
25
6
1
{-# LANGUAGE BangPatterns, TemplateHaskell #-} module Distribution.Server.Packages.Index ( writeIncremental, TarIndexEntry(..), legacyExtras, writeLegacy, ) where import qualified Codec.Archive.Tar as Tar ( write ) import qualified Codec.Archive.Tar.Entry as Tar ( Entry(..), f...
ocharles/hackage-server
Distribution/Server/Packages/Index.hs
bsd-3-clause
8,302
0
15
2,071
1,649
892
757
151
4
module Zipper () where import Prelude hiding (reverse) import Data.Set data Stack a = Stack { focus :: !a -- focused thing in this set , up :: [a] -- jokers to the left , down :: [a] } -- jokers to the right {-@ type UListDif a N = {v:[a] | ((not (Se...
mightymoose/liquidhaskell
tests/pos/zipper0.hs
bsd-3-clause
2,049
0
9
564
323
185
138
23
1
-- !!! ds020 -- lazy patterns (in detail) -- {-# LANGUAGE NPlusKPatterns #-} module ShouldCompile where a ~([],[],[]) = [] a ~(~[],~[],~[]) = [] b ~(x:xs:ys) = [] b ~(~x: ~xs: ~ys) = [] c ~x ~ _ ~11111 ~3.14159265 = x d 11 = 4 d 12 = 3 d ~(n+4) = 2 d ~(n+43) = 1 d ~(n+999) = 0 f ~(x@[]) = [...
siddhanathan/ghc
testsuite/tests/deSugar/should_compile/ds020.hs
bsd-3-clause
1,070
9
14
336
752
407
345
35
1
module Data.Source.ByteString where import qualified Data.ByteString as BS import Data.Monoid import Data.Source hiding ( head ) import Data.Word import Prelude hiding ( head, null, take ) head :: Monad m => Transducer m c BS.ByteString (Word8, Source m c BS.ByteString) head = whenChunk f where f a sa | BS.n...
lpeterse/haskell-source
src/Data/Source/ByteString.hs
mit
1,263
0
15
518
500
254
246
26
1
module HaskellMistakes where import Control.Monad.State -- often put an equals by mistake after -- fib n = -- | --fib :: Int -> Int --fib n -- | n <= 1 = 1 -- | otherwise = -- fib (n - 1) + fib (n - 2) fibs = 0 : 1 : zipWith (+) fibs (tail fibs) fib n = evalState (do forM [0..(n-1)] $...
NickAger/LearningHaskell
ParallelConcurrent/ForkExperiments.hsproj/HaskellMistakes.hs
mit
396
0
15
127
143
80
63
9
1
{-# LANGUAGE OverloadedStrings #-} module Biri.Backend.Routes.Automaton ( Automaton(..) , transform ) where import Control.Applicative (pure, (<$>), (<*>)) import Control.Arrow (first, second, (&&&)) import Control.Exception (assert) import Data.IntMap.Strict (IntMap) import qualified Data.IntMap.Strict as IM import ...
am-/biri-lang
src/Biri/Backend/Routes/Automaton.hs
mit
9,215
0
21
2,757
3,140
1,677
1,463
156
3
module Feed where ------------------------------------------------------------------------------ import Snap.Snaplet import Snap.Snaplet.PostgresqlSimple ------------------------------------------------------------------------------ import Application import Users import Errors ---------------------------...
lkania/Haskitter
src/Feed.hs
mit
716
0
13
91
138
75
63
12
1
import Data.Maybe (isNothing) import Utils.Common import Utils.Hierarchy (getChildren) import Utils.Misc (load) data Record = Record Name [Record] deriving (Show) -- Запись для вывода на экран -- Содержит имя конфига и набор дочерних записей для порождённых конфигов main :: IO () main = do st <- load status...
kahless/netm
src/Cmd/Status/Main.hs
mit
1,191
0
14
335
403
210
193
27
1
module Main where import LI11718 import qualified Tarefa1_2017li1g180 as T1 import System.Environment import Text.Read main = do args <- getArgs case args of ["constroi"] -> do str <- getContents let caminho = readMaybe str case caminho of Nothing -...
hpacheco/HAAP
examples/plab/svn/2017li1g180/src/RunT1.hs
mit
492
0
17
162
128
65
63
16
4
module Input where import System.IO import Data.Maybe import Direction import Utils _getInput :: Char -> Int -> IO Int _getInput coord cap = do putStr outString hFlush stdout n <- getLine if allDigit n then let rn = ((read n) :: Int) in if (rn >= 0) && (rn < cap) then return rn e...
crockeo/ballgame
src/Input.hs
mit
1,134
0
15
298
431
209
222
38
3
module IgrepCashbook2 ( CashbookLine(..) , dateRegex , priceRegex , parseWithoutDate ) where -- for new style cashbook import qualified IgrepCashbook as Old ( Item, isCommentLine, parseItemLine ) import Data.String.Utils (join) import Data.Char (isDigit) import Text.Regex.Posix data CashbookLine = -- Comment String...
igrep/igrep-cashbook
hs/IgrepCashbook2.hs
mit
2,383
0
12
494
749
400
349
61
4
-- Copyright © 2012 Julian Blake Kongslie <jblake@omgwallhack.org> -- Licensed under the MIT license. {-# LANGUAGE Arrows #-} module Source.FanfictionNet ( fetchFanfictionNet , infoFanfictionNet ) where import Data.DateTime import Data.Char import Data.List import Text.Regex.Posix import Text.XML.HXT.Cache imp...
jblake/fanfiction
src/Source/FanfictionNet.hs
mit
6,523
14
21
1,574
1,981
988
993
135
3
{-| Module : Database.Orville.PostgreSQL.Internal.QueryCache Copyright : Flipstone Technology Partners 2016-2018 License : MIT -} {-# LANGUAGE FlexibleContexts #-} module Database.Orville.PostgreSQL.Internal.QueryCache ( QueryCached , runQueryCached , selectCached , selectFirstCached , findRecordCached ...
flipstone/orville
orville-postgresql/src/Database/Orville/PostgreSQL/Internal/QueryCache.hs
mit
4,290
0
16
703
1,093
572
521
102
2
import qualified Data.Binary.Put as P import qualified Data.ByteString.Lazy as L import qualified Data.ByteString.Internal as I escrita = do txt <- readFile "Teste.txt" let xs = freq txt let bs = P.runPut (put xs) L.writeFile "Teste.bin" bs freq [] = [] freq (x:xs) = (x,length (filter (==x) xs) + 1) :...
AndressaUmetsu/PapaEhPop
huffman/stringToBin.hs
mit
451
0
12
105
225
117
108
15
1
module GhcPkg where import Control.Applicative import Control.Monad import Data.Char import Data.Maybe import qualified Data.Version as Version import Data.Version hiding (parseVersion) import Text.ParserCombinators.ReadP import System.Process impor...
sol/depends
src/GhcPkg.hs
mit
2,222
0
15
498
771
397
374
56
2
{-# LANGUAGE OverloadedStrings #-} module HlAdif ( adifLogParser , writeTag , writeRecord , writeLog ) where import Control.Applicative import Data.Attoparsec.ByteString.Char8 import Data.Maybe import Data.Monoid import Data.String import Data.ByteString.Char8 (ByteString) import qualified Data.By...
netom/hamloghs
src/HlAdif.hs
mit
2,473
0
21
806
774
394
380
68
7
module Main where import Lib import System.Environment import Control.Monad (liftM) import Repl (runRepl, runOne) main :: IO () main = do args <- getArgs case length args of 0 -> runRepl 1 -> runOne $ args !! 0 otherwise -> putStrLn "Program takes only 0 or 1 argument"
vaibhav276/scheme-compiler
app/Main.hs
mit
305
0
11
83
94
50
44
12
3
{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-missing-import-lists #-} {-# OPTIONS_GHC -fno-warn-implicit-prelude #-} module Paths_rollenKurator ( version, getBinDir, getLibDir, getDataDir, getLibexecDir, getDataFileName, getSysconfDir ) where import qualified Control.Exception as Exception import Data....
flajann2/rollenKurator
dist/dist-sandbox-96085f3c/build/autogen/Paths_rollenKurator.hs
mit
1,905
0
10
223
371
215
156
31
1
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.SVGFESpotLightElement (js_getX, getX, js_getY, getY, js_getZ, getZ, js_getPointsAtX, getPointsAtX, js_getPointsAtY, getPointsAtY, js_getPointsAtZ, getPointsAtZ, js_getSpecularExponent, getSp...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/JSFFI/Generated/SVGFESpotLightElement.hs
mit
5,072
48
11
749
1,035
581
454
82
1
{-# OPTIONS_GHC -fno-warn-orphans #-} {-| Copyright: (c) Guilherme Azzi, 2014 License: MIT Maintainer: ggazzi@inf.ufrgs.br Stability: experimental Provides the core definitions of the public API for Widgets. The internal structure of widgets, defined in the hidden module 'Reactive.Banana.Dzen.Widget', is /NOT/ exporte...
ggazzi/hzen
src/Reactive/Banana/Dzen/Widget.hs
mit
1,509
0
9
266
251
141
110
22
1
{-# LANGUAGE TypeOperators, TypeFamilies, DataKinds, PolyKinds, GADTs #-} module Tuples where --import Data.HList data Z data x :. y = x :. y type family FMap (f :: * -> *) (a :: [*]) :: [*] {- type instance FMap f Z = Z type instance FMap f (x :. y) = (f x) :. (FMap f y) type instance FMap f (x, y) = (f x...
vladfi1/hs-misc
Tuples.hs
mit
575
0
7
152
118
71
47
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-kerberosattributes.html module Stratosphere.ResourceProperties.EMRClusterKerberosAtt...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/EMRClusterKerberosAttributes.hs
mit
4,324
0
13
364
538
304
234
44
1
{-# LANGUAGE OverloadedStrings #-} {-| DRBD proc file parser This module holds the definition of the parser that extracts status information from the DRBD proc file. -} {- Copyright (C) 2012 Google Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public...
ribag/ganeti-experiments
src/Ganeti/Storage/Drbd/Parser.hs
gpl-2.0
13,128
0
26
3,135
2,911
1,432
1,479
266
4
{-# OPTIONS_GHC -fno-warn-orphans #-} module Darcs.Patch.V1 ( Patch ) where import Darcs.Patch.Matchable ( Matchable ) import Darcs.Patch.Patchy ( Patchy ) import Darcs.Patch.Prim ( PrimPatch ) import Darcs.Patch.RepoPatch ( RepoPatch ) import Darcs.Patch.V1.Apply () import Darcs.Patch.V1.Commute () import Darcs.Patc...
DavidAlphaFox/darcs
src/Darcs/Patch/V1.hs
gpl-2.0
581
0
7
74
179
107
72
15
0
module Bot.Commands where import Bot.Types import Bot.Methods import Control.Monad import Network.HTTP.Client import System.Process (readProcess) import Data.Time.Clock.POSIX #if __GLASGOW_HASKELL__ < 710 import Control.Applicative ((<$>)) #endif type Posix = Int helpText :: String helpText = "I can grant access to ...
house4hack/h4h-bot
src/Bot/Commands.hs
gpl-3.0
1,942
0
19
522
543
265
278
45
11
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeSynonymInstances #-} module System.Console.Quickterm.CanMarshall ( CanMarshall (..) ) where import Text.Regex.Base hiding (empty) import Text.Regex.TDFA hiding (empty) import Syste...
SamuelSchlesinger/Quickterm
src/lib/System/Console/Quickterm/CanMarshall.hs
gpl-3.0
1,322
0
12
345
269
159
110
29
0
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} module Test.Language.Verilog.Syntax.Number where import Data.Bits import Test.Invariant import Test.Tasty (TestTree, testGroup) import qualified Test.Tasty.QuickCheck as QC import qualified Test.Tasty.SmallCheck as SC import Test.QuickCheck...
quivade/screwdriver
test/Test/Language/Verilog/Syntax/Number.hs
gpl-3.0
4,123
0
20
901
1,428
750
678
95
2
module UnitConversions.Tests where import Data.Tuple (swap) import Instances () import Test.HUnit ((@?=)) import Test.QuickCheck ((===), (==>)) import Test.Tasty (TestTree, testGroup) import Test.Tasty.HUnit (testCase) import Test.Tasty.QuickCheck (testProperty) import Types import UnitConversions isMetric :: Unit ->...
JackKiefer/herms
test/UnitConversions/Tests.hs
gpl-3.0
2,366
0
16
658
648
367
281
66
4
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.AdSenseHost...
brendanhay/gogol
gogol-adsense-host/gen/Network/Google/AdSenseHost/Types/Product.hs
mpl-2.0
45,616
0
19
12,142
9,755
5,608
4,147
1,053
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.FirebaseRules.Types -- Copyright : (c) 2015-2016 Brend...
brendanhay/gogol
gogol-firebase-rules/gen/Network/Google/FirebaseRules/Types.hs
mpl-2.0
4,986
0
7
1,270
577
398
179
148
1
module Example.Eg19 (eg19) where import Graphics.Radian import ExampleUtils eg19 :: IO Html eg19 = do let x = [0.01, 0.01 + (1.00 - 0.01) / 10000 .. 1.00] os = [height.=300, aspect.=3, strokeWidth.=1, zoomX.=True, uiAxisYTransform.=True, axisXTransform.=AxisLog, uiAxisXTransform.=AxisL...
openbrainsrc/hRadian
examples/Example/Eg19.hs
mpl-2.0
540
3
19
137
204
112
92
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-dlp/gen/Network/Google/Resource/DLP/Projects/StoredInfoTypes/Get.hs
mpl-2.0
5,185
0
15
1,103
702
413
289
105
1
{- Copyright (C) 2013–2014 Albert Krewinkel <tarleb@moltkeplatz.de> This file is part of ZeitLinse. ZeitLinse is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your o...
tarleb/zeitlinse
src/ZeitLinse/Core/Types.hs
agpl-3.0
2,138
0
8
393
255
150
105
27
0
module DecBin where decBin :: Int -> [Int] decBin x = if x < 2 then [x] else (x `mod` 2) : decBin (x `div` 2)
tonilopezmr/Learning-Haskell
Exercises/2/Exercise_1.hs
apache-2.0
115
2
9
31
66
39
27
4
2
import Data.List (genericIndex) a020639 n = spf a000040_list where spf (p:ps) | n < p^2 = n | mod n p == 0 = p | otherwise = spf ps a000040 n = genericIndex a000040_list (n - 1) a000040_list = base ++ larger where base = [2, 3, 5, 7, 11, 13, 17] larger = p : filter prime more ...
peterokagey/haskellOEIS
src/Sandbox/Rudiger.hs
apache-2.0
759
0
14
214
442
229
213
17
1
module IntLib where import System.Directory directory = doesFileExist "Exe.hs" intlib = 1
DanielG/cabal-helper
tests/exeintlib/intlib/IntLib.hs
apache-2.0
93
0
5
15
22
13
9
4
1
-- Copyright 2016 TensorFlow authors. -- -- 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 agree...
cem3394/haskell
tensorflow-ops/src/TensorFlow/Gradient.hs
apache-2.0
28,748
0
19
8,305
7,150
3,834
3,316
-1
-1
module HaskHOL.Lib.IndTypesPre.Base where import HaskHOL.Core import HaskHOL.Deductive import HaskHOL.Lib.Nums import HaskHOL.Lib.Arith import HaskHOL.Lib.WF import HaskHOL.Lib.CalcNum thmNUMPAIR_INJ_LEMMA :: WFCtxt thry => HOL cls thry HOLThm thmNUMPAIR_INJ_LEMMA = cacheProof "thmNUMPAIR_INJ_LEMMA" ctxtWF $ pro...
ecaustin/haskhol-math
src/HaskHOL/Lib/IndTypesPre/Base.hs
bsd-2-clause
2,758
0
21
706
679
395
284
-1
-1
module Data.GitParser.Types where import Data.Time.LocalTime import Data.Time.Format import Control.Monad.State type Name = String type SHA = String data GitBranch = GitBranch { getBranchName :: Name , getBranchHEAD :: SHA } deriving Show newtype RemoteRepo = RemoteRepo...
jamessanders/gitparser
src/Data/GitParser/Types.hs
bsd-2-clause
1,354
0
9
479
334
200
134
29
1
{-# LANGUAGE DeriveDataTypeable, OverloadedStrings, RecordWildCards #-} -- | -- Module : Statistics.Resampling.Bootstrap -- Copyright : (c) 2009, 2011 Bryan O'Sullivan -- License : BSD3 -- -- Maintainer : bos@serpentine.com -- Stability : experimental -- Portability : portable -- -- The bootstrap method for st...
00tau/statistics
Statistics/Resampling/Bootstrap.hs
bsd-2-clause
4,149
0
14
1,263
951
539
412
73
1
{-# OPTIONS_GHC -fno-warn-orphans #-} module Monad( ServerEnv(..) , ServerM , newServerEnv , runServerM , runServerMIO , serverMtoHandler , AuthM(..) , runAuth ) where import Control.Monad.Base import Control.Monad.Catch (MonadCatch, MonadThrow) import Control.Monad.Except import Control.Monad.Logg...
ivan-m/servant-auth-token
example/leveldb/src/Monad.hs
bsd-3-clause
3,221
0
15
599
834
447
387
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE DeriveDataTypeable #-} module Mismi.SQS.Data ( QueueName(..) , Queue(..) , QueueUrl(..) , MessageId(..) , SQSError(..) , sqsErrorRender , module Mismi.SQS.Core.Data ) where import Control.Exception.Base impor...
ambiata/mismi
mismi-sqs/src/Mismi/SQS/Data.hs
bsd-3-clause
683
0
7
161
151
94
57
25
1
{-# LANGUAGE BangPatterns,RankNTypes,OverloadedStrings #-} {-# LANGUAGE CPP, DeriveDataTypeable, FlexibleContexts, GeneralizedNewtypeDeriving, MultiParamTypeClasses, TemplateHaskell, TypeFamilies, RecordWildCards #-} module Plow.Service.Alarm where -- import Plow.Service.Alarm.Internal import Plow.Service.Alarm.T...
smurphy8/alarm-service
src/Plow/Service/Alarm.hs
bsd-3-clause
826
0
4
134
25
19
6
7
0
module Spring13.Week7.StringBufEditor where import Spring13.Week7.StringBuffer import Spring13.Week7.Editor main = runEditor editor $ unlines [ "This buffer is for notes you don't want to save, and for" , "evaluation of steam valve coefficients." , "To load a different file, type the charac...
bibaijin/cis194
src/Spring13/Week7/StringBufEditor.hs
bsd-3-clause
385
0
7
98
46
28
18
8
1
{-# OPTIONS -fno-warn-missing-methods #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE EmptyDataDecls #-} -- | A limited subset of the time package. module Data.Time (-- * Compatible with the time package getCurrentTime ,fromGregorian ,UTCTime ,Day ,utctDay -- * Incompatible Fay-specific helpers ,...
beni55/fay
fay-base/src/Data/Time.hs
bsd-3-clause
1,815
0
7
351
248
143
105
-1
-1
module BoxFieldsSpec (spec) where import Control.Exception (evaluate) import Data.ByteString.IsoBaseFileFormat.Boxes import Data.ByteString.IsoBaseFileFormat.ReExports import Data.ByteString.IsoBaseFileFormat.Util.BoxContent import Data.ByteString.IsoBaseFileFormat.Util.BoxFields import qualified Data.ByteString.Lazy ...
sheyll/isobmff-builder
spec/BoxFieldsSpec.hs
bsd-3-clause
5,009
0
24
2,378
1,165
628
537
-1
-1
{-# LANGUAGE ScopedTypeVariables, MonoPatBinds, MagicHash #-} -- | -- Copyright : (c) 2010 Simon Meier -- -- License : BSD3-style (see LICENSE) -- -- Maintainer : Simon Meier <iridcode@gmail.com> -- Stability : experimental -- Portability : non-portable (uses unsafeCoerce) -- -- 'Encoding's for encoding float...
meiersi/system-io-write
src/Codec/Bounded/Encoding/Floating.hs
bsd-3-clause
3,480
0
12
606
361
219
142
44
1
{-# LANGUAGE CPP, GeneralizedNewtypeDeriving, FlexibleInstances #-} {-# LANGUAGE FlexibleContexts, MultiParamTypeClasses, RankNTypes #-} {-# LANGUAGE TypeFamilies, UndecidableInstances, RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Language.Haskell.GhcMod.Monad (...
phaazon/ghc-mod
Language/Haskell/GhcMod/Monad.hs
bsd-3-clause
14,268
0
18
3,269
3,126
1,700
1,426
263
2
{-# OPTIONS_GHC -fno-warn-tabs #-} module Base64 ( base64Decode , base64Encode ) where import Common import Word6 import Word24 import qualified Data.Map as M import qualified Data.Vector.Generic as V import Data.Word mapLookup :: Ord k => M.Map k v -> k -> v mapLookup m k = (\(Just x) -> x) $ M.lookup k m base64T...
andrewcchen/matasano-cryptopals-solutions
modules/Base64.hs
bsd-3-clause
1,740
0
13
338
844
449
395
44
5
{-# LANGUAGE DeriveFoldable, DeriveFunctor, DeriveTraversable, GeneralizedNewtypeDeriving, MultiParamTypeClasses #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} module Supercompile.Split (MonadStatics(..), split, generalise) where import Evaluator.Deeds import Evaluator.Evaluate (normalise) import Evalu...
osa1/chsc
Supercompile/Split.hs
bsd-3-clause
60,122
1
27
14,408
10,410
5,800
4,610
-1
-1
{-# LINE 1 "GHC.Event.Manager.hs" #-} {-# LANGUAGE Trustworthy #-} {-# LANGUAGE BangPatterns , CPP , ExistentialQuantification , NoImplicitPrelude , RecordWildCards , TypeSynonymInstances , FlexibleInstances #-...
phischu/fragnix
builtins/base/GHC.Event.Manager.hs
bsd-3-clause
17,536
0
24
4,769
4,161
2,153
2,008
330
9
{-# LANGUAGE ViewPatterns #-} {-# LANGUAGE OverloadedStrings #-} -- | Main bdo server. module Main where import Bdo import Control.Concurrent import Control.Exception import Control.Monad import Data.Aeson import Data.List import Data.Maybe import ...
chrisdone/bdo
src/Main.hs
bsd-3-clause
798
0
9
242
158
96
62
26
1
-- | 256 bit Skein as a stream cipher, as specified in the Skein 1.3 paper. module Crypto.Threefish.Skein.StreamCipher ( Key256, Nonce256, Block256, encrypt, decrypt, toBlock, fromBlock ) where import Crypto.Threefish.Skein (Nonce256) import Crypto.Threefish.UBI import Crypto.Threefish.Threefish256 import Cry...
valderman/threefish
Crypto/Threefish/Skein/StreamCipher.hs
bsd-3-clause
2,378
0
22
543
687
356
331
53
2
-- 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. module Duckling.AmountOfMoney.AR.Tests ( tests ) where import Data.String import Prelude import Test.Tasty ...
facebookincubator/duckling
tests/Duckling/AmountOfMoney/AR/Tests.hs
bsd-3-clause
524
0
9
80
79
50
29
11
1
{-# language CPP #-} -- | = Name -- -- VK_KHR_swapchain_mutable_format - device extension -- -- == VK_KHR_swapchain_mutable_format -- -- [__Name String__] -- @VK_KHR_swapchain_mutable_format@ -- -- [__Extension Type__] -- Device extension -- -- [__Registered Extension Number__] -- 201 -- -- [__Revision__] -...
expipiplus1/vulkan
src/Vulkan/Extensions/VK_KHR_swapchain_mutable_format.hs
bsd-3-clause
5,040
0
8
989
267
209
58
-1
-1
module Main where import System.Random.MWC import Control.Monad.Primitive nouns = ["man", "ball", "woman", "table"] verbs = ["hit", "took", "saw", "liked"] articles = ["a", "the"] newtype Noun = Noun String deriving Eq newtype Article = Article String deriving Eq newtype Verb ...
kapilash/dc
src/Chap2/SentenceGen.hs
bsd-3-clause
2,223
0
12
526
712
380
332
61
1
module Gradualize.DynamicRuntime where import Utils.Utils import TypeSystem import Data.Char (toUpper) import Data.Maybe import Changer.Changes import Control.Monad dynamized :: TypeSystem -> [Symbol] -> Either String Changes dynamized ts proofsFor = do proofRules <- proofsFor |> generateRelationProof ts ...
pietervdvn/ALGT
src/Gradualize/DynamicRuntime.hs
bsd-3-clause
1,316
64
9
249
478
270
208
27
1
{-| Module : PP.Builders.Nfa Description : Builder for NFA Copyright : (c) 2017 Patrick Champion License : see LICENSE file Maintainer : chlablak@gmail.com Stability : provisional Portability : portable -} module PP.Builders.Nfa ( combineNfa ) where import qualified Data.Char as ...
chlablak/platinum-parsing
src/PP/Builders/Nfa.hs
bsd-3-clause
5,700
0
13
1,717
2,369
1,272
1,097
117
3
{- 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, ...
AaronFriel/eff-experiments
src/Data/Type/Test/BiMap.hs
bsd-3-clause
510
0
4
95
17
13
4
7
0
{-# LANGUAGE OverloadedStrings #-} module Radio.Application where import Prelude hiding (div) import Data.Monoid import Data.Maybe import Control.Monad import Control.Monad.IO.Class import Control.Monad.Coroutine import Control.Monad.Coroutine.SuspensionFunctors import Control.Applicative import Radio.Field import Rad...
Teaspot-Studio/bmstu-radio-problem-haste
Radio/Application.hs
bsd-3-clause
7,899
0
19
1,789
2,157
1,053
1,104
132
12
module Day10 ( parseInstr , nextState , initState , runUntil , Instr(..) , Dest(..) ) where import qualified Data.Map.Strict as Map import qualified Data.List as List data Dest = Bot Int | Output Int deriving(Eq, Show) data Instr = Value { bot :: Int, val :: Int } | Cmd { bot :: Int ...
reidwilbur/aoc2016
src/Day10.hs
bsd-3-clause
2,580
0
23
674
1,183
650
533
61
4
----------------------------------------------------------------------------- -- | -- Module : Control.Concurrent.SHFSTM.Internal.Debug -- Copyright : (c) D. Sabel, Goethe-University, Frankfurt a.M., Germany -- License : BSD-style -- -- Maintainer : sabel <at> ki.cs.uni-frankfurt.de -- Stability : ...
cornell-pl/HsAdapton
stmshf/Control/Concurrent/SHFSTM/Internal/Debug.hs
bsd-3-clause
1,050
0
9
180
113
67
46
15
1
{-# LANGUAGE TypeFamilies, MultiParamTypeClasses #-} module DataFamilies where data family Vector a newtype instance Vector Bool = V_Bool [Bool] f :: Vector Bool -> () f (V_Bool v) = () class GVector v a where basicLength :: v a -> Int instance GVector Vector Bool where basicLength (V_Bool v) = length v
phischu/fragnix
tests/quick/DataFamilies/DataFamilies.hs
bsd-3-clause
319
0
8
66
106
56
50
10
1
{-# LANGUAGE TupleSections #-} module EDSL.Monad.Instructions.Constant where --import Prelude hiding (error) import EDSL.Monad.EdslT import Data.BitCode.LLVM.Classes.HasType import Data.BitCode.LLVM.Value (Value (Function, TRef, Constant), Named(Unnamed), Symbol, symbolValue, mkUnnamed) import Data.BitCode.LLVM.Ty...
angerman/data-bitcode-edsl
src/EDSL/Monad/Instructions/Constant.hs
bsd-3-clause
3,931
0
11
711
1,159
675
484
-1
-1
module DFS where -- Creating tree ds data Tree a = Empty | Node a (Tree a) (Tree a) deriving (Show) -- DFS traverseDFS :: Tree a -> [a] traverseDFS Empty = [] traverseDFS (Node a l r) = a : (traverseDFS l) ++ (traverseDFS r)
manikTharaka/al-go-rithms
graphsearch/depth-first-search/Haskell/DFS.hs
mit
227
0
8
48
105
57
48
5
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- ...
fmapfmapfmap/amazonka
amazonka-datapipeline/gen/Network/AWS/DataPipeline/DeactivatePipeline.hs
mpl-2.0
4,797
0
13
1,015
589
356
233
78
1
module Propellor.Spin ( commitSpin, spin, update, gitPushHelper, mergeSpin, ) where import Data.List import System.Exit import System.PosixCompat import System.Posix.IO import System.Posix.Directory import Control.Concurrent.Async import qualified Data.ByteString as B import qualified Data.Set as S import Network...
sjfloat/propellor
src/Propellor/Spin.hs
bsd-2-clause
11,280
128
19
2,233
3,429
1,690
1,739
268
6
{-# LANGUAGE CPP #-} #ifndef MIN_VERSION_base #define MIN_VERSION_base(x,y,z) 1 #endif ----------------------------------------------------------------------------- -- | -- Module : Control.Monad.Trans.TH -- Copyright : (C) 2008-2013 Edward Kmett -- License : BSD-style (see the file LICENSE) -- -- Maint...
Chobbes/free
src/Control/Monad/Free/TH.hs
bsd-3-clause
13,673
0
20
3,480
2,977
1,554
1,423
158
5
{-# LANGUAGE CPP, GADTs, ViewPatterns #-} {-# OPTIONS_GHC -Wall #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- TEMP -- {-# OPTIONS_GHC -fno-warn-unused-binds #-} -- TEMP ---------------------------------------------------------------------- -- | -- Module : LambdaCCC.OddEvenSort -- Copyright : (c) 201...
conal/lambda-ccc
src/LambdaCCC/OddEvenSort.hs
bsd-3-clause
3,491
28
15
972
1,425
751
674
34
1
module Test001 where import Kask.Time import Prelude (print) import RIO test1 :: IO () test1 = do let coll = [1 .. 10000000] :: [Integer] let s = sum coll value <- logging "Computations took sthing like " (withMsecs s) " msecs" print value
kongra/kask-base
app/Test001.hs
bsd-3-clause
285
0
10
89
94
49
45
10
1
{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Client.Init -- Copyright : (c) Brent Yorgey 2009 -- License : BSD-like -- -- Maintainer : cabal-devel@haskell.org -- Stability : provisional -- Portability : portable -- -...
jwiegley/ghc-release
libraries/Cabal/cabal-install/Distribution/Client/Init.hs
gpl-3.0
30,868
0
22
9,129
7,401
3,793
3,608
571
15
-- | The Manager Process - Manages the torrents and controls them module Process.TorrentManager ( -- * Types TorrentManagerMsg(..) -- * Channels , TorrentMgrChan -- * Interface , start ) where import Control.Concurrent import Control.Concurrent.STM import Control.Monad.State import Contr...
jlouis/combinatorrent
src/Process/TorrentManager.hs
bsd-2-clause
4,506
0
18
1,358
1,252
634
618
107
3
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TupleSections #-} -- | Test suite for Stack.Dot module Stack.DotSpec where import Data.Functor.Identity import Data.List ((\\)) import qualified Data.Map as Map import qualified Data.Set as Set i...
juhp/stack
src/test/Stack/DotSpec.hs
bsd-3-clause
5,358
0
24
1,204
1,500
811
689
98
30
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GL.PixelRectangles.Rasterization -- Copyright : (c) Sven Panne 2002-2013 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portabil...
hesiod/OpenGL
src/Graphics/Rendering/OpenGL/GL/PixelRectangles/Rasterization.hs
bsd-3-clause
1,403
0
9
165
210
132
78
16
1
----------------------------------------------------------------------------- -- $Id: DriverPhases.hs,v 1.38 2005/05/17 11:01:59 simonmar Exp $ -- -- GHC Driver -- -- (c) The University of Glasgow 2002 -- ----------------------------------------------------------------------------- module DriverPhases ( HscSource(...
lukexi/ghc-7.8-arm64
compiler/main/DriverPhases.hs
bsd-3-clause
10,595
0
10
3,035
2,089
1,132
957
209
20
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} module Distribution.Types.BenchmarkType ( BenchmarkType(..), knownBenchmarkTypes, ) where import Prelude () import Distribution.Compat.Prelude import Distribution.Version import Distribution.Text import Text.PrettyPrint as Disp -- | The \"b...
mydaum/cabal
Cabal/Distribution/Types/BenchmarkType.hs
bsd-3-clause
1,129
0
11
247
241
133
108
22
1
----------------------------------------------------------------------------- -- -- GHC Extra object linking code -- -- (c) The GHC Team 2017 -- ----------------------------------------------------------------------------- module SysTools.ExtraObj ( mkExtraObj, mkExtraObjToLinkIntoBinary, mkNoteObjsToLinkIntoBinary,...
ezyang/ghc
compiler/main/SysTools/ExtraObj.hs
bsd-3-clause
9,211
0
16
2,530
1,472
753
719
153
5
module C7 (C7.myFringe) where import D7 myFringe :: (Tree a) -> [a] myFringe (Leaf x) = [x] myFringe (Branch left right) = (C7.myFringe left) ++ (D7.myFringe right)
kmate/HaRe
old/testing/renaming/C7_AstOut.hs
bsd-3-clause
172
0
8
34
85
46
39
6
1
{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE GADTs #-} module T12163 where data T a b where Mk :: Int -> b -> T Int b deriving (Functor)
ezyang/ghc
testsuite/tests/deriving/should_fail/T12163.hs
bsd-3-clause
150
0
8
40
37
23
14
6
0
/* Copyright (C) 2007 Free Software Foundation Contributed by Ollie Wild <aaw@google.com> */ static int i = __COUNTER__;
SanDisk-Open-Source/SSD_Dashboard
uefi/gcc/gcc-4.6.3/gcc/testsuite/gcc.dg/pch/counter-2.hs
gpl-2.0
125
5
7
22
46
25
21
1
1
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE TypeFamilies #-} module Nix.C...
adnelson/simple-nix
src/Nix/Common.hs
mit
4,014
0
14
832
1,173
694
479
95
2
/*Owner & Copyrights: Vance King Saxbe. A.*//* Copyright (c) <2014> Author Vance King Saxbe. A, and contributors Power Dominion Enterprise, Precieux Consulting and other contributors. Modelled, Architected and designed by Vance King Saxbe. A. with the geeks from GoldSax Consulting and GoldSax Technologies email @vsaxbe...
VanceKingSaxbeA/GoldSaxMachineStore
GoldSaxMachineModule6/src/Chapter6/ReaderWriter.hs
mit
2,890
23
17
690
894
449
445
40
1
{-# LANGUAGE TemplateHaskell #-} module FD ( -- Types FD, -- Monad for finite domain constraint solver FDConstraint, -- Constraint FDVar, -- Finite domain solver variable FDExpr, -- Constraint expression -- Functions on FDVars runFD, -- Run the monad and return...
dmoverton/finite-domain
src/FD.hs
mit
8,676
0
15
2,189
2,978
1,513
1,465
-1
-1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeSynonymInstances #-} module PrettyPrint where import Syntax import Text.PrettyPrint.ANSI.Leijen import qualified Data.Text as T class Display a where display :: a -> Doc instance Display T.Text where display = text . sho...
kellino/TypeSystems
fullError/PrettyPrint.hs
mit
1,029
0
10
229
354
180
174
28
0
module Problems where import Test.Hspec import Test.QuickCheck import Control.Monad import Control.Arrow ((&&&)) import Control.Applicative myLast :: [a] -> a myLast (x:[]) = x myLast (_:xs) = myLast xs myButLast :: [a] -> a myButLast (x:y:[]) = x myButLast (x:xs) = myButLast xs elementAt :: [a] -> Int -> a elem...
fffej/codekatas
99Problems/1-20/Problems.hs
mit
6,736
0
21
2,173
3,178
1,645
1,533
179
4
-- Copyright (c) 2009 Takashi Yamamiya -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and associated documentation files (the "Software"), to deal -- in the Software without restriction, including without limitation the rights -- to use, copy, modify, merge, publish...
propella/prolog
Prolog.hs
mit
10,059
0
16
2,690
3,356
1,744
1,612
153
2
-- | Helper functions module Dissent.Internal.Util where import Control.Concurrent import Control.Monad.IO.Class (liftIO) import Control.Monad.Trans.Resource -- | Forks a function that returns a ResourceT, and returns the result -- in an MVar primitive. forkResource :: ResourceT ...
solatis/dissent
src/Dissent/Internal/Util.hs
mit
497
0
12
120
113
59
54
11
1
import XMonad -- import XMonad.Actions.Volume import XMonad.Hooks.DynamicLog import Data.Monoid import System.Exit import XMonad.Util.Run import XMonad.Hooks.SetWMName import qualified XMonad.StackSet as W import qualified Data.Map as M import XMonad.Hooks.ManageDocks import XMonad.Layout.NoBorders myTerminal...
melloc/dotfiles
xmonad/xmonad.hs
mit
4,313
0
14
1,294
967
588
379
53
1
{-# OPTIONS_GHC -fno-warn-orphans #-} module Types.Instances where -- Prelude. import ClassyPrelude import Data.Aeson import Data.Aeson.Types (Value (String)) import qualified Data.ByteString.Char8 as B8 import Data.UUID (UUID) import qualified Data.UUID ...
jkachmar/servant-persistent-realworld
src/Types/Instances.hs
mit
1,266
0
11
268
254
137
117
25
0
module LC where import Data.Map (fromListWith, toList) containsDuplicates :: [Int] -> Bool containsDuplicates = foldr (\x -> (||) (x > 1)) False . fmap snd . frequency where frequency xs = toList (fromListWith (+) [(x, 1 :: Int) | x <- xs])
AriaFallah/leetcode
haskell/containsDuplicates.hs
mit
245
0
12
46
113
64
49
5
1
module System.Conscript (conscript) where import System.Process import System.Exit import Control.Monad import Control.Concurrent conscript :: [String] -> IO ([String] -> IO ()) conscript args = do blocker <- newEmptyMVar running <- newEmptyMVar void $ forkIO $ forever $ starter args blocker running return ...
sordina/Conscript
System/Conscript.hs
mit
1,115
0
14
232
412
202
210
25
3
module Exploration.Basics ( -- Combinators flip, const, -- Data types Bool(..), Int(..), Integer(..), Float(..), Double(..), module Data.Word ) where import Prelude (Integer(..), Bool(..), Int(..), Float(..), Double(..)) import Data.Word flip = \f x y -> f y x const = \x y -> x infixr 0 $ ($) :...
SamuelSchlesinger/Exploration
Exploration/Basics.hs
mit
422
0
9
110
228
137
91
-1
-1
module Helpers where import Data.Set (fromList, toList) import Config checkHost :: Config -> Bool checkHost c = all (==True) [checkFreeMem vms ,checkVolumes vms ,checkNetwork nets] where vms = envVMs c nets = envNets c checkNetwork :: [Network] -> Bool ch...
gvnkd/os_dep_jen
Helpers.hs
mit
548
0
10
155
193
104
89
20
1