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 Utils where import qualified Data.Map as M import AbsHaskal import Interpreter import Types emptyEnv :: Env emptyEnv = (M.empty, M.empty) emptyStore :: Store emptyStore = (M.empty, M.empty) bool :: Boolean -> Bool bool b = case b of BoolT -> True BoolF -> False alloc :: M.Map Lo...
dplewa/haskal-interpreter
Utils.hs
apache-2.0
439
4
9
128
179
100
79
17
2
import Data.List solveRPN :: (Num a) => String -> a solveRPN = read . head . foldl foldingFunction [] .words where foldingFunction (x:y:ys) "*" = (x * y):ys foldingFunction (x:y:ys) "+" = (x + y):ys foldingFunction (x:y:ys) "-" = (y - x):ys foldingFunction (x:y:ys) "/" = (y / x):ys fo...
WillGluck/HaskellPlayground
solvingProblems.hs
apache-2.0
2,355
1
13
623
981
525
456
-1
-1
-- Copyright 2015 Abid Hasan Mujtaba -- -- 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 ...
abid-mujtaba/haskell-cas
test/Test.hs
apache-2.0
1,335
0
7
285
46
35
11
4
1
module Network.Minecraft.Move ( Move ) where import Data.Monoid data OnGround = OnGround | Flying | Same data Position = Position (Double, Double, Double) | Same data Look = Look (Float, Float) | Same data Stance = Stance Double | Same data Move = Move OnGround Position Look Stance | Seq Move Move
ziocroc/Minetlib
Network/Minecraft/Move.hs
bsd-2-clause
305
2
7
58
105
63
42
8
0
module McCarthy91 where mc91 :: (Integral a) => a -> a mc91 n | 100 < n = (n-10) | otherwise = (mc91 . mc91) $ (n+11)
OCExercise/haskellbook-solutions
chapters/chapter08/exercises/mc91.hs
bsd-2-clause
127
0
8
36
74
39
35
5
1
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QFrame.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:35 Warning : this file is machine generated - do not mo...
uduki/hsQt
Qtc/Enums/Gui/QFrame.hs
bsd-2-clause
5,944
0
18
1,425
1,729
861
868
157
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TemplateHaskell #-} module Onedrive.Types.SearchResultFacet where import Control.Lens (makeLensesWith, camelCaseFields) import Data.Aeson (FromJSON(parseJSON), Value(Object), (.:)) import Dat...
asvyazin/hs-onedrive
src/Onedrive/Types/SearchResultFacet.hs
bsd-3-clause
684
0
8
91
133
78
55
18
0
module Core.Function where
misterbeebee/calisson-hs
src/Core/Function.hs
bsd-3-clause
27
0
3
3
6
4
2
1
0
module Data.Functor.Comonad where import Data.Functor.Extend class Extend f => Comonad f where extract :: f a -> a
tonymorris/type-class
src/Data/Functor/Comonad.hs
bsd-3-clause
126
0
8
29
41
22
19
6
0
module Network.Raptr.Types where import Data.ByteString (ByteString) -- | An arbitrary opaque value that is stored in the logs. type Value = ByteString
capital-match/raptr
src/Network/Raptr/Types.hs
bsd-3-clause
165
0
5
35
24
16
8
3
0
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, FlexibleContexts, GeneralizedNewtypeDeriving #-} -- The Timber compiler <timber-lang.org> -- -- Copyright 2008-2009 Johan Nordlander <nordland@csee.ltu.se> -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or witho...
mattias-lundell/timber-llvm
src/Syntax.hs
bsd-3-clause
52,884
0
25
21,914
21,062
10,266
10,796
976
12
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-} -- | -- Module : FRP.Animas.Point2 -- Copyright : (c) Antony Courtney and Henrik Nilsson, Yale University, 2003 -- License : BSD-style (see the LICENSE file in the distribution) -- -- Maintainer : nilsson@cs.yale.edu -- Stability : provisional...
eamsden/Animas
src/FRP/Animas/Point2.hs
bsd-3-clause
1,300
0
9
275
369
198
171
25
1
{-# LANGUAGE PatternSynonyms #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.EXT.TextureCompressionS3TC -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- P...
haskell-opengl/OpenGLRaw
src/Graphics/GL/EXT/TextureCompressionS3TC.hs
bsd-3-clause
831
0
5
103
62
45
17
10
0
module Common where import Data.DoList (DoList, fromList, toList) type Text = String type Lines = DoList Text type Function = Text -> Text -> Lines pragmaFunc :: Text -> Function pragmaFunc pragma func body = do ["{-#" +++ pragma +++ func +++ "#-}"] [func +++ body] hotMatching :: Int -> Text hotMatching...
tserduke/hot
gen/Common.hs
bsd-3-clause
745
0
10
182
343
185
158
21
1
module Main where import Criterion.Main import Data.Time import Model import Network.HTTP.Date main :: IO () main = defaultMain [ bgroup "format" [ bench "formatHTTPDate" (whnf formatHTTPDate hd) , bench "utcToDate" (whnf utcToDate utcd) , bench "epochTimeToHTTPDate" (whnf epochTimeToHTTPDa...
kazu-yamamoto/http-date
bench/Bench.hs
bsd-3-clause
621
0
11
194
169
96
73
21
1
-- | matching a list of regexp agains a path_info, if matched, consponding app -- is used, otherwise, pass the env down to lower middleware module Hack2.Contrib.Middleware.RegexpRouter (regexp_router) where import Data.Maybe import Hack2 import Hack2.Contrib.Utils import Data.List (find) import Air.Env import Air.E...
nfjinjing/hack2-contrib-extra
src/Hack2/Contrib/Middleware/RegexpRouter.hs
bsd-3-clause
655
1
13
110
174
100
74
-1
-1
#!/usr/bin/runhaskell import System.Directory import System.IO import Control.Monad main :: IO () main = do doesFileExist "btrfs.cabal" >>= \f -> unless f $ fail "could not find btrfs.cabal" -- create System/Linux/Btrfs/ByteString.hsc withFile "System/Linux/Btrfs/ByteString.hsc" WriteMode $ \oHdl...
redneb/hs-btrfs
make-bytestring.hs
bsd-3-clause
703
0
18
185
149
70
79
15
1
module Matterhorn.Events.ReactionEmojiListOverlay ( onEventReactionEmojiListOverlay , reactionEmojiListOverlayKeybindings , reactionEmojiListOverlayKeyHandlers ) where import Prelude () import Matterhorn.Prelude import qualified Graphics.Vty as Vty import Matterhorn.Events.Keybi...
matterhorn-chat/matterhorn
src/Matterhorn/Events/ReactionEmojiListOverlay.hs
bsd-3-clause
1,623
0
10
280
208
118
90
31
1
module Graphics.FunGL.Attributes ( AttrLoc(..) , bindAttribLocation , getAttribLocation ) where import Foreign.Ptr import Foreign.C.String import Foreign.Marshal import Foreign.Storable import Graphics.GL import Graphics.FunGL.ShaderProgram newtype AttrLoc = AttrLoc { fromAttrLoc :: GLuint } -- | Bind attr...
FunPixCode/fungl
src/Graphics/FunGL/Attributes.hs
bsd-3-clause
878
0
11
146
217
117
100
20
2
{-| Copyright : (c) Dave Laing, 2017 License : BSD3 Maintainer : dave.laing.80@gmail.com Stability : experimental Portability : non-portable -} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} ...
dalaing/type-systems
src/Fragment/Variant/Ast/Term.hs
bsd-3-clause
2,955
0
14
587
1,049
550
499
63
0
module MiniKanren.Predicate ( module MiniKanren.Predicate, module Control.Monad.Logic ) where import MiniKanren.Term import Debug.Trace import qualified Data.Map as M import Control.Monad.Logic import qualified Data.Text as T import Control.Monad.Trans import Control.Monad.Trans.Either import Data.Function (on) ...
overminder/hs-mini-kanren
src/MiniKanren/Predicate.hs
bsd-3-clause
2,029
0
18
520
762
419
343
-1
-1
{-# LANGUAGE FlexibleContexts #-} module Steps where import Plots import Plots.Axis import Plots.Types hiding (B) import Data.List import Diagrams.Prelude import Diagrams.Backend.Rasterific mydata1 = [(1,3), (2,5.5), (3.2, 6), (3.5, 6.1)] mydata2 = mydata1 & each . _1 *~ 0.5 mydata3 = [V2 1.2 2.7, V2 2 5.1, V2 3.2...
bergey/plots
examples/steps.hs
bsd-3-clause
997
0
11
177
455
257
198
-1
-1
{-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE CPP #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeSynonymInstances #-} {-| Module : Numeric.AERN.RealArithmetic.Interval.UpDnConversion Descri...
michalkonecny/aern
aern-interval/src/Numeric/AERN/RealArithmetic/Interval/UpDnConversion.hs
bsd-3-clause
6,095
0
8
1,405
1,149
585
564
85
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE RecordWildCards #-} module Dang.Utils.Panic ( panic, Panic(), HasCallStack, ) where import Dang.Utils.PP import qualified Control.Exception as X import Data.Typeable (Typeable) import GHC.Stack data Panic = Panic CallStack Doc ...
elliottt/dang
src/Dang/Utils/Panic.hs
bsd-3-clause
1,146
0
14
432
348
179
169
-1
-1
{-# LANGUAGE DeriveGeneric #-} module Types where import GHC.Generics import Data.Map (Map) type Dependency = Map StackName [StackName] -- list of nodes with outgoing edge targets data Stack = Stack {sStackId :: StackId, sStackName :: StackName, sExports :: [Export]} deri...
toothbrush/forest-fire
src/Types.hs
bsd-3-clause
987
0
9
225
234
142
92
17
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE TypeSynonymInstances #-} module RSAhelpe...
crowley100/my_distro_API
src/RSAhelpers.hs
bsd-3-clause
3,530
0
12
1,104
787
438
349
73
1
{-# LANGUAGE CPP, ForeignFunctionInterface #-} module Util.System(tempfile,withTempdir,rmFile,catchIO, isWindows, writeSource, writeSourceText, readSource, setupBundledCC, isATTY) where -- System helper functions. import Control.Exception as CE import Control.Monad (when) import ...
aaronc/Idris-dev
src/Util/System.hs
bsd-3-clause
3,909
0
16
1,300
950
487
463
61
2
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, ScopedTypeVariables #-} {- | This module contains the definition of the TimeStepParallelProgram type class, and a base type that implements it. -} module TimeStepParallelProgram ( TimeStepParallelProgram(..), PlProgram(..) ) where import T...
ekinan/HaskellTurtleGraphics
src/TimeStep/TimeStepParallelProgram.hs
bsd-3-clause
4,372
0
20
1,322
911
492
419
53
0
module Data.Param.Integer ( Signed(..) , Unsigned(..) , Index (..) , HWBits(..) ) where import Types import qualified Data.Bits as B newtype (NaturalT nT) => Signed nT = Signed Integer newtype (NaturalT nT) => Unsigned nT = Unsigned Integer newtype (PositiveT upper) => Index upper = Index Integer class (...
christiaanb/clash
clash/Data/Param/Integer.hs
bsd-3-clause
396
0
8
87
148
91
57
13
0
{-| Module : Data.Network.IP Description : Binary instances for Data.IP License : BSD3 Stability : Experimental MRT is a library for parsing Multi-Threaded Routing Toolkit (MRT) export files, of the kind you might find on the RouteViews archive. -} {-# OPTIONS_GHC -fno-warn-orphans #-} module Data.Network...
codebje/hask-mrt
src/Data/Network/IP.hs
bsd-3-clause
797
0
10
181
153
84
69
13
0
{-# LANGUAGE CPP #-} {-# LANGUAGE Rank2Types #-} {-# OPTIONS_GHC -fno-warn-duplicate-exports #-} {-# OPTIONS_HADDOCK show-extensions #-} -- | -- Module : Yi.Config.Simple -- License : GPL-2 -- Maintainer : yi-devel@googlegroups.com -- Stability : experimental -- Portability : portable -- -- A simplifi...
noughtmare/yi
yi-core/src/Yi/Config/Simple.hs
gpl-2.0
12,140
0
13
2,490
1,827
1,075
752
184
3
module Tests.Readme (test) where import qualified Control.Lens as Lens import qualified Data.Aeson.Lens as LensAeson import Data.List.Lens import qualified Data.Set as Set import qualified Data.Text as Text import qualified Data.Yaml as Yaml import Test.Lamdu.Prelude test :: Test test = do ...
lamdu/lamdu
test/Tests/Readme.hs
gpl-3.0
1,422
0
19
461
354
183
171
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- ...
fmapfmapfmap/amazonka
amazonka-s3/gen/Network/AWS/S3/HeadObject.hs
mpl-2.0
19,301
0
35
4,298
3,348
1,960
1,388
350
1
module Syntax.Identifier where import Syntax.Tree import Syntax.Common -- The keywords reserved by the language. These are not allowed to be function -- names, however function names are allowed to contain reserved keywords. reservedKeywords :: [String] reservedKeywords = ["read", "True", "False", "not", "and", "or",...
BakerSmithA/Turing
src/Syntax/Identifier.hs
bsd-3-clause
3,892
0
11
861
908
475
433
62
2
{-# OPTIONS_GHC -fno-warn-missing-methods #-} {-# OPTIONS_GHC -fno-warn-incomplete-patterns #-} -- | Dense vectors and linear algebra operations. -- -- NOTE: -- This module is a prototype for what a more fully featured linear algebra module might look like. -- There are a number of efficiency related features that are...
Drezil/subhask
src/SubHask/Algebra/Vector.hs
bsd-3-clause
50,181
21
26
16,618
19,937
10,265
9,672
-1
-1
{-# LANGUAGE PackageImports, DeriveDataTypeable #-} module JSONGeneric where import Data.Aeson hiding (toJSON, fromJSON, parseJSON) import qualified Data.Aeson.Types as T import Data.Generics import Data.Text (pack, unpack) import qualified Data.Vector as V import Data.ByteString.Lazy (ByteString) import qualified Da...
diflying/logitext
JSONGeneric.hs
bsd-3-clause
7,819
0
17
2,733
2,146
1,129
1,017
128
11
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeOperators #-} {-# OPTIONS_HADDOCK show-extensions #-} -- | -- Module : Yi.Command -- License : GPL-2 -- Maintainer : yi-devel@googlegroups.com -...
noughtmare/yi
yi-core/src/Yi/Command.hs
gpl-2.0
6,720
0
18
1,584
1,740
924
816
108
5
module FromInteger where main :: Fay () main = putStrLn $ show $ fromInteger 5
fpco/fay
tests/fromInteger.hs
bsd-3-clause
80
0
6
16
30
16
14
3
1
module B(module A,module B) where import A infixl 7 * infixr 8 ^ a*b = undefined a^b = undefined
forste/haReFork
tools/base/tests/infix/B.hs
bsd-3-clause
98
0
5
20
49
28
21
6
1
module SolverQuickCheck where import Test.Tasty import qualified UnitTests.Distribution.Solver.Modular.QuickCheck tests :: TestTree tests = testGroup "Solver QuickCheck" [ testGroup "UnitTests.Distribution.Solver.Modular.QuickCheck" UnitTests.Distribution.Solver.Modular.QuickCheck.tests ] main :: IO ...
mydaum/cabal
cabal-install/tests/SolverQuickCheck.hs
bsd-3-clause
348
0
8
48
65
39
26
10
1
-- !!! hiding an entity T (where T is both a class and a dcon.) module M where import Mod126_A hiding (T) --x :: T x = T
ghc-android/ghc
testsuite/tests/module/mod126.hs
bsd-3-clause
123
0
5
30
20
14
6
3
1
module Nat where data Nat = Zero | Succ Nat instance Eq (Nat) where Zero == Zero = True Zero == Succ n = False Succ n == Zero = False Succ n == Succ m = n == m instance Show (Nat) where show Zero = "Zero" show (Succ n) = "Succ (" ++ show n ++ ")" instance Num (Nat) where Zero + n = n n + Zero = n ...
dirkz/Thinking_Functionally_With_Haskell
3/Nat.hs
isc
1,113
0
10
329
609
302
307
40
1
{-# LANGUAGE OverloadedStrings #-} -- | C code generator. This module can convert a correct ImpCode -- program to an equivalent C program. The C code is strictly -- sequential, but can handle the full Futhark language. module Futhark.CodeGen.Backends.SequentialC ( compileProg, GC.CParts (..), GC.asLibrary, ...
diku-dk/futhark
src/Futhark/CodeGen/Backends/SequentialC.hs
isc
1,152
0
11
194
229
139
90
24
1
{-# htermination (foldr1 :: (a -> a -> a) -> (List a) -> a) #-} import qualified Prelude data MyBool = MyTrue | MyFalse data List a = Cons a (List a) | Nil foldr1 :: (a -> a -> a) -> (List a) -> a; foldr1 f (Cons x Nil) = x; foldr1 f (Cons x xs) = f x (foldr1 f xs);
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/foldr1_1.hs
mit
288
0
8
85
119
65
54
6
1
module H6502.OpcodeMap ( opcodeMap ) where import Control.Monad import Data.Array import Data.Bits import Data.Word import H6502.State import H6502.Trans import H6502.Util -- | Map of all opcode behaviors. All 'Nothing's correspond to unspecified opcodes. opcodeMap :: Monad m => Array Word8 (Mayb...
mniip/h6502
src/H6502/OpcodeMap.hs
mit
20,144
0
17
8,174
7,622
3,999
3,623
536
21
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module ScopeAnalyzer (scopeAnalysis, SAState(..)) where import Data.Maybe import Data.List import Control.Monad.State import Control.Monad.Except import AST import ClassAnalyzer data SAState = SAState { symbolIndex :: SIdentifier, symbolTable :: Symbo...
TueHaulund/ROOPLC
src/ScopeAnalyzer.hs
mit
7,468
0
17
2,296
2,561
1,280
1,281
178
14
module Triangle (TriangleType(..), triangleType) where import Data.List (sort) import qualified Data.Set as Set data TriangleType = Equilateral | Isosceles | Scalene | Illegal deriving (Eq, Show) triangleType :: (Num a, Ord a) => a -> a -> a -> T...
c19/Exercism-Haskell
triangle/src/Triangle.hs
mit
582
0
9
193
233
129
104
17
1
module Concurrency.Pool ( WorkPool, buildPool, terminatePool, queueWork, getResult, tryGetResult, getResults, numCores ) where import Control.Concurrent.STM import Control.Concurrent import Control.Monad import Control.DeepSeq data NFData o => Worker i o = Worker { wkOutput :: TMVar o, wkInput :: TMVar i ...
atomiccheese/distpi
Concurrency/Pool.hs
mit
2,138
128
10
412
887
472
415
51
3
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleContexts #-} module Main where import Control.Applicative import Control.Monad.Reader import Data.Aeson import qualified Data.ByteString.Char8 as BS import qualified Data.ByteString.Lazy as BL import Data.Maybe (isJust, fro...
ulrikrasmussen/BoxProver
src/Server.hs
mit
6,130
0
24
1,759
1,712
880
832
138
3
{-# LANGUAGE CPP, BlockArguments #-} module Hickory.Utils.Utils where import Data.List import Data.Ord import Data.Maybe import Data.IORef import Data.Time import Data.Text (Text) import qualified Data.Text.IO as TextIO import qualified Debug.Trace import qualified Foreign.Marshal.Array as FMA import Foreign.Storable...
asivitz/Hickory
Hickory/Utils/Utils.hs
mit
3,107
0
17
902
1,478
754
724
-1
-1
-- Many thanks to Erin Dahlgren for this haskell implementation of Ones. -- ones.hs import System.Environment import Data.Digits ones :: Int -> Int ones n = foldr (\x y -> if x == 1 then x+y else y) 0 (digits 10 n) countOnes :: Int -> Int countOnes n = foldr (\x y -> (ones x) + y) 0 [0..n] -- or less efficiently,...
trainman419/cnc-grader
ones/ones.hs
mit
459
0
10
107
159
84
75
10
2
import Criterion.Main import Otsu import Data.Vector.Unboxed as V vec :: V.Vector Double vec = V.map (/s) (V.enumFromN 1 256) where s = Prelude.sum [1..256] main :: IO () main = defaultMain [ bgroup "multiOtsu" [ bench "3" $ nf (multiOtsu vec) 3 , bench "2" $ nf (multiOtsu vec) 2 , bench "1" $ nf (mu...
UnrealQuester/HASCII
bench/bench.hs
mit
345
0
12
85
159
82
77
11
1
module State where import Cryptography.MasterPassword.Types import Cryptography.MasterPassword.Encode import Foreign.C.String import Foreign.Ptr import Foreign.C.Types import Foreign.Marshal.Alloc import Data.Maybe import System.FilePath import System.Directory import System.IO data ManageState = ManageState { nam...
allonsy/masterpass
src/State.hs
mit
1,778
0
12
304
469
243
226
46
2
module Distribution.CurrentPackageDescription ( currentPackageDescription , getField ) where import Distribution.PackageDescription import Distribution.PackageDescription.Parse import Distribution.Verbosity import Data.List (isSuffixOf) import Language.Haskell.TH (stringE, runIO, Q, Exp) import System...
quintype/ringo
app/Distribution/CurrentPackageDescription.hs
mit
953
0
13
151
244
130
114
22
2
{-| Module : CSH.Eval.Config Description : Configuration utilities Copyright : Stephen Demos, Matt Gambogi, Travis Whitaker, Computer Science House 2015 License : MIT Maintainer : pvals@csh.rit.edu Stability : Provisional Portability : POSIX Provides functionality for reading config values. -} module CSH...
gambogi/csh-eval
src/CSH/Eval/Config.hs
mit
2,789
0
16
761
442
250
192
46
2
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} module Regex ( reduceRichRegex , produceAll , produceRandom , optimizeFix , reduceRegex ) where import qualified Control.Monad.State as St import qualified System.Random as Rand import qualified Data.Text as T import Types reduceRichRe...
beala/regexpand
src/Regex.hs
mit
4,089
0
12
951
1,435
730
705
98
3
{-# LANGUAGE Trustworthy #-} -- | -- Module : Statistics.Distribution.Hypergeometric.GenVar -- Copyright : (c) 2015 Sam Rijs -- (c) 2005 Robert Kern -- (c) 1998 Ivan Frohne -- License : MIT -- -- Maintainer : srijs@airpost.net -- Stability : experimental -- module Statistics.Distributio...
srijs/statistics-hypergeometric-genvar
src/Statistics/Distribution/Hypergeometric/GenVar.hs
mit
2,766
0
19
839
856
459
397
44
3
---------------------------------------------------------------------------------- -- | Layers of abstractions, for internal use only. {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} module Web.SocketIO.Types.Layer ( ConnectionM(..) , Session...
banacorn/socket.io-haskell
Web/SocketIO/Types/Layer.hs
mit
3,351
7
11
599
614
359
255
57
0
quicksort :: [Int] -> [Int] quicksort [] = [] quicksort (x:xs) = quicksort [x1 | x1 <- xs, x1 < x] ++ [x] ++ quicksort [x2 | x2 <- xs, x2 >= x]
sylsaint/courses
FP101x/quick.hs
mit
144
0
10
33
98
51
47
3
1
module RedShift ( redShiftStart , redShiftToggle ) where import qualified XMonad.Util.ExtensibleState as State import Imports import Misc data RedShift = RedShiftEnabled | RedShiftDisabled deriving (Eq, Ord, Enum, Bounded, Read, Show, Typeable) instance ExtensionClass RedShift where initialValue = RedShif...
mgsloan/compconfig
env/src/RedShift.hs
mit
1,009
0
10
170
251
135
116
-1
-1
{-# htermination listToFM :: [(Bool,b)] -> FiniteMap Bool b #-} import FiniteMap
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/FiniteMap_listToFM_8.hs
mit
81
0
3
12
5
3
2
1
0
-- Copyright (C) 2006-2011 Angelos Charalambidis <a.charalambidis@di.uoa.gr> -- -- 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 2, or (at your option) -- any later version...
acharal/hopes
src/interpreter/Main.hs
gpl-2.0
3,362
0
15
926
832
444
388
68
7
-- Copyright (c) 2011-2013, bkil.hu -- This program is free software and can be distributed under the terms of -- the GNU General Public License v2, -- see COPYING for detailed licensing terms. -- created on 2012-05-15 (forked from minichess) -- GHC compiles without any annotation at all, but Hugs will need a few type...
google-code/bkil-open
volatile/edu/ai/nanochess.hs
gpl-2.0
1,597
0
18
365
1,063
608
455
30
2
{-# OPTIONS -Wall #-} {-# LANGUAGE OverloadedStrings #-} module Editor.AnimIds( backgroundCursorId, textCursorId, fromIRef, collapserId, branchSelection, goUpId, delegating, notDelegating) where import Graphics.UI.Bottle.Animation(AnimId, joinId) import Data.Store.IRef(IRef, guid) import Data.Store.Guid(bs) impo...
alonho/bottle
examples/Editor/AnimIds.hs
gpl-3.0
885
0
8
120
233
141
92
26
1
-- TTyped: A dependently typed programming language. -- Copyright (C) 2018 Taran Lynn -- -- 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 optio...
lambda-11235/ttyped
src/Main.hs
gpl-3.0
3,562
0
27
1,188
948
459
489
69
11
module System.HComedi ( -- * Type Definitions Handle , SubDevice (..) , Channel (..) , B.SubDeviceType (..) , B.Ref (..) , B.OutOfRangeBehavior (..) , B.ChanOptFlag (..) , B.SubDeviceFlag (..) , B.TrigSrc (..) , CommandTestResult (..) -- * Intermediate level functions , withHandl...
imalsogreg/hComedi
src/System/HComedi.hs
gpl-3.0
9,986
0
27
2,663
3,053
1,618
1,435
207
2
{- Copyright 2012 Dustin DeWeese This file is part of peg. peg 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 later version. peg i...
HackerFoo/peg
Peg/Types.hs
gpl-3.0
3,142
0
11
930
944
508
436
85
3
-- {-# LANGUAGE OverloadedStrings,TemplateHaskell #-} {-# LANGUAGE OverloadedStrings #-} module Lib ( run ) where import Data.Aeson import Data.Aeson.TH import qualified Data.ByteString.Lazy.Char8 as BL import DataStructure import Algebra import Utils -- import Shadows import qualified Plotter as PL --te...
apanagio/easykenak
slicer2/src/Lib.hs
gpl-3.0
1,207
0
17
288
249
134
115
24
2
{-# LANGUAGE OverloadedStrings #-} module System.DevUtils.Base.Cloud.Amazon.ElastiCache.Reserved ( ECRoot (..), ECConfig (..), ECRegion (..), ECInstanceType (..), ECTier (..), ECValueColumns (..) ) where import System.DevUtils.Base.Cloud.Amazon.Misc import System.DevUtils.Base.Currency import Data.Aeson import ...
adarqui/DevUtils-Base
src/System/DevUtils/Base/Cloud/Amazon/ElastiCache/Reserved.hs
gpl-3.0
1,774
0
11
327
594
335
259
67
0
module Model.Wishlist where import ClassyPrelude.Yesod import Data.List (nub) import Yesod.Form.Bootstrap3 (BootstrapFormLayout (..), renderBootstrap3, withPlaceholder) import Foundation import Model import ...
prikhi/MyBookList
Model/Wishlist.hs
gpl-3.0
1,917
0
16
517
460
237
223
34
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} -- | Launch LXD images with init scripts module System.LXD.LXDFile.Launch ( Profile , InitScriptContext(..) , launch ) where import Prelude hiding (writeFile) import Contr...
hverr/lxdfile
src/System/LXD/LXDFile/Launch.hs
gpl-3.0
2,529
0
15
527
762
415
347
55
2
import qualified Data.ByteString.Lazy as BL import qualified Data.ByteString as BS import Data.Binary.Get import Data.Word import Data.Bits import Control.Applicative hiding (empty) import Control.Monad import Control.Arrow import Data.List import Data.Maybe import System.Environment import System.Directory (r...
hepek/MPEG-TS
Main.hs
gpl-3.0
5,164
0
24
1,566
1,656
826
830
112
7
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Messages/List.hs
mpl-2.0
9,010
0
27
2,403
1,444
829
615
203
1
{-# LANGUAGE OverloadedStrings #-} module Http ( httpPOST ) where import Control.Monad import Data.Aeson import Data.Text import qualified Data.Text as T import qualified Data.ByteString.Char8 as C import qualified Data.ByteString as BS impo...
wereHamster/mudbath
Http.hs
unlicense
1,186
0
13
278
312
183
129
20
1
module Main where import Test.Framework (defaultMain) import Network.Haskoin.Constants import qualified Network.Haskoin.Node.Tests (tests) import qualified Network.Haskoin.Node.Units (tests) main :: IO () main = do setProdnet defaultMain ( Network.Haskoin.Node.Tests.tests ++ Network.Haskoin....
plaprade/haskoin
haskoin-node/test/Main.hs
unlicense
348
0
10
67
87
54
33
11
1
data BinTreeInt = Void | Node Int BinTreeInt BinTreeInt deriving Show treeElem :: Int -> BinTreeInt -> Bool treeElem x Void = False treeElem x (Node n a b) | x == n = True | otherwise = treeElem x a || treeElem x b
tonilopezmr/Learning-Haskell
Exercises/2/Exercise_20.hs
apache-2.0
219
0
8
49
96
47
49
6
1
-- Copyright 2018 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 w...
google/cabal2bazel
src/Google/Utils/DirectoryUtils.hs
apache-2.0
2,259
0
10
384
388
220
168
-1
-1
{-# LANGUAGE OverloadedStrings #-} -- | -- Module : Documentation.Haddock.Parser.Util -- Copyright : (c) Mateusz Kowalczyk 2013-2014, -- Simon Hengel 2013 -- License : BSD-like -- -- Maintainer : haddock@projects.haskell.org -- Stability : experimental -- Portability : portab...
haskell/haddock
haddock-library/src/Documentation/Haddock/Parser/Util.hs
bsd-2-clause
2,475
0
13
572
645
352
293
44
4
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QStyleOptionRubberBand.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:26 Warning : this file is machine gener...
uduki/hsQt
Qtc/Gui/QStyleOptionRubberBand.hs
bsd-2-clause
3,682
0
12
486
814
428
386
-1
-1
{-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE UndecidableInstances #-} #if __GLASGOW_HASKELL__ < 707 #error This code requires GHC 7.7+ #endif #include "MachDeps.h" #include "HsBaseConfig.h" -- | --...
hvr/int-cast
Data/IntCast.hs
bsd-3-clause
14,528
0
14
3,359
1,820
1,042
778
-1
-1
-- A TCP client that does the following: -- * Reads multiple filenames passed on the command line -- * Opens as many concurrent connections to the server -- * Sends all the files concurrently to the server import System.Environment (getArgs) import Streamly import qualified Streamly.Prelude as S import qualified Stre...
harendra-kumar/asyncly
examples/FromFileClient.hs
bsd-3-clause
719
0
15
158
168
98
70
13
1
{- | Module : Network.Silver.Peer Description : Peer discovery. Copyright : (c) Eric Izoita 2017 License : BSD3 Maintainer : ericizoita@gmail.com Stability : experimental Portability : portable This module handles peer discovery. This includes tracker requests as well as other methods (local, PeX...
nytopop/silver
src/Network/Silver/Peers.hs
bsd-3-clause
4,719
0
23
1,267
1,445
769
676
108
5
{-# LANGUAGE OverloadedStrings #-} module Raven.Server.Commands ( parseCommand )where import Network.Transport (ConnectionId) import Control.Distributed.Process import Crypto.Hash import Data.ByteString.Char8 (ByteString) import qualified Data.ByteString.Char8 as B import Data.Map (Map) import qualified Data.Map ...
denumerate/raven
src/Raven/Server/Commands.hs
bsd-3-clause
12,426
0
16
2,807
2,859
1,539
1,320
203
2
module Exercises where import Control.Monad (join, liftM) -- Exercise 1 -- putStrA :: String -> IO () putStrA [] = return () putStrA (x:xs) = do putChar x putStrA xs putStrB :: String -> IO () putStrB [] = return () putStrB (x:xs) = putChar x >>= \_ -> putStrB xs putStrC :: String -> IO () putStrC [] = return ...
paulkeene/FP101x
chapter08/Exercises.hs
bsd-3-clause
8,165
0
13
2,264
3,006
1,525
1,481
160
2
{-# LANGUAGE TupleSections #-} -- | This module contains the code for generating "tags" for constraints -- based on their source, i.e. the top-level binders under which the -- constraint was generated. These tags are used by fixpoint to -- prioritize constraints by the "source-level" function. module Language.Haskell....
ssaavedra/liquidhaskell
src/Language/Haskell/Liquid/UX/CTags.hs
bsd-3-clause
2,214
0
12
448
480
287
193
37
1
{-# LANGUAGE OverloadedStrings, ExistentialQuantification #-} ------------------------------------------------------------------------------------- -- | -- Copyright : (c) Hans Hoglund 2012 -- -- License : BSD-style -- -- Maintainer : hans@hanshoglund.se -- Stability : experimental -- Portabilit...
music-suite/lilypond
src/Data/Music/Lilypond/Value.hs
bsd-3-clause
2,003
0
8
425
394
225
169
40
1
{- | Functions for constructing a simplified regular relation. -} {-# LANGUAGE CPP #-} module FST.RRegTypes ( module FST.RegTypes, -- * Types RReg(..), -- * Combinators (<*>), (<.>), -- * Constructors idR, r, ) where #if MIN_VERSION_base(4,8,0) import Prelude hiding ((<*>)) #endif import FST.RegTypes ...
johnjcamilleri/fst
FST/RRegTypes.hs
bsd-3-clause
2,951
0
12
1,102
1,056
546
510
60
1
{-# LANGUAGE QuasiQuotes #-} import LiquidHaskell import Data.Set -- ISSUE: can we please allow things like `empty` to also -- appear in type and alias specifications, not just in -- measures as in `goo` below? [lq| type IsEmp a = {v:[a] | Data.Set.elems v = Data.Set.empty } |] [lq| foo :: IsEmp Int |] foo :: [...
spinda/liquidhaskell
tests/gsoc15/unknown/pos/coretologic.hs
bsd-3-clause
459
0
7
108
116
69
47
11
1
{-# LANGUAGE DeriveGeneric , ScopedTypeVariables #-} module Main where import Application import Application.Types import Routes import Options.Applicative import qualified Data.Yaml as Y import qualified Data.Aeson.Types as A import Network.Wai.Trans import Network.Wai.Handler.Warp import Network....
athanclark/clark-mining-tech
src/Main.hs
bsd-3-clause
3,962
0
16
1,069
1,108
560
548
121
3
{-# LANGUAGE CPP #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE GADTs, TypeFamilies #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE FlexibleInstances, FlexibleContexts #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} ...
pepeiborra/narradar
src/Narradar/Types.hs
bsd-3-clause
16,118
0
19
4,548
4,436
2,383
2,053
-1
-1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE Trustworthy #-} #if defined(__GLASGOW_HASKELL__) && !defined(__HADDOCK__) #include "MachDeps.h" #endif module Data.Tickle.Get( -- * Get data type Get -- ** Pr...
NICTA/tickle
src/Data/Tickle/Get.hs
bsd-3-clause
45,237
0
24
12,242
11,996
6,507
5,489
1,282
9
-- Copyright (c) 2016-present, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. module Duckling.AmountOfMoney.CA.Tests ( tests ) where import Data.String import Prelude import Test.Tasty im...
facebookincubator/duckling
tests/Duckling/AmountOfMoney/CA/Tests.hs
bsd-3-clause
522
0
9
78
79
50
29
11
1
-- Copyright (c) 2016-present, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. {-# LANGUAGE GADTs #-} {-# LANGUAGE NoRebindableSyntax #-} {-# LANGUAGE OverloadedStrings #-} module Duckling.Ti...
facebookincubator/duckling
Duckling/Time/NL/NL/Rules.hs
bsd-3-clause
577
0
8
85
66
44
22
10
1
module NumberTheory where import qualified Data.Bits as DB import qualified Data.List as DL -- * General -- | Count how many times a function can iterate - seems like a common pattern.. countUntil :: (Integral b) => (a -> Bool) -> (a -> a) -> a -> b countUntil test f x = snd $ until (test . fst) applyAndInc (x, 0) ...
sergsr/projeu
src/NumberTheory.hs
mit
2,586
0
11
659
847
477
370
37
1
-- run the following in ghci.. import Sound.OSC.FD as O -- gets a randomly allocated port, might be useful.. -- udp <- udpServer "127.0.0.1" 0 -- udpPort udp udp <- udpServer "127.0.0.1" 6012 r <- openUDP "127.0.0.1" 6011 sendMessage r $ Message "/code" [string "hello", string "sound \"bd sn\""] m <- recvMessage ...
tidalcycles/Tidal
tidal-listener/examples/first.hs
gpl-3.0
655
6
8
125
206
92
114
-1
-1
{-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-orphans #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Test.AWS.Gen.Config -- Copyright : (c) 2013-2015 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan ...
olorin/amazonka
amazonka-config/test/Test/AWS/Gen/Config.hs
mpl-2.0
8,946
0
7
1,454
751
449
302
129
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} module Stack.ConfigSpec where import Control.Applicative import Control.Monad.Logger import Control.Exception import Data.Maybe import Data.Monoid import Network.HTTP.Conduit (Manager) import Path --import System.File...
duplode/stack
src/test/Stack/ConfigSpec.hs
bsd-3-clause
3,906
0
26
934
990
473
517
89
1
{-# LANGUAGE ScopedTypeVariables #-} module Graphics.GL.Pal.ArrayBuffer where import Foreign import Graphics.GL import Graphics.GL.Pal.Types import Graphics.GL.Pal.WithActions import Control.Monad.Trans import qualified Data.Vector.Storable.Mutable as V import Data.Vector.Storable.Mutable (IOVector) import Data.Prox...
lukexi/gl-pal
src/Graphics/GL/Pal/ArrayBuffer.hs
bsd-3-clause
4,611
0
17
1,022
1,337
664
673
89
1
{-# LANGUAGE RankNTypes #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Pipes.Transduce.ByteString ( -- * Collecting input intoLazyBytes -- * Reading from handles , drainHandle , drainHandleFallibly , ChunkSize , chunkSize , chunkSizeDefault ) where im...
danidiaz/foldl-transduce-pipes
src/Pipes/Transduce/ByteString.hs
bsd-3-clause
1,796
0
10
327
358
203
155
40
1
-- {-# LANGUAGE CPP #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #...
cchalmers/optical
src/Optical/Witherable.hs
bsd-3-clause
22,678
0
15
5,210
5,705
3,084
2,621
-1
-1