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
module Trello.ApiData where newtype Error = Error String deriving Show data ListFilter = ListNone | ListOpen | ListClosed | ListAll instance Show ListFilter where show (ListNone) = "none" show (ListOpen) = "open" show (ListClosed) = "closed" show (ListAll) = "all" data CardFilter = CardNone | CardVisi...
vamega/haskell-trello
src/Trello/ApiData.hs
bsd-3-clause
966
0
7
192
298
164
134
25
1
{-# LANGUAGE OverloadedStrings #-} module FifoSpec (spec) where import Test.Hspec import Test.QuickCheck import Cache import Fifo import Request initialCache = ((0, 0), empty 1000 AddToCache :: Fifo) requestsExceedingMaxSize = [ (Read, "1", 100) , (...
wochinge/CacheSimulator
test/FifoSpec.hs
bsd-3-clause
722
0
11
211
204
123
81
22
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. An additional grant -- of patent rights can be found in the PATENTS file in the same directory. {-# LANGUAGE Over...
rfranek/duckling
Duckling/AmountOfMoney/KO/Corpus.hs
bsd-3-clause
2,177
0
9
761
363
209
154
52
1
import Data.Char (digitToInt) import Data.List import Text.ParserCombinators.Parsec nrows :: Int nrows = 6 ncols :: Int ncols = 50 data Led = On | Off instance Show Led where show On = "โ–ˆ" show Off = "โ–‘" data Row = Row [Led] instance Show Row where show (Row leds) = concat (map show leds) makeRow :: Led -> I...
kdungs/adventofcode2016
08.hs
mit
3,867
0
12
1,368
1,323
667
656
98
3
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE CPP #-} -- | Extend a Reader environment providing a MWC 'Gen' into a MonadRandom. module Control.Monad.MWC ( module System.Random.MWC , uniformM ,...
bitemyapp/snoy-extra
Control/Monad/MWC.hs
mit
5,479
0
18
1,512
1,378
738
640
153
3
import Geometry import Drawing main = drawPicture myPicture myPicture points = drawLine (a,b) & drawLine (c,d) & drawPoints list & drawAutoLabels list & drawPoint p & drawLabel p "P" & message "Line-Line Intersection" where list = take 4 points [a,b,c,d] = list [p]...
alphalambda/hsmath
src/Learn/Geometry/demo03lineline.hs
gpl-2.0
345
0
12
102
138
72
66
14
1
{-# LANGUAGE CPP, StandaloneDeriving, DeriveDataTypeable #-} {- | Module : ./Haskell/TiDecorateATC.der.hs Description : ShATermConvertible instances Copyright : (c) Christian Maeder, Uni Bremen 2006 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provisi...
spechub/Hets
Haskell/TiDecorateATC.der.hs
gpl-2.0
931
0
4
148
48
34
14
7
0
module Logic.Ctl.TestUtils where import Test.QuickCheck import Logic.Ctl instance Arbitrary Expr where arbitrary = sized (genExpr . (`div` 5)) genExpr :: Int -> Gen Expr genExpr 0 = oneof [ Literal <$> arbitrary , Atom <$> genIdentifier ] genExpr n = let n' = n - 1 ...
rodrigo-machado/verigraph
tests/Logic/Ctl/TestUtils.hs
gpl-3.0
1,282
0
12
394
418
216
202
46
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- ...
olorin/amazonka
amazonka-elb/gen/Network/AWS/ELB/CreateAppCookieStickinessPolicy.hs
mpl-2.0
6,194
0
13
1,132
626
384
242
84
1
{-# LANGUAGE RecordWildCards #-} -- | This module manages storing the various GHC option flags in a modules -- interface file as part of the recompilation checking infrastructure. module FlagChecker ( fingerprintDynFlags , fingerprintOptFlags , fingerprintHpcFlags ) where import GhcPrelude im...
shlevy/ghc
compiler/iface/FlagChecker.hs
bsd-3-clause
5,745
0
13
1,337
473
269
204
44
3
{-# LANGUAGE BangPatterns #-} mtGamma a b = let !x_2 = x*x; !x_4 = x_2*x_2 v3 = v*v*v dv = d * v3 in 5
mpickering/ghc-exactprint
tests/examples/ghc710/MangledSemiLet.hs
bsd-3-clause
127
0
10
49
63
31
32
7
1
{-# LANGUAGE RankNTypes, FlexibleContexts #-} module Pipeline ( PipelineClass(..), Pipe, Pipeline, runPipe, liftP, yield, await, finalize, finalize' ) where -- import Control.Applicative import Control.Monad import Control.Monad.Base import Control.Monad.IO.Class import Control.Exception class PipelineClass p wher...
YoshikuniJujo/forest
subprojects/pipeline/Pipeline.hs
bsd-3-clause
2,492
8
10
640
1,298
645
653
58
1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE Trustworthy #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Function -- Copyright : Nils Anders Danielsson 2006 -- , Alexander Berntsen 2014 -- License : BSD-style (see the LICENSE fil...
spacekitteh/smcghc
libraries/base/Data/Function.hs
bsd-3-clause
2,393
0
9
626
293
201
92
17
1
module Graphics.QML.Test.Harness where import Graphics.QML.Test.Framework import Test.QuickCheck import Test.QuickCheck.Monadic import Test.QuickCheck.Test import Graphics.QML import Data.IORef import Data.Proxy import Data.Typeable import Data.Maybe import System.IO import System.Directory qmlPrelude :: String qml...
johntyree/HsQML
test/Graphics/QML/Test/Harness.hs
bsd-3-clause
2,646
0
15
733
678
338
340
73
2
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section[TcPatSyn]{Typechecking pattern synonym declarations} -} {-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} module TcPatSyn ( tcInferPatSynDecl, tcCheckPatSynDecl , tcPatSynBuilderBind, tcPatSy...
olsner/ghc
compiler/typecheck/TcPatSyn.hs
bsd-3-clause
35,726
0
20
12,074
7,504
3,867
3,637
521
20
module Functions ( approxEq , approxEqWith ) where import Prelude () import Prelude.Compat approxEq :: (Fractional a, Ord a) => a -> a -> Bool approxEq = approxEqWith 1e-15 1e-15 approxEqWith :: (Fractional a, Ord a) => a -> a -> a -> a -> Bool approxEqWith maxAbsoluteError maxRelativeError a b = ...
sol/aeson
tests/Functions.hs
bsd-3-clause
429
0
10
107
169
90
79
13
1
module System.Taffybar.Widget.Text.NetworkMonitor where import Control.Monad import Control.Monad.Trans.Class import qualified Data.Text as T import GI.Gtk import System.Taffybar.Context import System.Taffybar.Hooks import System.Taffybar.Information.Network ...
teleshoes/taffybar
src/System/Taffybar/Widget/Text/NetworkMonitor.hs
bsd-3-clause
2,423
0
16
693
748
397
351
58
7
import StackTest main :: IO () main = do stack ["clean"] stack ["build"]
juhp/stack
test/integration/tests/3787-internal-libs-with-no-main-lib/Main.hs
bsd-3-clause
78
0
8
18
37
18
19
5
1
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 Desugaring arrow commands -} {-# LANGUAGE CPP #-} module Language.Haskell.Liquid.Desugar710.DsArrows ( dsProcExpr ) where -- #include "HsVersions.h" import Language.Haskell.Liquid.Desugar710.Match import Language.Haske...
spinda/liquidhaskell
src/Language/Haskell/Liquid/Desugar710/DsArrows.hs
bsd-3-clause
46,191
0
22
13,583
9,651
4,980
4,671
704
20
{-# LANGUAGE OverloadedStrings, TypeFamilies #-} module Lamdu.GUI.CodeEdit (make, Env(..)) where import Control.Applicative ((<$>)) import Control.Lens.Operators import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.State (StateT, mapStateT) import Control.MonadA (MonadA) import Data.Cache (Cache) import ...
sinelaw/lamdu
Lamdu/GUI/CodeEdit.hs
gpl-3.0
6,609
0
19
1,317
2,181
1,151
1,030
-1
-1
{-# LANGUAGE OverloadedStrings #-} import Yesod.Core import Data.Aeson import Data.Monoid ((<>)) import Data.Text (Text, pack) people :: [(Text, Int)] people = [("Alice", 25), ("Bob", 43), ("Charlie", 37)] main = warp 3000 $ liteApp $ do onStatic "people" $ dispatchTo getPeople onStatic "person" $ withDynamic...
pikajude/yesod
demo/lite/lite.hs
mit
660
0
15
158
244
129
115
17
2
module Main where import Data.Default (def) import Data.String (fromString) import qualified Data.Vault.Lazy as Vault import Network.Wai import Network.Wai.Session (withSession, Session) import Network.Wai.Session.ClientSession (clientsessionStore) import Network.Wai.Handler.Warp (run) import Network.HTTP.Types (ok20...
singpolyma/wai-session-clientsession
example/Main.hs
isc
872
0
11
121
296
157
139
22
1
-- | Accessing fields from packages. module Fields where import Control.Applicative ((<|>)) import Data.Char (toLower) import Data.Maybe (fromMaybe, listToMaybe, maybeToList) import Distribution.Compiler (CompilerFlavor(GHC)) import Distribution.Package import Distribution.PackageDescription import Distribution.Text ...
barrucadu/cabal-info
cabal-info/Fields.hs
mit
11,850
0
19
1,829
2,990
1,570
1,420
169
25
module Handler.AnalogInSpec (spec) where import TestImport spec :: Spec spec = withApp $ do describe "getAnalogInR" $ do error "Spec not implemented: getAnalogInR"
aufheben/lambda-arduino
test/Handler/AnalogInSpec.hs
mit
180
0
11
39
44
23
21
6
1
module DarkSky.Types where import Data.Scientific (Scientific) data Coordinate = Coordinate { latitude :: Degrees , longitude :: Degrees } deriving (Eq, Show) type Degrees = Scientific type Temperature = Scientific type Distance = Scientific type PrecipitationAmount = Scientific
peterstuart/dark-sky
src/DarkSky/Types.hs
mit
292
0
8
50
72
45
27
10
0
{-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} module Nauva.Product.Nauva.Element.Terminal ( terminalEl , TerminalProps(..) , catalogPage ) where import Data.Text (Text) import ...
wereHamster/nauva
product/nauva/shared/src/Nauva/Product/Nauva/Element/Terminal.hs
mit
1,786
0
11
456
266
145
121
34
1
module Main where import System.Environment main :: IO () main = do args <- getArgs -- adds the first two arguments -- use dummy values if none are provided let def = args ++ ["40", "2"] print ((read $ def !! 0) + (read $ def !! 1))
kenwilcox/WyScheme
add.hs
mit
255
0
12
70
87
47
40
7
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE CPP #-} module CommandArgs ( HDevTools(..) , loadHDevTools ) where import Data.Version (showVersion) import Paths_hdevtools (version) import System.Console.CmdArgs.Implicit import System.Environment (getProgName) import System.Info (arch, os) import qualifie...
ranjitjhala/hdevtools
src/CommandArgs.hs
mit
6,156
0
11
2,048
1,678
923
755
172
1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {- | Module : Orville.PostgreSQL.Expr.OrderBy.OrderByDirection Copyright : Flipstone Technology Partners 2016-2021 License : MIT -} module Orville.PostgreSQL.Internal.Expr.OrderBy.OrderByDirection ( OrderByDirection, ascendingOrder, descendingOrder, ) where ...
flipstone/orville
orville-postgresql-libpq/src/Orville/PostgreSQL/Internal/Expr/OrderBy/OrderByDirection.hs
mit
671
0
7
81
91
57
34
12
1
{-# LANGUAGE DataKinds #-} -- Metadata Arrays (MAs) -- | Header | El m ... El n-1 | padding_opt -- where the Header might be another (smaller) MA -- General rule: to each range El x .. El x+k -- there are a few (shared) bits in the Header -- k may be different for each MA -- the position of the Header bits ca...
ggreif/al4nin
purgatory/MemAreas.hs
mit
1,222
0
10
272
70
50
20
-1
-1
module Data.Numeral.Boolean where import Prelude hiding (and, or, not) import Control.Monad (join) import Control.Boolean {-- A solution to the boolean arithmetic problem posted at http://lpaste.net/108358 The meta language: Given the operators from yesterday (and, or, not, etc), and only one data type, Bool, oka...
geophf/1HaskellADay
exercises/HAD/Data/Numeral/Boolean.hs
mit
4,870
0
15
1,317
1,197
618
579
65
5
module Stackage.Tarballs ( makeTarballs ) where import qualified Codec.Archive.Tar as Tar import qualified Data.ByteString.Lazy as L import qualified Data.Map as Map import qualified Data.Set as Set import Stackage.Types import Stackage.Util import Syste...
ekmett/stackage
Stackage/Tarballs.hs
mit
1,747
0
19
572
480
250
230
35
5
module Test.Smoke.App.Diff.Types ( DiffEngine (..), PrintDiff, RenderDiff, Text, ) where import Data.Text (Text) import Test.Smoke.App.OptionColorOutput data DiffEngine = DiffEngine { engineName :: String, engineEnabled :: IO Bool, engineRender :: PrintDiff } type PrintDiff = ColorOutput ...
SamirTalwar/Smoke
src/app/Test/Smoke/App/Diff/Types.hs
mit
377
0
9
78
102
64
38
13
0
module Parser where import System.FilePath.Posix (takeExtension) import Text.Parsec import Text.Parsec.String import Data.List (find, isSuffixOf) import Constants import Git import Types parseStartingCardReference :: StartingSparkRefer...
plietar/super-user-spark
src/Parser.hs
mit
11,002
0
20
2,648
3,036
1,473
1,563
296
6
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE QuasiQuotes #-} module Test.GBA.Thumb.T3 (tests) where import Control.Applicative import Data.Bits import Data.Word import Language.Literals.Binary import Test.HUnit import Test.QuickCheck import Test.QuickCheck.Modifiers import Test.Tasty (TestTree, testGroup) im...
jhance/gba-hs
test/Test/GBA/Thumb/T3.hs
mit
10,244
0
17
2,949
3,286
1,687
1,599
282
1
{-- Copyright (c) 2012 Gorka Suรกrez Garcรญa 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, distri...
gorkinovich/Haskell
Others/Fibonacci.hs
mit
2,179
0
13
457
409
214
195
20
2
module Codec.Image.DevIL.Extensions where import Algebra.Vector as Vector import Codec.Image.DevIL as Devil import Data.Array.Unboxed as UArray import Data.List as List import Data.Map as Map import Data.Tuple.Extensions as TupleExt import Data.Word as Word initializeLibrary = Devil.ilInit imageArrayToMap :: (UArray ...
stevedonnelly/haskell
code/Codec/Image/DevIL/Extensions.hs
mit
901
1
20
138
322
182
140
19
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module MonadTransformersPlayground ( Exp(..) , Value(..) , Eval2 , Env ...
futtetennista/IntroductionToFunctionalProgramming
src/MonadTransformersPlayground.hs
mit
11,812
0
19
3,221
4,308
2,166
2,142
321
4
module Dumblisp.Env (nullEnv, isBound, getVar, setVar, defineVar, bindVars) where import Dumblisp.Types import Control.Monad.Error import Data.IORef import Data.Maybe nullEnv :: IO Env nullEnv = newIORef [] isBound :: Env -> String -> IO Bool isBound envRef var = readIORef envRef >>= return . isJust . lookup var ge...
mmailhot/Dumblisp
Dumblisp/Env.hs
mit
1,691
0
14
534
521
259
262
35
2
-- Copyright 2012 Mitchell Kember. Subject to the MIT License. -- | An extension to "Luminosity.Vector" for the more specific usage of -- vectors to represent colours, with some useful operations on them. module Luminosity.Colour ( -- * Type synonyms Colour , Colour24 , ColourT -- * Re-exported types , VectorT(..) -...
mk12/luminosity
src/Luminosity/Colour.hs
mit
1,308
0
9
267
261
147
114
20
1
-- | -- Utilities for dealing with 'FilePath'. -- module APITests.Util.FileSystem ( module Filesystem, module Filesystem.Path.CurrentOS, Status(..), getStatus, getExists, getTemporaryDirectory, remove, removeIfExists, removeTreeIfExists, move, copy, resolve, listF...
nikita-volkov/graph-db
executables/APITests/Util/FileSystem.hs
mit
2,869
0
18
679
910
454
456
94
3
module Symtable ( Symbol , Symtable , empty , Symtable.lookup , Symtable.elem , insert ) where import Data.Monoid import qualified Data.Map as M import qualified Data.ByteString.Lazy.Char8 as B -- |For now, a symbol is sim...
gnuvince/vfb-coolc
src/Symtable.hs
mit
1,461
0
8
354
366
200
166
27
1
module Main (main) where import Data.List (genericLength) import Data.Maybe (catMaybes) import System.Exit (exitFailure, exitSuccess) import System.Process (readProcess) import Text.Regex (matchRegex, mkRegex) arguments :: [String] arguments = [ "report" , "dist/hpc/tix/tests/tests.tix" ] average :: (Fra...
danplubell/CTG1371
test-suite/HPC.hs
mit
774
0
11
159
267
144
123
23
2
{-# LANGUAGE CPP #-} module Control.Timeout.TimerManager ( registerTimeout , unregisterTimeout ) where import Control.Concurrent (rtsSupportsBoundThreads) import Data.Time.Clock (NominalDiffTime) import Unsafe.Coerce (unsafeCoerce) import qualified GHC.Event as Event import Control.Timeout.Types (Timeout...
lambda-llama/timeout
src/Control/Timeout/TimerManager.hs
mit
1,165
0
11
191
279
150
129
23
1
{-# LANGUAGE OverloadedStrings #-} -- | The project loaded successfully, show the two panes. module View.Loaded where import Model import SharedTypes import Types import Control.Applicative import Control.Concurrent.STM import Control.Monad import ...
fpco/stackage-view
client/View/Loaded.hs
mit
3,378
0
21
1,367
1,043
513
530
90
2
{-# LANGUAGE RecordWildCards #-} {-# Language TemplateHaskell #-} {-# Language DeriveDataTypeable #-} {-# Language DeriveGeneric #-} module DistribChatNoSlave where import System.IO import Network import Text.Printf import Data.Typeable import Data.Binary import GHC.Generics import qualified Data.Map.Lazy as M import...
y-kamiya/parallel-concurrent-haskell
src/Server/DistribChatNoSlave.hs
gpl-2.0
12,572
0
22
3,016
4,047
1,956
2,091
310
9
module FrequentPatterns ( frequentPatterns ) where import DataModel import qualified Data.Set as Set import Debug.Trace (trace) import qualified Data.List as List import Control.Parallel.Strategies(parMap, rpar) semiUnion :: ItemSet -> ItemSet -> ItemSet semiUnion (ItemSet set1) (ItemSet set2) = ItemSet $ ...
Xawirses/GitMining
FrequentPatterns.hs
gpl-2.0
1,566
0
14
354
540
289
251
29
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE LambdaCase #-} ----------------------------------------------------------------------------- -- -- Module : IDE.ImportTool -- Copyright : 2007-2011 Juergen Nicklisch-Franken, Hamish Mackenzie -- License : GPL -- -- Maintainer : Jutaro <jutaro@leksah.org> -...
JPMoresmau/leksah
src/IDE/ImportTool.hs
gpl-2.0
29,080
215
34
11,006
6,855
3,656
3,199
516
13
{- emacs2nix - Generate Nix expressions for Emacs packages Copyright (C) 2016 Thomas Tuegel 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 3 of the License, or (at your option) any l...
ttuegel/emacs2nix
src/Distribution/Nix/Hash.hs
gpl-3.0
1,515
0
13
273
222
121
101
23
2
pattern (const pempty)
kaoskorobase/mescaline
tests/patterns/empty.hs
gpl-3.0
23
1
5
3
11
6
5
-1
-1
-- grid is a game written in Haskell -- Copyright (C) 2018 karamellpelle@hotmail.com -- -- This file is part of grid. -- -- grid is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, either version 3 of the Lice...
karamellpelle/grid
source/Game/Run/Iteration/Iteration.hs
gpl-3.0
5,260
1
22
1,522
1,059
558
501
77
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Settings/UpdateLanguage.hs
mpl-2.0
6,078
0
20
1,404
795
467
328
118
1
module StartingEnv where import qualified Data.Set as Set import qualified Data.Map as Map import ColorText import Obj import Types import Template import ToTemplate import ArrayTemplates import Commands import Parsing import Eval import Concretize -- | These modules will be loaded in order before any other code is ...
eriksvedang/Carp
src/StartingEnv.hs
mpl-2.0
15,075
0
20
5,526
2,887
1,596
1,291
274
2
module Bustle.Translation ( initTranslation , __ ) where initTranslation :: IO () initTranslation = return () __ :: String -> String __ = id
wjt/bustle
src-no-hgettext/Bustle/Translation.hs
lgpl-2.1
161
0
6
44
48
27
21
8
1
{- Created : 2014 Dec 27 (Sat) 14:14:39 by Harold Carr. Last Modified : 2014 Dec 30 (Tue) 12:31:03 by Harold Carr. -} {-# LANGUAGE NPlusKPatterns #-} import Prelude hiding (all, length, map, repeat, replicate, take, (++), (.)) import Test.HUnit ...
haroldcarr/learn-haskell-coq-ml-etc
haskell/course/2014-10-edx-delft-fp101x-intro-to-fp-erik-meijer/hw12.hs
unlicense
21,403
2
11
10,212
1,042
571
471
58
1
module Miscellaneous.A334006Spec (main, spec) where import Test.Hspec import Miscellaneous.A334006 (a334006) main :: IO () main = hspec spec spec :: Spec spec = describe "A334006" $ it "correctly computes the first 20 elements" $ map a334006 [1..20] `shouldBe` expectedValue where expectedValue = [1,1,1,1,...
peterokagey/haskellOEIS
test/Miscellaneous/A334006Spec.hs
apache-2.0
353
0
8
57
154
92
62
10
1
{-# LANGUAGE RecordWildCards #-} module Main ( main ) where import Universum import Control.Exception.Safe (handle) import Data.Maybe (fromMaybe) import Formatting (sformat, shown, (%)) import qualified Network.Transport.TCP as TCP (TCPAddr (..)) import qualified...
input-output-hk/cardano-sl
auxx/Main.hs
apache-2.0
7,874
0
19
2,661
1,662
899
763
-1
-1
{-# LANGUAGE DataKinds #-} module Spark.MLlib.Types where import Java import Spark.Core data {-# CLASS "org.apache.spark.mllib.classification.ClassificationModel" #-} ClassificationModel = ClassificationModel (Object# ClassificationModel) deriving Class data {-# CLASS "org.apache.spark.mllib.linalg.Vector" #-} ...
Jyothsnasrinivas/eta-spark-mllib
src/Spark/MLlib/Types.hs
apache-2.0
10,103
0
10
1,122
1,335
776
559
-1
-1
-- 871198282 import Data.List(sort) import Euler(readWords, wordScore) sumScores ws = sum $ map (\(n,w) -> n * wordScore w) $ zip [1..] (sort ws) main = do s <- readFile "../files/names.txt" putStrLn $ show $ sumScores $ readWords s
higgsd/euler
hs/22.hs
bsd-2-clause
243
0
11
49
110
57
53
6
1
-- -- Copyright (c) 2013, Carl Joachim Svenn -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- -- 1. Redistributions of source code must retain the above copyright notice...
karamellpelle/MEnv
source/GUI/Widget/ScaleWidget.hs
bsd-2-clause
3,328
0
11
767
584
316
268
45
1
{-# LANGUAGE CPP,TemplateHaskell,DeriveDataTypeable #-} {- | This module implements Windows Codepage number 1253 which encodes modern greek. See <http://en.wikipedia.org/wiki/CP1253> for more information. -} module Data.Encoding.CP1253 (CP1253(..)) where import Data.Array ((!),Array) import Data.Word (Word8) im...
abuiles/turbinado-blog
tmp/dependencies/encoding-0.4.1/Data/Encoding/CP1253.hs
bsd-3-clause
1,036
2
14
146
291
163
128
23
1
{-# LANGUAGE ForeignFunctionInterface #-} module Hydra.Solver.Sundials (sundials) where import Hydra import Foreign import Foreign.C.Types sundials :: Solver sundials = Solver { createSolver = c_create_solver , destroySolver = c_destroy_solver , solve = c_solve } foreign import ccall safe "create_solve...
giorgidze/Hydra
hydra-solver-sundials/src/Hydra/Solver/Sundials.hs
bsd-3-clause
670
0
18
125
179
97
82
20
1
{-# LANGUAGE TypeFamilies, OverloadedStrings #-} module Event ( parseInEvent , unParseOutEvent , InEvent(..) , OutEvent(..) , Response(..) , ServerIssued(..) ) where import Control.Applicative import Control.Monad hiding (join) import Data.Aeson import Data.ByteString.Lazy (ByteString) imp...
scvalex/logorrhea
server/Event.hs
bsd-3-clause
7,075
0
13
2,108
2,047
1,102
945
159
17
module Data.MediaBus.Media.Audio.RawSpec (spec) where import Control.Lens import Control.Monad (forM) import Data.Data (Proxy (Proxy)) import Data.MediaBus import Foreign (Storable (peekByteOff, pokeByteOff, sizeOf), allocaArray) import Test.Hspec import Test.QuickCheck spec :: Spec spec = do describe "Storable" $ ...
lindenbaum/mediabus
specs/Data/MediaBus/Media/Audio/RawSpec.hs
bsd-3-clause
2,186
0
22
501
808
397
411
-1
-1
module Statistics.Information.Mixed.TotalCorrelation where import Data.Matrix import qualified Statistics.Information.Continuous.Entropy as CE import Statistics.Information.Continuous.MutualInfo import qualified Statistics.Information.Continuous.TotalCorrelation as CTC import qualified Statistics.Information.Discrete....
eligottlieb/Shannon
src/Statistics/Information/Mixed/TotalCorrelation.hs
bsd-3-clause
2,314
0
11
514
978
522
456
47
1
module Test.Language.Javascript.ModuleParser ( testModuleParser ) where import Test.Hspec import Language.JavaScript.Parser testModuleParser :: Spec testModuleParser = describe "Parse modules:" $ do it "import" $ do -- Not yet supported -- test "import 'a';" `shouldBe` "" ...
alanz/language-javascript
test/Test/Language/Javascript/ModuleParser.hs
bsd-3-clause
2,979
0
12
637
223
115
108
43
1
{-# LANGUAGE OverloadedStrings #-} module Trombone.Db.Colorize ( colorize ) where import Data.Text ( Text, pack, unpack, stripStart, toLower ) import Data.List ( intersperse ) import System.Console.ANSI import qualified Data.Text as Text data SqlString = ...
johanneshilden/trombone
Trombone/Db/Colorize.hs
bsd-3-clause
3,068
0
12
1,158
1,023
551
472
95
4
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE RankNTypes #-} module Highlight.Common.Monad ( module Highlight.Common.Monad , module Highligh...
cdepillabout/highlight
src/Highlight/Common/Monad.hs
bsd-3-clause
4,372
0
11
769
784
466
318
77
2
{-# LANGUAGE DeriveGeneric #-} module Common where import Data.Typeable (Typeable) import GHC.Generics (Generic) import Unbound.Generics.LocallyNameless data Operation = Arith ArithOp | Logical LogicalOp deriving (Eq,...
lihuanglx/disjoint-intersection
src/Common.hs
bsd-3-clause
577
0
6
176
155
87
68
13
0
module System.Exit.AsEnv ( module System.Exit.AsEnv ) where -- generated by https://github.com/rvion/ride/tree/master/jetpack-gen import qualified System.Exit as I -- env_die :: forall a. String -> IO a env_die = I.die -- env_exitFailure :: forall a. IO a env_exitFailure = I.exitFailure -- env_exitSuccess :: f...
rvion/ride
jetpack/src/System/Exit/AsEnv.hs
bsd-3-clause
699
0
7
109
107
65
42
-1
-1
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable, NoMonomorphismRestriction, ScopedTypeVariables #-} module SerializeableJobs where import HAppS.State import Data.Generics import qualified MiscMap as M import qualified Data.ByteString.Char8 as B -- JobName is like a primary key, Job is like the other fields, if we we...
tphyahoo/happs-tutorial
src/SerializeableJobs.hs
bsd-3-clause
1,422
0
14
243
366
197
169
24
1
module Acme.Bash ( ($) , ($#) , ($@) , ($$) ) where import System.Environment import System.IO.Unsafe import qualified Prelude import Prelude hiding (($)) ($) :: (String -> b) -> Int -> b f $ 0 = f (unsafePerformIO getProgName) f $ n = f (arArgs n) ($#) :: Int ($#...
alvare/acme-bash
src/Acme/Bash.hs
bsd-3-clause
666
0
13
229
250
145
105
24
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE Trustworthy #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} ---------------------------------------...
tensor5/tensor
src/Data/MultiIndex.hs
bsd-3-clause
6,103
0
15
1,815
1,403
735
668
-1
-1
{-# LANGUAGE OverloadedStrings #-} import Hack2 import Hack2.Contrib.Response (set_body_bytestring) import Hack2.Handler.Warp import Data.Default (def) app :: Application app = \env -> return $ Response 200 [ ("Content-Type", "text/plain") ] "Hello World" main = do putStrLn "server started ..." run app
nfjinjing/hack2-handler-warp
test/hello.hs
bsd-3-clause
318
0
9
54
84
47
37
12
1
{-# LANGUAGE ViewPatterns #-} -- | Program providing real time visualization of TSP tours. -- This module is compiled to a separate binary and then -- used through an interface exposed over some input stream. -- Actions are parsed using a separate thread which updates -- a shared graph structure, which is then...
davnils/tsp-viz
TSPViz.hs
bsd-3-clause
7,884
0
17
1,618
2,174
1,143
1,031
126
2
import Prelude hiding (readFile) import System.IO(hSetBuffering,BufferMode(..),stdout) import System.IO.UTF8(readFile) import System.Directory(getDirectoryContents) import System.FilePath((</>)) import System.Environment(getArgs) import Data.List(isSuffixOf) import Control.Monad(when) import Graphics.Rendering.Chart.Ba...
RayRacine/hs-word2vec
word2vec.hs
bsd-3-clause
2,044
0
14
400
709
352
357
54
2
{-# language CPP #-} -- No documentation found for Chapter "InputSourceLocalizedNameFlagBits" module OpenXR.Core10.Enums.InputSourceLocalizedNameFlagBits ( InputSourceLocalizedNameFlags , InputSourceLocalizedNameFlagBits( INPUT_SOURCE_LOCALIZED_NAME_USER_PAT...
expipiplus1/vulkan
openxr/src/OpenXR/Core10/Enums/InputSourceLocalizedNameFlagBits.hs
bsd-3-clause
3,613
1
10
939
372
221
151
-1
-1
{-# LANGUAGE Safe #-} {-# LANGUAGE AutoDeriveTypeable #-} {-# LANGUAGE NoImplicitPrelude #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Version -- Copyright : (c) The University of Glasgow 2004 -- License : BSD-style (see the file libraries/base/LI...
bitemyapp/ghc
libraries/base/Data/Version.hs
bsd-3-clause
5,329
0
12
1,194
467
281
186
37
1
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 HsTypes: Abstract syntax: user-defined types -} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TypeSynonymInstance...
sgillespie/ghc
compiler/hsSyn/HsTypes.hs
bsd-3-clause
51,304
1
17
13,146
8,538
4,592
3,946
540
7
{-# LANGUAGE RankNTypes #-} module HTML ( formHTML , postsHTML , body ) where import Control.Monad.IO.Class (MonadIO, liftIO) import Data.Monoid ((<>)) import qualified Data.Text as T import Data.Text.Lazy (Text) import Data.T...
daimatz/scotty-on-heroku
src/HTML.hs
bsd-3-clause
1,720
0
10
472
479
254
225
39
5
{-# LANGUAGE OverloadedStrings #-} import Control.Monad.IO.Class import Crypto.Hash import Data.Aeson import qualified Data.ByteString.Lazy as Lazy import Data.Monoid ((<>)) import Data.Tree import System.Directory import System.FilePat...
Evan-Zhao/FastCanvas
src/Sync/DirTree.hs
bsd-3-clause
2,466
0
14
671
821
416
405
55
2
{-# LANGUAGE RankNTypes #-} module System.Win32.DHCP.Reservation ( Mapping (..) , Reservation (..) , reservation ) where import Data.Ip import Data.Mac import Import import System.Win32.DHCP.CLIENT_UID import System.Win32.DHCP.DhcpStructure import System.Win32.DHCP.Types (ClientType) -- | A Reservati...
mikesteele81/Win32-dhcp-server
src/System/Win32/DHCP/Reservation.hs
bsd-3-clause
2,785
0
11
564
546
294
252
56
1
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TupleSections #-} module Network.Oz.JSON where import Data.Aeson import Data.Aeson.Types import qualified Data.Aeson.Types as JSON import Data.Char (toLower) import Data.Maybe (catMaybes) imp...
rvl/hsoz
src/Network/Oz/JSON.hs
bsd-3-clause
3,695
1
23
1,393
949
502
447
78
1
{-# LANGUAGE PatternSynonyms #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.NV.TransformFeedback -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portabi...
haskell-opengl/OpenGLRaw
src/Graphics/GL/NV/TransformFeedback.hs
bsd-3-clause
2,253
0
5
254
240
155
85
50
0
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} module MyDo(mdo) where import Data.Semigroup class VarArg a where mdo :: a instance {-# OVERLAPS #-} Monoid m => VarArg m where mdo = mempty instance VarArg (m -> m) where mdo m = m instance (Semigroup m, VarArg (m -> r)) => VarArg (m ->...
bmabsout/neural-swarm
src/MyDo.hs
bsd-3-clause
361
0
9
79
135
73
62
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-ses/gen/Network/AWS/SES/SendRawEmail.hs
mpl-2.0
6,551
0
10
1,321
606
380
226
66
1
{- Copyright 2007 Levi Stephen 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 agreed to in wr...
bitemyapp/hst
src/HST/PPrint.hs
apache-2.0
1,289
0
11
263
312
154
158
16
1
{- | Module : Camfort.Specification.Units.Annotation Description : Annotation with unit information. Copyright : (c) 2017, Dominic Orchard, Andrew Rice, Mistral Contrastin, Matthew Danish License : Apache-2.0 Maintainer : dom.orchard@gmail.com Stability : experimental Defines the 'UnitAnnotation' ...
dorchard/camfort
src/Camfort/Specification/Units/Annotation.hs
apache-2.0
4,362
0
15
873
1,126
618
508
75
1
-- boilerplate {{{ {-| This is a parser for the go\/igo\/weiqi\/baduk fragment of the SGF format. Encodings latin-1, utf-8, and ascii are supported, and the parser strives to be robust to minor errors, especially those made by the most common SGF editors. There are plans to support other games and pretty-printing in fu...
tonicebrian/sgf
Data/SGF.hs
bsd-3-clause
6,991
0
5
1,373
101
74
27
11
0
{-# LANGUAGE BangPatterns #-} {-# OPTIONS_HADDOCK hide, prune #-} -- | -- Module : Data.ByteString.Search.Internal.KnuthMorrisPratt -- Copyright : Justin Bailey -- Chris Kuklewicz -- Daniel Fischer -- Licence : BSD3 -- Maintainer : Daniel Fischer <daniel.is.fisc...
seereason/stringsearch
Data/ByteString/Search/Internal/KnuthMorrisPratt.hs
bsd-3-clause
9,602
0
16
3,118
1,152
642
510
97
8
{-# LANGUAGE OverlappingInstances, TypeSynonymInstances, FlexibleInstances #-} -- | -- Module : Data.BERT.Term -- Copyright : (c) marius a. eriksen 2009 -- -- License : BSD3 -- Maintainer : marius@monkey.org -- Stability : experimental -- Portability : GHC -- -- Define BERT terms their binary encoding &...
mariusae/bert
Data/BERT/Term.hs
bsd-3-clause
11,097
0
14
2,637
3,891
2,002
1,889
244
20
{-# LANGUAGE Haskell98 #-} {-# LINE 1 "Data/Map.hs" #-} {-# LANGUAGE CPP #-} {-# LANGUAGE Safe #-} ...
phischu/fragnix
tests/packages/scotty/Data.Map.hs
bsd-3-clause
4,959
0
11
1,252
406
259
147
32
1
-- \section[Hooks]{Low level API hooks} -- NB: this module is SOURCE-imported by DynFlags, and should primarily -- refer to *types*, rather than *code* -- If you import too muchhere , then the revolting compiler_stage2_dll0_MODULES -- stuff in compiler/ghc.mk makes DynFlags link to too much stuff module Eta.Main....
rahulmutt/ghcvm
compiler/Eta/Main/Hooks.hs
bsd-3-clause
3,823
0
16
1,014
792
455
337
70
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="sr-CS"> <title>TreeTools</title> <maps> <homeID>treetools</homeID> <mapref location="ma...
kingthorin/zap-extensions
addOns/treetools/src/main/javahelp/help_sr_CS/helpset_sr_CS.hs
apache-2.0
960
77
66
155
404
205
199
-1
-1
module TiDerivedInstances(derivedInstances) where import HasBaseStruct import HsDecl import TI import TiSolve(expandSynonyms) import TiContextReduction(contextReduction'') import TiInstanceDB(addInstKind) import TiSCC(sccD) import SrcLoc1 import Deriving(derive) import FreeNamesBase() import Data.Maybe(mapMaybe) impo...
kmate/HaRe
old/tools/base/TI/TiDerivedInstances.hs
bsd-3-clause
3,641
41
13
912
1,367
741
626
82
12
{-# OPTIONS_JHC -fno-prelude -fffi -funboxed-tuples #-} -- | this module provides a once-updatable value that may be used in pure code. -- it is an _unchecked_ error to read a hole before it has been filled in. -- filling in a hole has the effect of 'seq'ing its value immediatly so lift it in -- a datatype if this is a...
m-alvarez/jhc
lib/jhc/Jhc/Hole.hs
mit
1,347
3
13
261
222
128
94
-1
-1
{-# LANGUAGE PolyKinds, ExplicitForAll #-} module T7916 where import Data.Kind (Type) f :: forall k (m :: k -> Type) (a :: k). m a -> m a f = id -- g :: forall (m :: k -> Type) (a :: k). m a -> m a g x = f x data M f = M (f Int) -- Test that g :: forall (m :: k -> Type) (a :: k). m a -> m a g1 = g :: [Int] -> [Int...
sdiehl/ghc
testsuite/tests/polykinds/T7916.hs
bsd-3-clause
345
0
8
100
127
73
54
-1
-1
{-# LANGUAGE CPP #-} {-# OPTIONS_HADDOCK hide #-} module Distribution.Client.Compat.FilePerms ( setFileOrdinary, setFileExecutable, setFileHidden, ) where #ifndef mingw32_HOST_OS import System.Posix.Types ( FileMode ) import System.Posix.Internals ( c_chmod ) import Foreign.C ( withC...
themoritz/cabal
cabal-install/Distribution/Client/Compat/FilePerms.hs
bsd-3-clause
1,045
0
9
187
177
102
75
21
1
module Rn053_B where data D = C1 | C2
urbanslug/ghc
testsuite/tests/rename/should_compile/Rn053_B.hs
bsd-3-clause
41
0
5
12
14
9
5
2
0
{-| This module's sole purpose is to provide APIs to allow people to work with GLFW's input API through Netwire. -} module Input where -------------------- -- Global Imports -- import Graphics.UI.GLFW as GLFW import Control.Wire ---------- -- Code -- {-| Blocks if a given key is down. -} isKeyDown :: (Enum k, ...
crockeo/netwire-tutorial
src/part3/Input.hs
mit
492
0
13
122
114
62
52
10
2