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 TesML.Data.Group (Group , offset , groupSize , groupData , stamp , version , path , GroupTypeData , entryName ...
Kromgart/tesML
lib/TesML/Data/Group.hs
agpl-3.0
3,853
0
14
1,775
827
441
386
88
1
module Algo.Search( binaryFind, binaryFindInArr, binaryLowerBound, binaryLowerBoundInArr, binaryUpperBound, binaryUpperBoundInArr, binaryTurningPoint, binaryTurningPointInArr, binarySearch, binarySearchSmallestGreater, binarySearchSmallestGreaterInArr, saddleBack, searchKth2, nQueen, nQuee...
seckcoder/lang-learn
haskell/algo/src/Algo/Search.hs
unlicense
7,560
0
16
3,513
2,341
1,252
1,089
108
4
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QLineF.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:36 Warning : this file is machine generated - do not mo...
uduki/hsQt
Qtc/Enums/Core/QLineF.hs
bsd-2-clause
2,544
0
18
530
606
309
297
54
1
{-# LANGUAGE ForeignFunctionInterface #-} module Grenade.Layers.Internal.Pad ( pad , crop ) where import qualified Data.Vector.Storable as U ( unsafeToForeignPtr0, unsafeFromForeignPtr0 ) import Foreign ( mallocForeignPtrArray, withForeignPtr ) import Foreign.Ptr ( Ptr ) import ...
HuwCampbell/grenade
src/Grenade/Layers/Internal/Pad.hs
bsd-2-clause
2,130
0
16
534
667
338
329
41
1
import Complex #include "../Prelude.hs" f :: Int -> Complex Double f n = mkPolar 1 ((2 Prelude.* Prelude.pi) / Prelude.fromIntegral n) Prelude.^ n realPart'Double = realPart :: Complex Double -> Double add'ComplexDouble = (Prelude.+) :: Complex Double -> Complex Double -> Complex Double lit0'ComplexDouble = 0 :: Com...
batterseapower/supercompilation-by-evaluation
examples/imaginary/X2N1.hs
bsd-3-clause
332
0
11
52
114
59
55
6
1
module Main where -- not a CAF incdInts :: [Integer] -> [Integer] incdInts = map (+1) main :: IO () main = do print (incdInts [1..] !! 1000) print (incdInts [1..] !! 900000) print (incdInts [1..] !! 900000) print (incdInts [1..] !! 9009000) print (incdInts [1..] !! 9009000) print (incdInts [1..] !! 9009...
dmvianna/strict
src/isCaf.hs
bsd-3-clause
325
0
11
69
161
82
79
11
1
{-# LANGUAGE MultiParamTypeClasses #-} module Math.Budget.Payment ( Payment , payment , expensePayment , incomePayment ) where import Math.Budget.Method import Math.Budget.PaymentType import Math.Budget.Interval import Math.Budget.Money import Math.Budget.Priors import Math.Budget.Types import Math.Budget.Lens.Meth...
tonymorris/hbudget
src/Math/Budget/Payment.hs
bsd-3-clause
3,366
0
11
796
1,171
631
540
117
1
module System.Hardware.XBee.Command ( -- * FrameId FrameId, noFrameId, frameId, nextFrame, frameIdFor, -- * Address XBeeAddress(..), Address64(..), Address16(..), broadcastAddress, disabledAddress, -- * Command CommandName, commandName, CommandStatus(..), ...
msiegenthaler/haskell-xbee
System/Hardware/XBee/Command.hs
bsd-3-clause
11,577
0
13
3,063
3,033
1,559
1,474
217
2
{-# LANGUAGE EmptyDataDecls #-} module Astro.Orbit.Types where import Numeric.Units.Dimensional.Prelude import Numeric.Units.Dimensional.NonSI (revolution) import Astro.Time (E) import qualified Prelude -- Parameters. newtype SemiMajorAxis a = SMA { sma :: Length a } deriving (Show, Eq, Ord) newtype SemiLatusRectum...
bjornbm/astro-orbit
Astro/Orbit/Types.hs
bsd-3-clause
727
0
7
131
201
128
73
-1
-1
module AutoEncoder ( preTrains, preTrain ) where import Numeric.LinearAlgebra import Data.List import Common import Forward import BackProp import ActivFunc import Other -- TODO: refactor preTrains :: R -> Int -> (Matrix R -> Matrix R, Matrix R -> Matrix R) -> Matrix R -> [Matrix R] -> [Matrix R] preTrains rate...
pupuu/deep-neuralnet
src/AutoEncoder.hs
bsd-3-clause
860
0
11
188
403
211
192
20
1
{-# OPTIONS_GHC -Wall #-} {-# LANGUAGE FlexibleInstances #-} module HW07.JoinList where import HW07.Buffer import HW07.Scrabble import HW07.Sized data JoinList m a = Empty | Single m a | Append m (JoinList m a) (JoinList m a) deriving (Eq, Show) -- Exercise 1 ----------------...
kemskems/cis194-spring13
src/HW07/JoinList.hs
bsd-3-clause
2,696
0
12
928
1,038
516
522
63
1
module Data.Cfg.FollowSetTests ( tests ) where import Data.Cfg.Analysis import Data.Cfg.Augment import Data.Cfg.LookaheadSet import Data.Cfg.TestGrammars import Test.Framework(Test, testGroup) import Test.Framework.Providers.HUnit(testCase) import Test.HUnit(assertEqual) tests :: Test tests = testGroup "Data....
nedervold/context-free-grammar
tests/Data/Cfg/FollowSetTests.hs
bsd-3-clause
2,212
0
10
537
644
351
293
45
1
module Main(main) where import System.Environment import System.IO import Hoogle main :: IO () main = do hSetEncoding stdout utf8 hoogle =<< getArgs
ndmitchell/hoogle
src/Main.hs
bsd-3-clause
161
0
7
34
52
28
24
8
1
module Enums where -- write enumFromTo for types below eft :: (Enum a, Ord a) => a -> a -> [a] eft a1 a2 | compare a1 a2 == GT = [] | compare a1 a2 == EQ = [a1] | otherwise = a1 : eft (succ a1) a2 eftBool :: Bool -> Bool -> [Bool] eftBool = eft eftOrd :: Ordering -> Ordering -> [Ordering] eftOrd = eft eftInt :...
chengzh2008/hpffp
src/ch09-List/enums.hs
bsd-3-clause
404
0
9
99
192
102
90
14
1
{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Client.Configure -- Copyright : (c) David Himmelstrup 2005, -- Duncan Coutts 2005 -- License : BSD-like -- -- Maintainer : cabal-devel@haskell.org -- Portab...
kolmodin/cabal
cabal-install/Distribution/Client/Configure.hs
bsd-3-clause
16,388
0
24
4,674
2,643
1,437
1,206
286
3
module Spring13.Week3.GolfSpec where import Test.Hspec import Test.QuickCheck import Spring13.Week3.Golf main :: IO () main = hspec spec spec :: Spec spec = do describe "skips" $ do it "cases" $ do skips "ABCD" `shouldBe` ["ABCD", "BD", "C", "D"] skips "hello!" `shouldBe` ["hello!", "el!", "l!", "...
bibaijin/cis194
test/Spring13/Week3/GolfSpec.hs
bsd-3-clause
767
0
18
187
366
204
162
22
1
{-# LANGUAGE CPP #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# OPTIONS -Wall #-} -- | some functions for working with uniformly-sampled data module Statistics.Iteratee.Uniform ( someRollingFunction , movingAverage ) where import Statistics.Iter...
JohnLato/iter-stats
src/Statistics/Iteratee/Uniform.hs
bsd-3-clause
1,808
0
10
441
268
153
115
42
3
module Rumpus.Systems.SceneWatcher where import qualified System.FSNotify as FS import System.FSNotify hiding (Event) import PreludeExtra import Rumpus.Systems.Scene import Data.HashMap.Strict as Map data LocalFileStatus = Writing | WrittenAt UTCTime | Deleted deriving Show -- NOTE: these are all abso...
lukexi/rumpus
src/Rumpus/Systems/SceneWatcher.hs
bsd-3-clause
5,298
0
19
1,202
1,237
606
631
-1
-1
module LiuMS.Compiler where import qualified Data.ByteString as BS data Compiler = Compiler { cachable :: Bool , compile :: FilePath -> IO BS.ByteString } unpureCompile :: (BS.ByteString -> BS.ByteString) -> (FilePath -> IO BS.ByteString) unpureCompile f path = f <$> BS.readFile path
notcome/liu-ms-adult
src/LiuMS/Compiler.hs
bsd-3-clause
309
0
11
66
95
53
42
8
1
module Main (main) where import Data.Text.Lazy import Data.Text.Lazy.IO import Language.Elementscript.Micro import Prelude hiding (getContents, putStrLn) import System.IO (stderr) import Text.Parsec import Text...
pthariensflame/elementscript-micro
src/Main.hs
bsd-3-clause
543
0
11
182
140
78
62
-1
-1
module Config where import Hakyll -- | How many news item to show on the front page. frontPageNewsItems :: Int frontPageNewsItems = 10 feedConfig = FeedConfiguration { feedTitle = "Indian Curry" , feedDescription = "Functional programming served red hot" , feedAuthorName = "Indian curry" , feedAuthorEm...
indian-curry/indian-curry.github.io
Config.hs
bsd-3-clause
470
0
6
98
66
43
23
12
1
{- | Module : $Header$ Description : conversions to and from old SML aterm format Copyright : (c) Klaus Luettich and Uni Bremen 2002-2004 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provisional Portability : non-portable (imports Logic.Grothendieck)...
keithodulaigh/Hets
ATC/Sml_cats.hs
gpl-2.0
80,064
9
24
31,924
19,922
10,080
9,842
1,672
5
main :: Bool -> Bool -> Bool -> () main True False _ = () main False _ True = () main _ False True = () main _ _ _ = ()
roberth/uu-helium
test/staticwarnings/Overlap7.hs
gpl-3.0
144
0
8
57
76
38
38
5
1
module HAHP.Validation.Tree where import Control.Parallel.Strategies --import Data.List.Unique import Data.List (group, sort, sortBy) import Data.Maybe import HAHP.Data import HAHP.Data.Core import HAHP.Data.Errors import ...
Taeradan/hahp
src/HAHP/Validation/Tree.hs
gpl-3.0
5,835
0
13
1,909
1,217
667
550
115
3
{-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Main -- Copyright : (c) 2013-2015 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) -- module Main (main)...
fmapfmapfmap/amazonka
amazonka-cloudhsm/test/Main.hs
mpl-2.0
537
0
8
103
76
47
29
9
1
module Vectorise.Type.TyConDecl ( vectTyConDecls ) where import Vectorise.Type.Type import Vectorise.Monad import Vectorise.Env( GlobalEnv( global_fam_inst_env ) ) import BuildTyCl( TcMethInfo, buildClass, buildDataCon, newTyConRepName ) import OccName import Class import Type import TyCon import DataCon import Bas...
mcschroeder/ghc
compiler/vectorise/Vectorise/Type/TyConDecl.hs
bsd-3-clause
8,809
1
14
3,063
1,586
819
767
140
1
module Csound.Options( Options(..), -- * Shortcuts setDur, setRates, setBufs, setGain, setJack, setOutput, setInput, setDac, setAdc, setDacBy, setAdcBy, setThru, setSilent, setMidiDevice, setMa, -- * Flags -- | Csound's command line flags. See original documentation for -- de...
isomorphism/csound-expression
src/Csound/Options.hs
bsd-3-clause
2,582
0
11
616
715
421
294
56
1
-------------------------------------------------------------------------------- -- | -- Module : Environment.Gym.ClassicControl.CartPoleV1 -- Copyright : (c) Sentenai 2017 -- License : BSD3 -- Maintainer: sam@sentenai.com -- Stability : experimental -- -- Environment description: -- > A pole is attached by a...
stites/reinforce
reinforce-environments-gym/src/Environments/Gym/ClassicControl/CartPoleV1.hs
bsd-3-clause
2,503
0
9
353
297
184
113
29
1
{- ----------------------------------------------------------------------------- -- -- (c) The University of Glasgow 2001-2003 -- -- Access to system tools: gcc, cp, rm etc -- ----------------------------------------------------------------------------- -} {-# LANGUAGE CPP, ScopedTypeVariables #-} module SysTools ( ...
olsner/ghc
compiler/main/SysTools.hs
bsd-3-clause
72,611
131
22
23,606
12,232
6,274
5,958
960
13
module SubHask.Compatibility.BloomFilter ( BloomFilter ) where import SubHask.Algebra import SubHask.Category import SubHask.Internal.Prelude import qualified Data.BloomFilter as BF -------------------------------------------------------------------------------- newtype BloomFilter (n::Nat) a = BloomFil...
abailly/subhask
src/SubHask/Compatibility/BloomFilter.hs
bsd-3-clause
1,381
0
11
271
356
191
165
-1
-1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE RecordWildCards #-} -- | Build configuration module Stack.Config.Build where import Stack.Prelude import Stack.Types.Config -- | Interprets BuildOptsMonoid options. buildOptsFromMonoid :: BuildOptsMonoid -> BuildOpts buildOptsFromMonoid BuildOptsMon...
MichielDerhaeg/stack
src/Stack/Config/Build.hs
bsd-3-clause
4,614
0
13
1,114
819
442
377
103
8
{-# LANGUAGE RecordWildCards #-} -- | DSL for testing the modular solver module UnitTests.Distribution.Client.Dependency.Modular.DSL ( ExampleDependency(..) , ExampleDb , exAv , exInst , exResolve , extractInstallPlan , withSetupDeps ) where -- base import Data.Either (partitionEithers) import Data.M...
trskop/cabal
cabal-install/tests/UnitTests/Distribution/Client/Dependency/Modular/DSL.hs
bsd-3-clause
12,741
0
20
3,466
2,647
1,472
1,175
199
11
{-# LANGUAGE ConstraintKinds, GeneralizedNewtypeDeriving #-} module T8984 where class C a where app :: a (a Int) newtype N cat a b = MkN (cat a b) deriving( C ) -- The newtype coercion is N cat ~R cat
urbanslug/ghc
testsuite/tests/deriving/should_fail/T8984.hs
bsd-3-clause
210
0
9
48
55
32
23
5
0
module T2354(test) where class AsInt a where {-# NOINLINE toInt #-} toInt :: a -> Int {-# NOINLINE fromInt #-} fromInt :: Int -> a
urbanslug/ghc
testsuite/tests/typecheck/should_fail/T2354.hs
bsd-3-clause
149
0
7
43
38
22
16
6
0
{-# LANGUAGE MagicHash, UnboxedTuples #-} import GHC.Prim import GHC.Word import Control.Monad import Data.Bits main :: IO () main = do f 5 6 23 f 0x80000000 0 0x80000001 f 0xFC1D8A3BFB29FC6A 49 0xFD94E3B7FE36FB18 f :: Word -> Word -> Word -> IO () f wxHigh@(W# xHigh) wxLow@(W# xLow) wy@(W# y) ...
urbanslug/ghc
testsuite/tests/numeric/should_run/quotRem2.hs
bsd-3-clause
1,135
0
16
444
365
178
187
28
2
{-# LANGUAGE OverloadedStrings #-} module Blaze2.ReactJS.Examples.Todo ( renderState , handleRequest ) where import Blaze2.Core.Examples.Todo import Blaze2.ReactJS.Base import qualified Blaze2.ReactJS.Service.Store as Store import Control.Lens (folded, to, sumOf) import ...
MoixaEnergy/blaze-react
src/Blaze2/ReactJS/Examples/Todo.hs
mit
5,214
0
24
1,773
1,384
690
694
106
2
module Odds.Odds where odds :: [Int] -> [Int] odds = filter odd
cojoj/Codewars
Haskell/Codewars.hsproj/Odds/Odds.hs
mit
68
0
6
16
29
17
12
3
1
{-# htermination (notElemMyBool :: MyBool -> (List MyBool) -> MyBool) #-} import qualified Prelude data MyBool = MyTrue | MyFalse data List a = Cons a (List a) | Nil asAs :: MyBool -> MyBool -> MyBool; asAs MyFalse x = MyFalse; asAs MyTrue x = x; foldr :: (a -> b -> b) -> b -> (List a) -> b; fold...
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/notElem_2.hs
mit
1,132
0
9
295
517
279
238
30
1
import Text.Parsec import Data.List (maximumBy) main = do text <- readFile "p099_base_exp.txt" case parseBaseExps text of Left err -> print err Right pairs -> do let answer = process pairs print answer parseBaseExps :: String -> Either ParseError [(Integer, Integer)] pa...
arekfu/project_euler
p0099/p0099.hs
mit
826
0
16
240
326
163
163
25
2
{-# LANGUAGE RecordWildCards #-} import Data.Array (Array, listArray) import Data.Foldable (for_) import Test.Hspec (Spec, describe, it, shouldBe) import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith) import BinarySearch (find) main :: IO () main = hspecWith defaultConfig {config...
exercism/xhaskell
exercises/practice/binary-search/test/Tests.hs
mit
3,170
0
14
1,236
863
532
331
65
1
import Data.Char (chr,ord) import System.Environment (getArgs) import Control.Monad.IO.Class import Control.Monad.Trans.State import Text.Parsec -- Brainfuck State (cells on the left, current cell, cells on the right) type BFState = ([Char], Char, [Char]) -- A Brainfuck program is simply a State Transformation monad ...
levjj/bfhs
bfhs.hs
mit
1,697
0
19
479
676
353
323
34
2
{-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE BangPatterns #-} import Core.Program import Core.Text import Core.System import Data.Text (Text) import Text.Megaparsec import Technique.Parser import Technique.Formatter () text :: Text text = "5.9722 × 10^24 kg" text1 = [quote| { (42 ) } |] text2 = "{ answer = 42 ...
oprdyn/technique
tests/ParseSnippet.hs
mit
1,380
0
15
405
214
120
94
28
2
{-# htermination elemFM :: Int -> FiniteMap Int b -> Bool #-} import FiniteMap
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/FiniteMap_elemFM_5.hs
mit
79
0
3
14
5
3
2
1
0
{-# LANGUAGE OverloadedStrings #-} -- | -- >>> :set -XOverloadedStrings import Data.ByteString (ByteString) import qualified Data.ByteString.Char8 as B import qualified Crypto.Hash.MD5 as MD5 import Data.ByteString.Base16 (encode) import Control.Monad main :: IO () main = do partOne >>= print partTwo >>= print ...
wizzup/advent_of_code
2015/haskell/exe/Day04.hs
mit
926
0
11
166
286
155
131
27
1
module Systat.Processor (runCommand) where import System.Process hiding (runCommand) import System.Exit import Text.Printf import Data.Text processData :: String -> String processData = unpack . strip . pack runCommand :: String -> [String] -> IO String runCommand command args = do (exit, out, err) <- readProcessW...
mfaerevaag/systat
src/Systat/Processor.hs
mit
536
0
14
130
162
84
78
15
2
-- Padovan numbers -- https://www.codewars.com/kata/5803ee0ed5438edcc9000087 module Padovan where padovan :: Int -> Int padovan = let p = 1:1:1:zipWith (+) p (tail p) in (!!) p
gafiatulin/codewars
src/6 kyu/Padovan.hs
mit
179
0
12
28
63
35
28
3
1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-missing-fields #-} -- | A Shakespearean module for Roy, introducing type-safe, -- compile-time variable and url interpolation. It is exactly the same as -- "Text.Julius", except that the templat...
yesodweb/shakespeare
Text/Roy.hs
mit
3,147
1
17
626
344
214
130
40
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleContexts #-} module Main where import Params import qualified Network.BitFunctor.Identifiable as Id import Network.BitFunctor2.Platform.Blockchain as BC import Network.BitFunctor2.Platform.Blockchain.Types import Network.BitFunctor2.Platform.Blockchain.Consensu...
BitFunctor/bitfunctor
app/GenesisGenerator/Main.hs
mit
2,299
0
13
621
483
261
222
48
2
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_HADDOCK show-extensions #-} {-# LANGUAGE MultiWayIf #-} -- | -- Module : Yi.Buffer.HighLevel -- License : GPL-2 -- Maintainer : yi-devel@googlegroups.com -- Stability : experimental -- Portability : portable -- -- High level op...
atsukotakahashi/wi
src/library/Yi/Buffer/HighLevel.hs
gpl-2.0
37,740
0
22
10,250
8,914
4,524
4,390
780
8
{-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} module Main (main) where import qualified Graphics.UI.SDL as SDL import qualified Graphics.UI.SDL.Image as Image import Graphics.UI.SDL.Types import Control.Monad.State hiding (state) import Shared.Assets import Shared.Drawing import Shared.L...
ShigekiKarita/haskellSDL2Examples
src/lesson17.hs
gpl-2.0
4,735
0
15
879
1,673
905
768
89
1
{- | Module : $Header$ Description : Check for truth in one-point model Copyright : (c) Mingyi Liu and Till Mossakowski and Uni Bremen 2004 License : GPLv2 or higher, see LICENSE.txt Maintainer : xinga@informatik.uni-bremen.de Stability : provisional Portability : port...
nevrenato/Hets_Fork
CASL/CCC/OnePoint.hs
gpl-2.0
7,671
0
19
2,563
1,518
764
754
98
22
{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances #-} {- | Module : ./OWL2/OWL22CommonLogic.hs Description : Comorphism from OWL2 to Common Logic Copyright : (c) Francisc-Nicolae Bungiu, Felix Gabriel Mance License : GPLv2 or higher, see LICENSE.txt Maintainer : f.bungiu@jacobs-university.de St...
spechub/Hets
OWL2/OWL22CommonLogic.hs
gpl-2.0
47,085
0
24
15,500
13,696
6,939
6,757
777
44
-- | Tests para pruebas. Hay dos aspectos que se controlan: primero -- con QuickCheck se verifica la corrección de la serialización; en -- segundo lugar, se utiliza HUnit para verificar que las funciones de -- manipulación y construcción de pruebas no tienen errores. module TestSuite.Tests.Proof ( testGroup...
miguelpagano/equ
TestSuite/Tests/Proof.hs
gpl-3.0
18,615
0
16
7,063
2,525
1,351
1,174
279
1
lambda :: Profunctor p => p a a -> (a -> b) -> p a b lambda paa f = dimap id f paa rho :: Profunctor p => p b b -> (a -> b) -> p a b rho pbb f = dimap f id pbb
hmemcpy/milewski-ctfp-pdf
src/content/3.10/code/haskell/snippet09.hs
gpl-3.0
160
0
9
48
113
53
60
4
1
module HFlint.Internal.Lift.Utils where -------------------------------------------------- -- functions which are constant in the last argument -------------------------------------------------- constBack :: (a -> c) -> (a -> b -> c) constBack ff a _ = ff a constBack2 :: (a -> b -> d) -> (a -> b -> c -> d) constBack...
martinra/hflint
src/HFlint/Internal/Lift/Utils.hs
gpl-3.0
664
0
12
170
341
179
162
11
1
--------------------------------------------------------------------------- -- This file is part of grammata. -- -- grammata 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...
SRechenberger/grammata
src/Grammata/Interpreter/Compiler.hs
gpl-3.0
2,389
0
13
547
390
222
168
30
1
{-# LANGUAGE OverloadedStrings, PatternGuards, ScopedTypeVariables #-} -- | Page which displays the information about a file. module Handler.View (getViewR, patchViewR, deleteViewR, removeUpload) where import Import import Control.Monad import qualified Data.ByteString as B import qualified Data.ByteString.Char8 ...
RaphaelJ/getwebb.org
Handler/View.hs
gpl-3.0
10,822
29
34
3,502
2,096
1,117
979
-1
-1
{-| Module : TS_Parser License : GPL Maintainer : helium@cs.uu.nl Stability : experimental Portability : portable The parser of a .type file. (directives based on "Scripting the Type Inference Process", ICFP 2003) -} module Helium.StaticAnalysis.Directives.TS_Parser where...
roberth/uu-helium
src/Helium/StaticAnalysis/Directives/TS_Parser.hs
gpl-3.0
4,144
0
16
1,074
835
419
416
86
2
{- Functional Morphology: Greek Dictionary definitions Ilja Sidoroff (ilja.sidoroff@iki.fi) Based on Latin Dictionary definitions Copyright (C) 2004 Author: Markus Forsberg This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licens...
isido/functional-morphology-for-koine-greek
greek/AttrGreek.hs
gpl-3.0
997
0
4
223
28
18
10
6
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-servicenetworking/gen/Network/Google/Resource/ServiceNetworking/Operations/Delete.hs
mpl-2.0
4,936
0
15
1,099
703
413
290
100
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/InterconnectAttachments/Delete.hs
mpl-2.0
5,185
0
17
1,119
552
330
222
89
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-fitness/gen/Network/Google/Resource/Fitness/Users/Sessions/Delete.hs
mpl-2.0
5,189
0
19
1,249
790
460
330
116
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-maps-engine/gen/Network/Google/Resource/MapsEngine/RasterCollections/Permissions/BatchDelete.hs
mpl-2.0
4,023
0
15
870
391
235
156
68
1
{-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE CPP #-} {-# LANGUAGE TypeApplications ...
wdanilo/data-rtuple
src/Data/RTuple/Class.hs
apache-2.0
25,057
0
16
7,338
6,723
3,643
3,080
-1
-1
import Data.List cnv _ [] = [] cnv m (n:t:r) = (m, n',t):(cnv (m+1) r) where n' = read n :: Int srt :: (Int,Int,String) -> [(Int,Int,String)] -> [String] srt d@(m,n,s) ds = let cs= filter (\ (_,n1,_) -> m == n1) ds o = filter (\ (_,n1,_) -> m /= n1) ds a = map (\ c -> srt c o) cs ...
a143753/AOJ
2619.hs
apache-2.0
697
0
14
264
427
229
198
24
2
-- Derived from example from cabal-macosx import Distribution.MacOSX import Distribution.Simple main :: IO () main = do defaultMainWithHooks $ simpleUserHooks { postBuild = appBundleBuildHook guiApps } guiApps :: [MacApp] guiApps = [MacApp "planar" (Just "icon.icns") (Just "Info.plist...
piotrm0/planar
Setup.hs
artistic-2.0
478
0
10
132
94
52
42
13
1
module Lexer ( Op , Operators , lexer , reserved , reservedOp , identifier , parens , semiSep , semi , contents ) where import Data.Functor.Identity import qualified Data.Text.Lazy as L import Text.Parsec import Text.Parsec.Text.Lazy import qual...
ahodgen/archer-calc
src/Lexer.hs
bsd-2-clause
1,764
0
9
495
510
289
221
68
1
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -XTemplateHaskell #-} module Data.API.Subledger.OrgTest (suite) where import Data.Aeson (decode) import Data.Monoid ((<>)) import Test.Tasty (TestTree) import Test.Tasty.HUnit import Test.Tasty.TH (testGroupGenerator) import Data.API.Subledger.Org import Data.API.Su...
whittle/subledger
subledger-core/test/Data/API/Subledger/OrgTest.hs
bsd-3-clause
1,768
0
15
650
338
192
146
-1
-1
module Main (main) where import System.FilePath.Glob (glob) import Test.DocTest (doctest) main :: IO () main = do srcFiles <- glob "src/**/*.hs" let ghcOptions = [ "-XOverloadedStrings" ] doctest $ ghcOptions ++ srcFiles
cdepillabout/ssh
test/DocTest.hs
bsd-3-clause
256
0
10
67
78
42
36
8
1
-- | Paragon Parser. Names. module Language.Java.Paragon.Parser.Names where import Control.Applicative ((<$>)) import Language.Java.Paragon.Annotation import Language.Java.Paragon.Lexer import Language.Java.Paragon.Syntax.Names import Language.Java.Paragon.Parser.Symbols import Language.Java.Paragon.Parser.Helpers ...
bvdelft/paragon
src/Language/Java/Paragon/Parser/Names.hs
bsd-3-clause
558
0
14
97
162
97
65
15
2
{-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE OverloadedLists #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE UndecidableInstances #-} {-# ...
kylcarte/lnfunctors
src/Type/Families.hs
bsd-3-clause
14,652
9
15
4,254
6,983
3,806
3,177
-1
-1
-- | This module provides utility functions for strategies to reduce code -- duplication since most strategies need this basic set of helper functions. module Strategies.Util ( StrategyState(..) , initializeStrategyState , getConsistentCodes , getShortestCode , getDefaultGuess , reset -- Reexport from...
eugenkiss/mastermind
haskell/Strategies/Util.hs
bsd-3-clause
3,109
0
11
676
633
364
269
67
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE TupleSections #-} {-# OP...
zohl/postgresql-simple-bind
tests/Test/PGDeclaration.hs
bsd-3-clause
1,597
13
8
298
376
224
152
37
1
-- #hide -------------------------------------------------------------------------------- -- | -- Module : Sound.ALUT.Config -- Copyright : (c) Sven Panne 2006 -- License : BSD-style (see the file libraries/ALUT/LICENSE) -- -- Maintainer : sven.panne@aedion.de -- Stability : provisional -- Portabili...
FranklinChen/hugs98-plus-Sep2006
packages/ALUT/Sound/ALUT/Config.hs
bsd-3-clause
8,105
58
9
1,034
793
458
335
-1
-1
module BB.Examples.SI where import Reactive.Banana import Reactive.Banana.Frameworks import Graphics.Ogre.HOgre import Graphics.Ogre.Types import OIS.Types import Reactive.Banana.BOGRE import Reactive.Banana.BOGRE.OIS (KeyState(..)) import BB.Util.Vec spaceInvaders :: IO () spaceInvaders = runGame myGame shipSpe...
DavidEichmann/boger-banana
src/BB/Examples/SI.hs
bsd-3-clause
5,434
26
28
2,093
1,340
735
605
88
4
module Hint.Parsers where import Prelude hiding (span) import Hint.Base import Control.Monad.Trans (liftIO) import qualified Hint.GHC as GHC data ParseResult = ParseOk | ParseError GHC.SrcSpan GHC.Message parseExpr :: MonadInterpreter m => String -> m ParseResult parseExpr = runParser GHC.parseStmt parseType :: ...
mvdan/hint
src/Hint/Parsers.hs
bsd-3-clause
2,505
0
18
1,158
475
238
237
41
2
module Main where import HM.HigherRank import HM.Monad import HM.Types import HM.Parser import Control.Monad.IO.Class (liftIO) import Text.PrettyPrint.HughesPJ import Text.ParserCombinators.Parsec import System.Exit (exitWith, ExitCode(..)) import System.Console.Haskeline import System.Environment (getArgs) import Sy...
MnO2/hindley-milner
src/HigherRankMain.hs
bsd-3-clause
2,236
4
24
665
820
422
398
67
4
module PolyGraph.Common.PropertySupport ( SimpleUOList(..) , SimpleOList(..) , MultiUOList(..) , MultiOList(..) , VariousVertices(..) , IsolatedVertices(..) , SimpleUOBag(..) , SimpleOBag(..) , MultiUOBag(..) , MultiOBag(..) , MixedBag (..) , VertexNames (..) , analyzeBag , trippleCounts ...
rpeszek/GraphPlay
src/PolyGraph/Common/PropertySupport.hs
bsd-3-clause
9,620
0
16
1,918
3,228
1,763
1,465
-1
-1
{-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} -- | Internal types and functions. module Path.Internal (Path(..)) where import Data.Data -- | Path of some base and type. -- -- Internally is a string. The string can be of two formats only: -- -...
robstewart57/path
src/Path/Internal.hs
bsd-3-clause
1,125
0
8
218
185
112
73
14
0
{-# LANGUAGE RankNTypes #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE ScopedTypeVariables #-} module Util ( module Util , on ) where import Control.Arrow ((&&&)) import Control.Lens import Data.Bifunctor import Data.Function (on) import Data.Maybe (fromMaybe) import qual...
kylcarte/wangtiles
src/Util.hs
bsd-3-clause
6,225
0
12
1,462
3,155
1,690
1,465
161
2
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PackageImports #-} {-# LANGUAGE UnicodeSyntax #-} {-| [@ISO639-1@] it [@ISO639-2B@] ita [@ISO639-3@] ita [@Native name@] Italiano [@English name@] Italian -} module Text.Numeral.Language.ITA ( ...
telser/numerals
src/Text/Numeral/Language/ITA.hs
bsd-3-clause
10,710
158
13
5,179
2,877
1,571
1,306
200
21
{-# language LambdaCase #-} module StateAndInfer where -------------------- Imports import System.Directory import Data import ProjectS import Data.Time import Data.Time.Clock import Control.Monad import Data.DateTime hiding (getCurrentTime) -------------------- Getting State getState :: IO [(Name,State)] getStat...
Luizss/TheSystem
src/StateAndInfer.hs
bsd-3-clause
17,163
0
17
5,555
5,386
2,714
2,672
410
15
{-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} module Nix.Thunk where import Control.Exception ( Exception ) import ...
jwiegley/hnix
src/Nix/Thunk.hs
bsd-3-clause
2,228
0
12
594
629
333
296
49
0
{-# LANGUAGE DeriveDataTypeable #-} module TPM.Driver.Socket ( TPMSocket(..), tpm_socket, tpm_logging_socket ) where import TPM.Driver import Network.Socket hiding (send, sendTo, recv, recvFrom) import Network.Socket.ByteString.Lazy import Data.ByteString.Lazy import Data.Binary import Prelude hiding (length,drop,s...
armoredsoftware/protocol
tpm/mainline/src/TPM/Driver/Socket.hs
bsd-3-clause
4,237
0
13
768
665
353
312
50
2
{-# LINE 1 "GHC.Read.hs" #-} {-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude, StandaloneDeriving, ScopedTypeVariables #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.Read -- Copyright : (c) The University of Glasgo...
phischu/fragnix
builtins/base/GHC.Read.hs
bsd-3-clause
23,675
1
16
6,883
5,454
3,034
2,420
358
3
main :: IO () main = do True <- return True return ()
roberth/uu-helium
test/staticwarnings/Generator1.hs
gpl-3.0
65
0
8
24
34
15
19
3
1
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE NoMonomorphismRestriction #-} module Data.Ephys.OldMWL.ParsePxyabw where import Data.Ephys.OldMWL.Header import qualified Data.Ephys.Spike as Arte import Data.Ephys.OldMWL.Parse -- We're using the old file organization. b/c hasty impor...
imalsogreg/arte-ephys
tetrode-ephys/src/Data/Ephys/OldMWL/ParsePxyabw.hs
gpl-3.0
3,329
0
17
962
604
352
252
74
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TemplateHaskell #-} module Ros.Std_srvs.EmptyRequest where import qualified Prelude as P import Prelude ((.), (+), (*)) import qualified Data.Typeable as T import Control.Applicative import Ros.Internal.Ro...
acowley/roshask
msgs/Std_srvs/Ros/Std_srvs/EmptyRequest.hs
bsd-3-clause
1,153
1
7
163
301
176
125
33
0
module Optimization.LineSearch.BarzilaiBorwein ( -- * Barizilai-Borwein method barzilaiBorwein -- * Step size methods , module Optimization.LineSearch ) where import Linear import Optimization.LineSearch -- | Barzilai-Borwein 1988 is a non-monotonic optimization method barzilaiBorwein :: (Addi...
ocramz/optimization
src/Optimization/LineSearch/BarzilaiBorwein.hs
bsd-3-clause
975
0
13
393
234
129
105
19
2
import System.Plugins import System.Directory a = "Foo.hs" -- uesr code b = "Bar.hs" -- trusted code. Result is "Bar.o" main = do status <- merge a b f <- case status of MergeFailure e -> error "merge failure" MergeSuccess _ _ f -> return f status ...
abuiles/turbinado-blog
tmp/dependencies/hs-plugins-1.3.1/testsuite/makewith/merge00/Main.hs
bsd-3-clause
991
0
11
434
301
136
165
27
6
{-# LANGUAGE TemplateHaskell, OverloadedStrings, QuasiQuotes #-} {-# LANGUAGE CPP #-} module Handler.Email ( postResetEmailR , postSendVerifyR , getVerifyEmailR ) where import Import import Control.Monad (when) import Network.Mail.Mime import Network.Mail.Mime.SES import System.Random (newStdGen) impor...
danse/haskellers
Handler/Email.hs
bsd-2-clause
3,026
0
20
1,049
650
330
320
69
2
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} ----------------------------------------------------------------------------- -- | -- Module : System.IO.Error.Lens -- Copyright : (C) 2012-2016 Edward Kmett -- License : BSD-style (see the file LIC...
ddssff/lens
src/System/IO/Error/Lens.hs
bsd-3-clause
3,387
0
8
499
737
396
341
64
1
{-# LANGUAGE OverloadedStrings, RecordWildCards, TemplateHaskell, TupleSections #-} -- | Extensions to Aeson parsing of objects. module Data.Aeson.Extended ( module Export -- * Extended failure messages , (.:) , (.:?) -- * JSON Parser that emits warnings , WarningParser , JSONWarning (..) , withObjec...
rrnewton/stack
src/Data/Aeson/Extended.hs
bsd-3-clause
5,159
9
19
1,283
1,392
756
636
120
2
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE CPP, NoImplicitPrelude, CApiFFI #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | -- Module : System.Posix.Internals -- Copyright : (c) The University of Glasgow, 1992-2002 -- License : see librari...
ezyang/ghc
libraries/base/System/Posix/Internals.hs
bsd-3-clause
21,440
0
20
4,423
3,706
1,920
1,786
-1
-1
module Out where import Control.Monad (forever) a1 :: IO (); a1 = forever $ putStrLn "a1" a2 :: IO (); a2 = forever $ putStrLn "a2" a3 :: IO (); a3 = forever $ putStrLn "a3" a4 :: IO (); a4 = forever $ putStrLn "a4" a5 :: IO (); a5 = forever $ putStrLn "a5" a6 :: IO (); a6 = forever $ putStrLn "a6" a7 :: IO (); a7 = fo...
olsner/ghc
testsuite/tests/perf/compiler/T10370.hs
bsd-3-clause
47,727
0
6
10,006
23,014
12,009
11,005
1,002
1
module NameNodeProxy where import Network import Control.Distributed.Process hiding (handleMessage) import qualified Data.ByteString.Char8 as B import System.IO import Control.Monad(forever) import Messages -- We wait for a client to connect with a socket. We then spawn a loca...
Ferdinand-vW/HHDFS
src/NameNodeProxy.hs
isc
1,747
0
11
354
472
233
239
34
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} module Products.UserRolesAPI ( UserRolesAPI , CreateUserRolesAPI , EditUserRolesAPI ,...
gust/feature-creature
legacy/exe-feature-creature-api/Products/UserRolesAPI.hs
mit
4,062
0
19
1,265
1,077
569
508
87
2
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleContexts, FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeOperators #-} module Grammar where import Generics.SOP import Generics.SOP.Dict import Data.Singletons.Prelude...
vladfi1/hs-misc
Grammar.hs
mit
698
0
11
119
151
87
64
-1
-1
{-# LANGUAGE CPP #-} {-# LANGUAGE UnicodeSyntax #-} module Fail.Errors.Test ( errorsTests , couldBeDisabledTests ) where #if __GLASGOW_HASKELL__ <= 708 import Control.Applicative ((<$>)) #endif import qualified Data.Text as T import System.Directory ( doesFileExist ) import System.FilePath ( replac...
asr/apia
test/Fail/Errors/Test.hs
mit
3,242
0
12
577
648
361
287
69
2
{-# LANGUAGE FlexibleInstances #-} module Model where import ClassyPrelude.Yesod import Database.Persist.Quasi import Internationalization.Types import Job.Types -- You can define all of your database entities in the entities file. -- You can find more information on persistent and how to declare entities -- at: -- h...
Tehnix/campaigns
Model.hs
mit
469
0
8
57
59
34
25
-1
-1