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 OverloadedStrings #-} -- | Facilities for handling Futhark benchmark results. A Futhark -- benchmark program is just like a Futhark test program. module Futhark.Bench ( RunResult (..), DataResult (..), BenchResult (..), Result (..), encodeBenchResults, ...
diku-dk/futhark
src/Futhark/Bench.hs
isc
8,612
0
23
1,927
2,459
1,287
1,172
195
6
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE DeriveDataTypeable #-} -- | -- Module: Aws.Sns.Commands.ConfirmSubscription -- Copyright: ...
alephcloud/hs-aws-sns
src/Aws/Sns/Commands/ConfirmSubscription.hs
mit
5,437
0
17
1,050
678
403
275
77
1
-- | Socket related types module Network.Anonymous.I2P.Types.Socket where import qualified Network.Socket as NS -- | Alias for a hostname type HostName = NS.HostName -- | Alias for a port number type PortNumber = NS.PortNumber -- | Socket types data SocketType = -- | Virtual streams are guaranteed to be sent reli...
bitemyapp/haskell-network-anonymous-i2p
src/Network/Anonymous/I2P/Types/Socket.hs
mit
1,325
0
5
251
64
49
15
8
0
module PCProblem.Quiz where -- -- $Id$ import PCProblem.Type import PCProblem.Param import PCProblem.Generator import Inter.Types import Inter.Quiz import Challenger.Partial import Data.Array import Autolib.Reporter import Data.List (isPrefixOf) import Autolib.ToDoc import Autolib.Informed instance OrderScore PC...
florianpilz/autotool
src/PCProblem/Quiz.hs
gpl-2.0
2,169
27
14
662
692
356
336
-1
-1
{-# LANGUAGE TypeFamilies #-} module Lamdu.Sugar.Convert.DefExpr.OutdatedDefs ( scan ) where import Control.Applicative ((<|>)) import qualified Control.Lens.Extended as Lens import Control.Monad (foldM) import Control.Monad.Transaction (MonadTransaction(..)) import qualified Data...
lamdu/lamdu
src/Lamdu/Sugar/Convert/DefExpr/OutdatedDefs.hs
gpl-3.0
10,061
0
20
3,142
3,163
1,604
1,559
-1
-1
main = take 100 (iterate (/. 10000.0) 1.0)
roberth/uu-helium
test/simple/correct/Underflow.hs
gpl-3.0
43
1
8
8
26
12
14
1
1
main :: Bool -> () main = \True -> ()
roberth/uu-helium
test/staticwarnings/Lambda1.hs
gpl-3.0
40
0
8
12
30
14
16
2
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# OPTIONS_GHC -Wall -Werror #-} {-| A simple logger that reads `LogEntry` from a `TBChan` and dumps JSON-formatted strings to `stdout`. -} module GameServer.Log ( -- * Types LoggerEnv -- * Constru...
abailly/hsgames
game-server/src/GameServer/Log.hs
apache-2.0
4,188
0
13
1,476
1,194
629
565
-1
-1
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 Taken quite directly from the Peyton Jones/Lester paper. -} {-# LANGUAGE CPP #-} -- | A module concerned with finding the free variables of an expression. module CoreFVs ( -- * Free variables of expressions and bi...
shlevy/ghc
compiler/coreSyn/CoreFVs.hs
bsd-3-clause
30,461
0
14
7,644
5,449
2,933
2,516
408
11
{-# LANGUAGE CPP #-} {-# LANGUAGE MultiParamTypeClasses #-} -- for 'Bind' class. {-# LANGUAGE ConstraintKinds #-} -- for 'Bind' class. {-# LANGUAGE TypeFamilies #-} -- for 'Bind' class. {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE UndecidableInstances #-} {-#...
jbracker/supermonad-plugin
src/Control/Super/Monad.hs
bsd-3-clause
35,259
0
15
6,793
13,738
7,447
6,291
471
1
{-# LANGUAGE TemplateHaskell #-} module Board.Space.Space where import Board.Adventure.Adventure import Board.Follower.Follower import Board.Object.Object import Data.Map import TalismanErrors.TalismanErrors import Control.Lens import Data.List as List class DrawCards a where cardsToDraw :: a -> Int data SpaceTyp...
charleso/intellij-haskforce
tests/gold/codeInsight/TotalProject/Board/Space/Space.hs
apache-2.0
5,309
0
12
1,120
1,327
755
572
130
1
{-# OPTIONS_GHC -Wall #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} module Elm.Utils ( (|>), (<|) , getAsset , run, unwrappedRun , CommandError(..) , isDeclaration ) where import Control.Monad.Except (MonadError, MonadIO, liftIO, throwError) import qualified Data....
laszlopandy/elm-compiler
src/Elm/Utils.hs
bsd-3-clause
4,764
0
16
1,225
1,001
548
453
107
4
{-| Module : Idris.Package Description : Functionality for working with Idris packages. License : BSD3 Maintainer : The Idris Community. -} {-# LANGUAGE CPP #-} module Idris.Package where import System.Directory import System.Environment import System.Exit import System.FilePath (addExtension, addTrailingPa...
kojiromike/Idris-dev
src/Idris/Package.hs
bsd-3-clause
18,629
0
26
5,649
5,080
2,472
2,608
387
22
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Control.CP.Herbrand.Prolog ( Prolog , module Control.CP.Herbrand.PrologTerm , PConstraint (..) ) where import Control.Monad (zipWithM) import Control.CP...
neothemachine/monadiccp
src/Control/CP/Herbrand/Prolog.hs
bsd-3-clause
2,783
0
16
1,025
865
445
420
70
7
{-# language OverloadedStrings #-} -- | benchmarking Base.Font.searchGlyphs import qualified Data.Text as T import Data.Initial import Data.Map import Control.Monad.Reader import Control.DeepSeq import Graphics.Qt import Utils import Base import Base.Font import Criterion.Main main = flip runReaderT (save...
geocurnoff/nikki
src/benchmarks/searchGlyphs.hs
lgpl-3.0
862
1
16
179
275
140
135
25
1
{-| Module : IRTS.Defunctionalise Description : Defunctionalise Idris' IR. Copyright : License : BSD3 Maintainer : The Idris Community. To defunctionalise: 1. Create a data constructor for each function 2. Create a data constructor for each underapplication of a function 3. Convert underapplications to th...
tpsinnem/Idris-dev
src/IRTS/Defunctionalise.hs
bsd-3-clause
16,192
0
25
6,053
6,209
3,126
3,083
292
36
-- !!! Testing the Word Enum instances. module Main(main) where import Control.Exception import Data.Word import Data.Int main = do putStrLn "Testing Enum Word8:" testEnumWord8 putStrLn "Testing Enum Word16:" testEnumWord16 putStrLn "Testing Enum Word32:" testEnumWord32 putStrLn "Testing Enum Word64:" ...
sdiehl/ghc
libraries/base/tests/enum03.hs
bsd-3-clause
8,689
0
15
1,559
4,799
2,623
2,176
181
1
module GuardsIn1 where merge :: (a -> a -> Ordering) -> [a] -> [a] -> [a] merge cmp xs [] = xs merge cmp [] ys = ys merge cmp (x:xs) (y:ys) = case x `cmp` y of GT -> y : merge cmp (x:xs) ys _ -> x : merge cmp xs (y:ys) {- mergeIt xs ys = merge compare xs ys -} mergeIt :: (a -> a -> Orderin...
mpickering/HaRe
old/testing/generativeFold/GuardsIn1.hs
bsd-3-clause
611
0
11
182
301
160
141
14
2
module Main where -- import Data.Default.Class (def) import qualified Network.IRC as IRC import qualified Data.Text.Encoding as TE import qualified Data.Text as T import qualified Network.TLS as TLS import BasePrelude hiding (handle) import Utils host :: HostName host = "irc.feelings.blackfriday" port :: PortNumbe...
hlian/thomas-hauk
src/Main.hs
mit
1,015
0
16
189
341
176
165
28
1
{- OPTIONS_GHC -funbox-strict-fields -} module Crypto.PubKey.OpenSsh.Types where import Data.ByteString (ByteString) import qualified Crypto.Types.PubKey.DSA as DSA import qualified Crypto.Types.PubKey.RSA as RSA data OpenSshPrivateKey = OpenSshPrivateKeyRsa !RSA.PrivateKey | OpenSshPrivateKe...
knsd/crypto-pubkey-openssh
src/Crypto/PubKey/OpenSsh/Types.hs
mit
727
0
8
150
134
78
56
27
0
{-# Language DeriveFunctor #-} {-# Language DeriveTraversable #-} {-# Language DeriveFoldable #-} module Unison.Parser where import Control.Applicative import Control.Monad import Data.Char (isSpace) import Data.List hiding (takeWhile) import Data.Maybe import Prelude hiding (takeWhile) import qualified Data.Char as ...
nightscape/platform
shared/src/Unison/Parser.hs
mit
7,106
0
16
1,633
3,132
1,591
1,541
183
2
{-# LANGUAGE CPP #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE OverloadedStrings #-} module Main where import Prelude hiding (catch) import CV.Image import System.Environment import Data.IORef import GHC.Exts (unsafe...
deggis/CV-web
src/tester.hs
mit
4,186
0
18
1,099
1,000
511
489
87
2
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeOperators #-} module Control.Eff.Log ( Log(Log, logLine) ...
ibotty/log-effect
src/Control/Eff/Log.hs
mit
4,653
0
12
1,192
1,406
755
651
89
3
{-# LANGUAGE TypeFamilies #-} -- | Defines types used generally in the program module Types ( Trans (..) , Turn (..) , Point (..) , BVect (..) ) where -------------------------------------------------------------------------------- ---------------------------------...
sebmathguy/icfp-2015
library/Types.hs
mit
2,885
0
12
795
575
323
252
44
0
module CFDI.Types.Suburb where import CFDI.Types.Type import Control.Error.Safe (justErr) import Text.Read (readMaybe) newtype Suburb = Suburb Int deriving (Eq, Read, Show) instance Type Suburb where parseExpr c = justErr NotInCatalog maybeSuburb where maybeSuburb = Suburb <$> (readMaybe c >>= i...
yusent/cfdis
src/CFDI/Types/Suburb.hs
mit
505
0
13
132
180
94
86
13
0
module Cis194Bench (benchmarks) where import Cis194 import Criterion benchmarks :: [Benchmark] benchmarks = [ bench "main" (nfIO main) ]
tylerjl/cis194
benchmark/Cis194Bench.hs
mit
148
0
8
30
42
25
17
6
1
main = do putStrLn "Enter a string with brackets in it: " input <- getLine putStrLn ("Your input was: " ++ input) putStrLn ("Brackets" ++ (describeBool $ bracketMatch input) ++ " matched!") bracketMatch :: String -> Bool bracketMatch [] = True bracketMatch [x] = False bracketMatch xs | -1 `elem` s...
supermitch/learn-haskell
sandbox/brackets.hs
mit
747
3
13
183
255
128
127
19
3
{-# LANGUAGE TemplateHaskell #-} module Examples where import Database.HLINQ.Info import Database.HLINQ.Utilities import Control.Monad import Language.Haskell.TH import Language.Haskell.TH.Syntax import Data.Hashable createDB "test.db" "test" --main = do -- -- checkDBConsistency -- x <- checkDBConsistency' -- case x ...
juventietis/HLINQ
examples/Examples.hs
mit
3,271
27
12
722
499
362
137
-1
-1
module Ch08 where import Data.List import Data.Char import qualified Data.Map as Map import Control.Monad -- main = do -- _ <- putStrLn "Hello, what's your name?" -- name <- getLine -- putStrLn $ "Hey " ++ name ++ ", you rock!" -- main = do -- putStrLn "What's ur first name?" -- firstName <- getLine -- p...
sol2man2/Learn-You-A-Haskell-For-Great-Good
src/Ch08.hs
mit
2,714
0
15
756
202
150
52
13
1
{-# htermination (properFraction :: Ratio MyInt -> Tup2 MyInt (Ratio MyInt)) #-} import qualified Prelude data MyBool = MyTrue | MyFalse data List a = Cons a (List a) | Nil data Tup2 a b = Tup2 a b ; data Integer = Integer MyInt ; data MyInt = Pos Nat | Neg Nat ; data Nat = Succ Nat | Zero ; data Ratio a = ...
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/properFraction_1.hs
mit
2,763
28
9
572
1,463
712
751
62
1
module Main where import Prelude hiding (map) greet :: String -> String greet "xxx" = "who is xxx?" greet name = "Hello " ++ name ++ " !@@@" mini :: Int -> Int -> Int mini 0 0 = 0 mini x y | x > y && x == y = x | otherwise = y mio :: String -> IO String mio s = do x <- getLine ...
Numberartificial/workflow
haskell-first-principles/haskell-programming-from-first-principles-master/src/Main.hs
mit
493
0
10
170
186
92
94
16
1
{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances #-} module CSPMTypeChecker.TCExpr () where import CSPMDataStructures import CSPMTypeChecker.TCCommon import {-# SOURCE #-} CSPMTypeChecker.TCDecl import CSPMTypeChecker.TCDependencies import CSPMTypeChecker.TCPat import CSPMTypeChecker.TCMonad...
tomgr/tyger
src/CSPMTypeChecker/TCExpr.hs
mit
5,750
98
15
1,440
2,089
933
1,156
214
1
import qualified Data.Char as Char toDigits :: Integer -> [Integer] toDigits i | i <= 0 = [] | otherwise = f $ show i where f (x:[]) = (toInteger $ Char.digitToInt x) : [] f (x:xs) = (toInteger $ Char.digitToInt x) : f xs toDigitsRev :: Integer -> [Integer] toDigitsRev i = reverse $ toDigits i ...
samidarko/cis194
01-intro/01-intro.hs
mit
902
3
14
218
509
253
256
21
2
-- | This is a library for creating AWS CloudFormation templates. -- -- CloudFormation is a system that creates AWS resources from declarative -- templates. One common criticism of CloudFormation is its use of JSON as the -- template specification language. Once you have a large number of templates, -- possibly includi...
frontrowed/stratosphere
library/Stratosphere.hs
mit
3,136
0
5
610
152
118
34
19
0
{- | Module : $Header$ Copyright : (c) Felix Gabriel Mance License : GPLv2 or higher, see LICENSE.txt Maintainer : f.mance@jacobs-university.de Stability : provisional Portability : portable Printer for N-triples -} module RDF.Print where import Common.AS_Annotation import Common.Doc hiding (se...
nevrenato/Hets_Fork
RDF/Print.hs
gpl-2.0
4,654
0
18
1,200
1,496
745
751
112
4
module CCTK.RainbowTable ( Table(), build, build1, build', crack, shape, effectiveness, load, save, unsafeMerge ) where import Control.Parallel.Strategies import Control.Monad.Random import Data.List (foldl', tails, unfoldr) import Data.Map (Map) import qualified Data.Map as M i...
maugier/cctk
src/CCTK/RainbowTable.hs
gpl-3.0
3,252
0
17
924
1,367
709
658
71
3
{-# LANGUAGE TemplateHaskell, ViewPatterns #-} {-# OPTIONS -Wall #-} module ExampleTriangulations where import Blender.Types import Control.Exception import Data.Vect.Double import EdgeCentered import THUtil import TriangulationCxtObject import Data.SumType import Util import PreRenderable import Numeric.AD.Vector imp...
DanielSchuessler/hstri
ExampleTriangulations.hs
gpl-3.0
5,805
0
18
1,418
2,158
1,193
965
-1
-1
{-# LANGUAGE OverloadedStrings,PatternGuards #-} module Lang.PrettyAltErgo where import Text.PrettyPrint import Lang.PolyFOL import Lang.PrettyUtils import Control.Monad type Id a = a -> Doc prime :: Doc -> Doc prime d = "\'" <> d alphabet :: [String] alphabet = do n <- [1..] replicateM n ['a'..'z'] comm...
danr/tfp1
Lang/PrettyAltErgo.hs
gpl-3.0
2,397
0
17
784
1,087
530
557
68
6
{-# 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-s3/gen/Network/AWS/S3/PutBucketLifecycleConfiguration.hs
mpl-2.0
4,150
0
11
759
442
264
178
67
1
{- Created : 2014 Jun 05 (Thu) 20:29:15 by Harold Carr. Last Modified : 2014 Jun 08 (Sun) 12:24:53 by Harold Carr. -} module HW04_HC where import qualified Test.HUnit as T import qualified Test.HUnit.Util as U ------------------------------------------------------------------------------ -- Exercise 1 --...
haroldcarr/learn-haskell-coq-ml-etc
haskell/course/2014-06-upenn/cis194/src/HW04_HC.hs
unlicense
7,521
0
19
2,955
2,830
1,580
1,250
126
3
module Git.Command.Bundle (run) where run :: [String] -> IO () run args = return ()
wereHamster/yag
Git/Command/Bundle.hs
unlicense
84
0
7
15
42
23
19
3
1
-- Run-length encoding of a list. Consecutive duplicates of elements are encoded -- as lists (N E) where N is the number of duplicates of the element E. module Problem10 where import Data.List rle :: (Eq a) => [a] -> [(Int,a)] rle = map (\xs -> (length xs, head xs)) . group
jstolarek/sandbox
haskell/99.problems/Problem10.hs
unlicense
282
0
10
59
73
43
30
4
1
-- Copyright 2021 Google LLC -- -- 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 -- -- https://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in ...
google/haskell-trainings
haskell_101/codelab/04_abstractions/src/Solution.hs
apache-2.0
3,876
0
8
834
424
260
164
21
1
module Crypto ( module Crypto.FrequencyAnalysis, module Crypto.FrequencyAnalysis.English, module Crypto.FrequencyAnalysis.BreakXorCipher ) where import Crypto.FrequencyAnalysis import Crypto.FrequencyAnalysis.English import Crypto.FrequencyAnalysis.BreakXorCiper
stallmanifold/matasano-crypto-challenges
src/Crypto.hs
apache-2.0
300
0
5
54
43
29
14
8
0
{-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} module Experiment.Bench.CSV ( aggregateCSV ) where import Laborantin.DSL import Laborantin.Types import Laborantin.Implementation (EnvIO) import Data.Monoid ((<>)) import Control.Applicative ((<$>)) import Da...
lucasdicioccio/laborantin-bench-web
Experiment/Bench/CSV.hs
apache-2.0
2,240
0
13
572
693
366
327
52
1
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE BangPatterns #-} module Haddock.Backends.Hyperlinker.Renderer (render) where import Haddock.Backends.Hyperlinker.Types import Haddock.Backends.Hyperlinker.Utils import qual...
haskell/haddock
haddock-api/src/Haddock/Backends/Hyperlinker/Renderer.hs
bsd-2-clause
10,899
0
16
2,542
3,164
1,632
1,532
211
6
module Web.RedisSession ( setSession , setSessionExpiring , getSession , newKey , Redis ) where import Control.Monad (void) import Control.Monad.Trans (liftIO) import Data.ByteString (ByteString) import qualified Data.ByteString.Char8 as BC impo...
ollieh/yesod-session-redis
Web/RedisSession.hs
bsd-2-clause
1,870
0
18
640
542
278
264
52
2
module FractalFlame.Generator ( module FractalFlame.Generator , module FractalFlame.Generator.Types.Generator ) where import Control.Monad.State import Data.Bits import Data.List import Data.Random.Normal import System.Random import Test.QuickCheck.Gen import FractalFlame.Flam3.Types.Xform import FractalFlame....
anthezium/fractal_flame_renderer_haskell
FractalFlame/Generator.hs
bsd-2-clause
5,483
0
15
1,343
1,430
802
628
-1
-1
{-# LANGUAGE RecordWildCards #-} -- | A tree representation of a feature structure. module NLP.FeatureStructure.Tree ( -- * Types AV , FT (..) , FN (..) , FF , ID -- ** Core combinators , empty , atom , label , name -- * Conversion , runConT , runCon , fromFN , fromFT , fromAV -- * Utility , showFN , showFT ) ...
kawu/feature-structure
src/NLP/FeatureStructure/Tree.hs
bsd-2-clause
9,141
0
17
2,402
2,316
1,255
1,061
143
2
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeFamilies #-} module HERMIT.Dictionary.WorkerWrapper.Common ( externals , WWAssumptionTag(..) , WWAssumption(..) , assumptionAClauseT , assumptionBClauseT , assumptionCClauseT , split1BetaR , split2Bet...
beni55/hermit
src/HERMIT/Dictionary/WorkerWrapper/Common.hs
bsd-2-clause
8,499
0
15
1,835
1,968
990
978
133
2
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : Script.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:14 Warning : this file is machine generated - do not mo...
uduki/hsQt
Qtc/Script.hs
bsd-2-clause
559
0
5
98
38
27
11
6
0
import Obsidian.GCDObsidian import qualified Obsidian.GCDObsidian.CodeGen.CUDA as CUDA import Prelude hiding (zipWith,splitAt) import Data.Word import Data.Bits import Data.List hiding (zipWith,splitAt) -- for Library? (or wherever composeS is defined ?) --compose :: (Scalar a) => [Array (Exp a)...
svenssonjoel/GCDObsidian
DAMP2012/Paper.hs
bsd-3-clause
4,753
21
12
1,041
1,877
931
946
56
1
module Hear.Trainer where import Text.Printf import Text.Read import System.Exit import System.IO import System.Console.ANSI import Control.Exception import Data.Maybe import Hear.RandomTones import Hear.Music import ...
no-scope/hear
src/Hear/Trainer.hs
bsd-3-clause
4,060
0
16
1,495
1,325
628
697
127
9
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeApplications #-} {-# OPTIONS_HADDOCK show-extensions #-} {-| Module : $Header$ Copyright : (c) 2016 Deakin Software & Technology Innovation Lab License : BSD3 Ma...
rimmington/eclogues
eclogues-impl/app/api/Main.hs
bsd-3-clause
5,917
0
17
1,338
1,562
857
705
122
2
{-# LANGUAGE ViewPatterns #-} {-# LANGUAGE BangPatterns #-} module Main (main) where import Criterion.Main import Data.Hourglass import System.Hourglass import TimeDB import Data.List (intercalate) import qualified Data.Time.Calendar as T import qualified Data.Time.Clock as T import qualified Data.Time.Clock.POSIX as...
ppelleti/hs-hourglass
tests/Bench.hs
bsd-3-clause
3,963
0
19
1,086
1,249
671
578
69
1
module Util.File ( recurseDirs , allDirs , allFiles , mkdir_p , mkdir ) where import Control.Monad import System.Directory import System.FilePath ((</>)) recurseDirs :: FilePath -> IO [FilePath] recurseDirs baseDir = do contents <- getDirectoryContents baseDir let contentChildren = filter (`notElem` [".", "...
phylake/haskell-util
File.hs
bsd-3-clause
1,220
0
12
298
402
205
197
36
2
{-# LANGUAGE OverloadedStrings #-} module Waldo.Script ( Script(..) , PanelSizes, PanelData(..), Panel(..) , ImagePart(..) , TextPart(..) , Pos(..) , loadImagePanels, mkScript, scriptName ) where import Data.List import Control.Monad import qualified Data.Text as T import qualified Data.Aeson as JS imp...
davean/waldo
Waldo/Script.hs
bsd-3-clause
5,916
0
27
2,037
2,151
1,210
941
198
3
module Language.Lambda.Syntax.Named.Testdata ( -- function s_ , k_ , i_ , omega_ , _Omega_ , fix_ -- logic , tru_ , fls_ , if_ , not_ , and_ , or_ , imp_ , iff_ -- arithmetic , iszro_ , scc_ , prd_ , add_ , sub_ , mlt_ ...
julmue/UntypedLambda
src/Language/Lambda/Syntax/Named/Testdata.hs
bsd-3-clause
3,270
0
12
1,072
1,531
795
736
119
1
module Problem113 where import Combinations main :: IO () -- increasing → sum_{r=1}^k 10Cr * (k-1)C(k-r) - 1 ⇒ (k+9)Ck - 1(for all zeroes) -- decreasing → sum_{r=1}^k [(r+9)Cr - 1] = (k+1)/10 * (k+10)C(k+1) - (k+1) [Sum telescopes] -- both → 9k [all same digits, 1-digit, 2-dgit and so on, each 9] -- increasing or de...
adityagupta1089/Project-Euler-Haskell
src/problems/Problem113.hs
bsd-3-clause
607
0
16
209
120
71
49
14
1
{-# LANGUAGE RecursiveDo #-} module Graphics.UI.WX.Turtle.Field( -- * types and classes Field(fFrame), Layer, Character, Coordinates(..), -- * basic functions openField, closeField, waitField, topleft, center, coordinates, fieldSize, -- * draw forkField, flushField, fieldColor, -- ** to Layer add...
YoshikuniJujo/wxturtle
src/Graphics/UI/WX/Turtle/Field.hs
bsd-3-clause
8,287
158
18
1,634
3,272
1,714
1,558
218
1
module Style.Color where import Data.Word import Style.Types import qualified Graphics.UI.SDL as SDL rgb :: Word8 -> Word8 -> Word8 -> PropVal rgb r g b = Color $ SDL.Color r g b 0xff -- http://www.w3.org/TR/CSS2/syndata.html#value-def-color maroon = rgb 0x80 0x00 0x00 red = rgb 0xff 0x00 0x00 orange = rgb 0xf...
forestbelton/orb
src/Style/Color.hs
bsd-3-clause
791
0
7
185
294
152
142
24
1
{-# LANGUAGE FlexibleInstances #-} import qualified Data.Judy as J import qualified Data.Map as Map import Data.StateRef import Control.Monad instance Show (IO (J.JudyL Int)) where show a = "JudyMap -> J.JudyL Int: representation repressed" data SExp = SExp { sexp_type :: Int , sexp_name :: String , dummy_re...
rosenbergdm/language-r
src/Language/R/AST1.hs
bsd-3-clause
1,320
20
11
338
369
177
192
30
1
{-# language CPP #-} -- | = Name -- -- XR_KHR_loader_init_android - instance extension -- -- = Specification -- -- See -- <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_KHR_loader_init_android XR_KHR_loader_init_android> -- in the main specification for complete information. -- -- = Registered ...
expipiplus1/vulkan
openxr/src/OpenXR/Extensions/XR_KHR_loader_init_android.hs
bsd-3-clause
6,272
0
15
1,164
1,123
662
461
-1
-1
module Network.Orchid.FormatRegister ( wikiFormats , defaultFormat ) where import Network.Orchid.Core.Format (WikiFormat) import Network.Orchid.Format.Html (fHtml) import Network.Orchid.Format.Xml (fXml) import Network.Orchid.Format.Haskell (fHaskell) import Network.Orchid.Format.History (fHistory) import Netw...
sebastiaanvisser/orchid
src/Network/Orchid/FormatRegister.hs
bsd-3-clause
616
0
5
89
155
102
53
22
1
{-# OPTIONS_GHC -fno-warn-unused-do-bind #-} module Main where import Control.Exception (catch) import qualified Data.Text.IO as T import System.Environment import System.IO import Imp.Parser import Imp.Env import Imp.Prim import Imp.Eval main :: IO () main = do args <- getArgs case args of ["repl"]...
amutake/imp
src/Main.hs
bsd-3-clause
1,467
0
20
516
437
209
228
54
4
module AST.Module ( Module(..), Header(..), SourceTag(..) , UserImport, ImportMethod(..) , DetailedListing(..) ) where import qualified AST.Declaration as Declaration import qualified AST.Variable as Var import qualified Cheapskate.Types as Markdown import Data.Map.Strict (Map) import qualified Reporti...
nukisman/elm-format-short
parser/src/AST/Module.hs
bsd-3-clause
2,182
0
14
489
601
349
252
54
0
{-# LANGUAGE GADTs #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Graphics.Blank.Generated where import qualified Data.Text as ST import Data.Text.Lazy (fromStrict) import Graphics.Blank....
ku-fpg/blank-canvas
Graphics/Blank/Generated.hs
bsd-3-clause
17,380
0
8
3,155
2,551
1,496
1,055
115
1
{-# LANGUAGE OverloadedStrings #-} module Ttlv.Parser.Binary ( encodeTtlv , decodeTtlv , padTo , padTo8 ) where import Control.Monad import Control.Applicative import qualified Crypto.Number.Seri...
nymacro/hs-kmip
src/Ttlv/Parser/Binary.hs
bsd-3-clause
7,289
0
16
1,814
2,171
1,102
1,069
175
11
module Lambda.Compiler.Restore where import DeepControl.Applicative import DeepControl.Monad import Lambda.Action import Lambda.Convertor import qualified Lambda.DataType.PatternMatch as PM import qualified Lambda.DataType.Type as Ty import qualified Lambda.DataType.Expr as E import Lambda.DataType import Lambda.Util...
ocean0yohsuke/Simply-Typed-Lambda
src/Lambda/Compiler/Restore.hs
bsd-3-clause
1,029
0
14
209
270
155
115
26
2
{-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI, UnliftedFFITypes, MagicHash, BangPatterns #-} module Data.JSString.Int ( decimal , hexadecimal ) where import Data.JSString import Data.Monoid import GHC.Int import GHC.Word import GHC.Exts ( ByteArray# , Int(..), Int#,...
NewByteOrder/ghcjs-base
Data/JSString/Int.hs
mit
8,851
35
13
2,025
1,457
780
677
194
2
{-- snippet Functor --} {-# LANGUAGE FlexibleInstances #-} instance Functor (Either Int) where fmap _ (Left n) = Left n fmap f (Right r) = Right (f r) {-- /snippet Functor --}
binesiyu/ifl
examples/ch10/EitherIntFlexible.hs
mit
186
0
8
42
62
31
31
4
0
{-# LANGUAGE OverloadedStrings #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Network.AWS.Route53Domains.Types -- Copyright : (c) 2013-2015 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com> -- Stability...
fmapfmapfmap/amazonka
amazonka-route53-domains/gen/Network/AWS/Route53Domains/Types.hs
mpl-2.0
4,533
0
13
1,090
770
442
328
101
1
{-| Purely functional top-down splay heaps. * D.D. Sleator and R.E. Rarjan, \"Self-Adjusting Binary Search Tree\", Journal of the Association for Computing Machinery, Vol 32, No 3, July 1985, pp 652-686. <http://www.cs.cmu.edu/~sleator/papers/self-adjusting.pdf> -} module Data.Heap.Splay ( ...
kazu-yamamoto/llrbtree
Data/Heap/Splay.hs
bsd-3-clause
6,304
0
19
1,598
1,860
950
910
111
6
{-# LANGUAGE FlexibleInstances #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | -- Module : Test.Matrix.Tri.Banded -- Copyright : Copyright (c) 2008, Patrick Perry <patperry@stanford.edu> -- License : BSD3 -- Maintainer : Patrick Perry <patperry...
patperry/hs-linear-algebra
tests-old/Test/Matrix/Tri/Banded.hs
bsd-3-clause
4,926
0
19
1,562
2,001
1,063
938
114
1
module Koan.List where import Prelude hiding (concat, head, init, last, reverse, tail, (++)) import Koan.Functor as K import Koan.Applicative as K import Koan.Monad as K enrolled :: Bool enrolled = False head :: [a] -> a head (x:_) = x tail :: [a] -> [a] tail (_:xs...
Kheldar/hw-koans
solution/Koan/List.hs
bsd-3-clause
1,649
0
9
455
961
523
438
55
2
{-# LANGUAGE CPP #-} -- | Our extended FCode monad. -- We add a mapping from names to CmmExpr, to support local variable names in -- the concrete C-- code. The unique supply of the underlying FCode monad -- is used to grab a new unique for each local variable. -- In C--, a local variable can be declared anywhere wi...
spacekitteh/smcghc
compiler/codeGen/StgCmmExtCode.hs
bsd-3-clause
7,042
0
15
1,812
1,686
903
783
136
3
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-} module CTT where import Control.Applicative import Data.List import Data.Maybe import Data.Map (Map,(!),filterWithKey,elems) import qualified Data.Map as Map import Text.PrettyPrint as PP import Connections -----------------------------------------------------...
abooij/cubicaltt
CTT.hs
mit
14,424
0
17
4,506
5,959
3,053
2,906
333
27
{- ---------------------------------------------------------------------------------- - Copyright (C) 2010-2011 Massachusetts Institute of Technology - Copyright (C) 2010-2011 Yuan Tang <yuantang@csail.mit.edu> - Charles E. Leiserson <cel@mit.edu> - - This program is free software:...
Pochoir/Pochoir
src/PParser2.hs
gpl-3.0
2,636
0
16
679
364
192
172
27
2
{-# LANGUAGE CPP #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE UndecidableInstances #-} module Yesod.Core.Class.Handler ( MonadHandler (..) , MonadWidget (..) , liftHandlerT ...
geraldus/yesod
yesod-core/src/Yesod/Core/Class/Handler.hs
mit
4,343
0
17
840
1,151
612
539
-1
-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="ro-RO"> <title>Image Locaiton and Privacy Scanner | ZAP Extension</title> <maps> <homeID>top...
thc202/zap-extensions
addOns/imagelocationscanner/src/main/javahelp/org/zaproxy/zap/extension/imagelocationscanner/resources/help_ro_RO/helpset_ro_RO.hs
apache-2.0
995
78
66
162
419
212
207
-1
-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="de-DE"> <title>Call Graph</title> <maps> <homeID>callgraph</homeID> <mapref location="m...
thc202/zap-extensions
addOns/callgraph/src/main/javahelp/help_de_DE/helpset_de_DE.hs
apache-2.0
961
77
66
156
407
206
201
-1
-1
import System.IO (hFlush, stdout) import Control.Monad (mapM) import Control.Monad.Error (runErrorT) import Control.Monad.Trans (liftIO) import qualified Data.Map as Map import qualified Data.Traversable as DT import Readline (readline, load_history) import Types import Reader (read_str) import Printer (_pr_str) impor...
profan/mal
haskell/step4_if_fn_do.hs
mpl-2.0
4,277
0
21
1,450
1,633
803
830
117
10
{-# LANGUAGE TypeFamilies, MultiParamTypeClasses #-} module ClassEqContext where class a ~ b => C a b
urbanslug/ghc
testsuite/tests/indexed-types/should_compile/ClassEqContext.hs
bsd-3-clause
106
0
7
20
23
12
11
-1
-1
{-# LANGUAGE TypeOperators, TypeFamilies, RankNTypes #-} {-| Module : Action.Internals Copyright : (c) Kai Lindholm, 2014 License : MIT Maintainer : megantti@gmail.com Stability : experimental -} module Network.RTorrent.Action.Internals ( Action (..) , simpleAction , pureAction , seq...
megantti/rtorrent-rpc
Network/RTorrent/Action/Internals.hs
mit
5,292
0
18
1,533
1,714
891
823
-1
-1
{-# LANGUAGE OverloadedStrings #-} import System.FilePath import System.IO.Temp import Test.Tasty import Test.Tasty.HUnit import qualified Data.ByteString.Char8 as BC8 import qualified Data.Sequence as Seq import System.Directory.Watchman.Fields import System.Directory.Watchman.Query import System.Directory.Watchman....
bitc/hs-watchman
tests/test.hs
mit
3,169
0
28
657
827
417
410
64
3
module Main where import Game.Mahjong.Wall main :: IO () main = do wall <- randomWall Include print wall
gspindles/mj-score-eval
app/Main.hs
mit
111
0
8
24
41
21
20
6
1
{-# LANGUAGE OverloadedStrings #-} module Handler.Fay where import Fay.Convert (readFromFay) import Data.List (nub, head) import Import hiding (pack, head, concat, threadDelay) import Yesod.Fay import Database.Persist.Sql import Data.Text (pack, concat) import Cache import Data.ByteString.Base64 (decodeLenient) import...
swamp-agr/carbuyer-advisor
Handler/Fay.hs
mit
8,218
85
29
2,752
2,865
1,457
1,408
176
25
{-# LANGUAGE OverloadedStrings #-} module Qwu.DB.Test where import Qwu.DB.Manipulation import Qwu.DB.Table.Account import Qwu.DB.Table.Post import Data.Default import Data.Text import Data.UUID as U testCreatePost :: IO () testCreatePost = createPost (def :: Post) U.nil testUpdatePostBody :: PostId -> IO () testUpd...
bryangarza/qwu
src/Qwu/DB/Test.hs
mit
1,027
0
9
142
277
147
130
27
2
{-# LANGUAGE PatternSynonyms #-} -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module JSDOM.Generated.ElementCSSInlineStyle (getStyle, ElementCSSInlineStyle(..), gTypeElementCSSInlineStyle, IsElementCSSInlin...
ghcjs/jsaddle-dom
src/JSDOM/Generated/ElementCSSInlineStyle.hs
mit
1,460
0
11
193
363
234
129
26
1
-- JsonPretty.hs -- A pretty printer tool for JSON data -- -- vim: ft=haskell sw=2 ts=2 et -- -- Taken from the Haskell tutorial: -- http://funktionale-programmierung.de/2014/10/23/haskell-einstieg-3.html {-# OPTIONS_GHC -F -pgmF htfpp #-} {-# LANGUAGE OverloadedStrings #-} import qualified Data.Aeson as J import ...
kkirstein/proglang-playground
Haskell/src/JsonPretty.hs
mit
4,512
7
20
1,217
1,303
674
629
116
10
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-missing-fields #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -------------------...
danplubell/hbase-haskell
src/Database/HBase/Internal/Thrift2/HBase_Consts.hs
mit
1,298
0
6
265
204
147
57
25
0
module Model.Event where import Import import qualified Data.Text as T getEvents :: Day -> Day -> DB [Entity Event] getEvents start end = selectList ( [EventStartDate >=. start, EventStartDate <=. end] ||. [EventEndDate >=. Just start, EventEndDate <=. Just end] ) [Desc EventStartDate] getEventsDay ...
isankadn/yesod-testweb-full
Model/Event.hs
mit
610
0
10
120
208
110
98
17
1
module HigherOrder where import Data.List (sort) -- Exercise 1: Wholemeal programming -- fun1 :: [Integer] -> Integer -- fun1 [] = 1 -- fun1 (x:xs) -- | even x = (x - 2) * fun1 xs -- | otherwise = fun1 xs fun1' :: [Integer] -> Integer fun1' = product . subtract2 . evensOnly evensOnly :: [Integer] -> [...
slogsdon/haskell-exercises
cis194/HigherOrder.hs
mit
1,820
0
12
554
677
364
313
44
2
module Euler.E70 where import Data.List ( sort ) import Euler.Lib ( totient , intToList , primes ) -- Note: it looks like we have the best values of the totient for semiprimes -- (i.e. the product of two primes), as phi(p*q)=phi(p)*phi(q) if they are -- different, and phi(p^2)=p*(p-1) otherwise -- Tactics: comp...
D4r1/project-euler
Euler/E70.hs
mit
2,020
8
15
436
407
225
182
29
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE FlexibleInstances #-} {-| Module : Datatypes Description : SODA Datatypes Copyright : (c) Steven W License : MIT Maintainer : Steven W <StevenW.Info@gmail.com> Stability : Unstable These are Haskell types whic...
StevenWInfo/haskell-soda
src/Datatypes.hs
mit
11,751
0
12
2,271
1,796
981
815
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloud9-environmentec2-repository.html module Stratosphere.ResourceProperties.Cloud9EnvironmentEC2Repository w...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/Cloud9EnvironmentEC2Repository.hs
mit
2,274
0
13
220
265
151
114
29
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ViewPatterns #-} module Main where import Data.IORef import Da...
andreyk0/www-webcam-snapshot
Main.hs
gpl-2.0
2,432
0
15
707
538
281
257
60
3
{-# LANGUAGE TemplateHaskell #-} module Moonbase.Util.TH ( which , exists ) where import Language.Haskell.TH import Language.Haskell.TH.Quote import Control.Applicative import Data.Bool import Data.Maybe import System.Directory which = QuasiQuoter ...
felixsch/moonbase
src/Moonbase/Util/TH.hs
gpl-3.0
1,062
0
13
275
252
146
106
24
1
{---------------------------------------------------------------------} {- Copyright 2015, 2016 Nathan Bloomfield -} {- -} {- This file is part of Feivel. -} {- ...
nbloomf/feivel
src/Feivel/Grammar/Type.hs
gpl-3.0
8,023
0
11
2,197
1,761
924
837
156
2
import Test.Tasty import Test.Tasty.Golden import System.IO.Silently (capture_) import Data.ByteString.Lazy.Char8 (pack) import Evaluator (runBfNoLog) import Parser (parseBfFile) main :: IO () main = defaultMain golden golden :: TestTree golden = testGroup "Golden tests" [ goldenVsString "Hello World" ...
agremm/bfint
test/Spec.hs
gpl-3.0
659
0
17
218
163
87
76
19
2