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
-------------------------------------------------------------------------- -- -- -- NfaTypes.hs -- -- -- -- The type of NFAs, defined using the Set library of sets. -- -- -- -- (c) Simon Thompson, 1995, 2000 -- -- -- -----------------------------------------------------------...
SonomaStatist/CS454_NFA
haskellDFA/RegExp/NfaTypes.hs
unlicense
1,255
4
10
332
127
83
44
6
0
-- Copyright (c) 2014-2015 Jonathan M. Lange <jml@mumak.net> -- -- 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 ...
jml/haverer
lib/Haverer/Engine.hs
apache-2.0
3,791
0
14
756
1,151
565
586
72
3
module Tiling.A320097Spec (main, spec) where import Test.Hspec import Tiling.A320097 (a320097) main :: IO () main = hspec spec spec :: Spec spec = describe "A320097" $ it "correctly computes the first 5 elements" $ take 5 (map a320097 [1..]) `shouldBe` expectedValue where expectedValue = [1, 15, 463, 1637...
peterokagey/haskellOEIS
test/Tiling/A320097Spec.hs
apache-2.0
331
0
10
63
115
65
50
10
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE MultiWayIf #-} module Client.CLEnts where import Control.Lens (use, (^.), (.=), Traversal', preuse, ix, Lens', (+=), (-=)) import Control.Monad (when, liftM, unless) import Data.Bits (shiftL, shiftR, (.&.), (.|.), complement) import Data.Char ...
ksaveljev/hake-2
src/Client/CLEnts.hs
bsd-3-clause
64,875
0
32
25,387
15,573
8,007
7,566
-1
-1
{-# LANGUAGE CPP, OverloadedStrings, NoImplicitPrelude #-} #if __GLASGOW_HASKELL__ >= 704 {-# LANGUAGE Safe #-} #endif -------------------------------------------------------------------------------- -- | -- Module : Data.String.Combinators -- Copyright : (c) 2009-2011 Bas van Dijk -- License : BSD-styl...
basvandijk/string-combinators
Data/String/Combinators.hs
bsd-3-clause
6,961
0
10
1,505
1,545
887
658
138
3
-- | -- Module : Network.TLS.Parameters -- License : BSD-style -- Maintainer : Vincent Hanquez <vincent@snarc.org> -- Stability : experimental -- Portability : unknown -- module Network.TLS.Parameters ( ClientParams(..) , ServerParams(..) , CommonParams , ClientHooks(..) , ServerHo...
AaronFriel/hs-tls
core/Network/TLS/Parameters.hs
bsd-3-clause
9,925
0
14
2,671
1,247
788
459
136
1
import Handler.Fib import Handler.Home import Handler.Markdown import Import {- We've now defined all of our handler functions. The last step is create a dispatch function which will reference all of them. The mkYesodDispatch function does this, following the standard naming sc...
fdilke/fpc-exp
src/Main.hs
bsd-3-clause
908
0
6
188
47
25
22
-1
-1
import Data.Aeson (eitherDecode, encode) import Data.List (findIndex, intercalate) import Data.MBP (HasDimensions(dims), MBP, branches, elems, matrix, mbp, outputs, position, step, steps) import Data.ByteString.Lazy (ByteString) import Data.Text (Text) import Data.Monoid ((<>)) import System.Exit (die) import qualified...
GaloisInc/cryfsm
fsmevade.hs
bsd-3-clause
3,261
0
15
923
991
498
493
69
2
{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Client.Dependency.TopDown.Constraints -- Copyright : (c) Duncan Coutts 2008 -- License : BSD-like -- -- Maintainer : duncan@community.haskell.org -- Stability : provisional...
christiaanb/cabal
cabal-install/Distribution/Client/Dependency/TopDown/Constraints.hs
bsd-3-clause
24,152
10
17
6,826
5,399
2,884
2,515
393
39
{-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} module Api where import Control.Monad.Reader (ReaderT, lift, runReaderT) -- import Control.Monad.Trans.Either (EitherT, left) import Control.Monad.Trans.Except (ExceptT, throwE) import Data.Int ...
radicaljims/pvn-webservice
src/Api.hs
bsd-3-clause
2,083
0
14
580
646
341
305
48
2
module CS.JsonDotNet.Internal ( module CS.JsonDotNet.Internal.Types ) where import CS.JsonDotNet.Internal.Types
cutsea110/servant-csharp
src/CS/JsonDotNet/Internal.hs
bsd-3-clause
143
0
5
40
24
17
7
2
0
-- Copyright 2013 Kevin Backhouse. module TestOrdCons ( tests, instanceTest ) where import qualified Test.Framework as TF ( Test ) import Test.Framework.Providers.QuickCheck2 ( testProperty ) import Control.Monad.ST2 import Control.Monad.MultiPass import Control.Monad.MultiPass.Instrument.OrdCons import Control.Mona...
kevinbackhouse/Control-Monad-MultiPass
tests/TestOrdCons.hs
bsd-3-clause
1,699
0
21
371
440
246
194
37
1
module Arhelk.Armenian.Lemma.Data.Substantive where import Arhelk.Armenian.Lemma.Data.Common import Lens.Simple import Data.Monoid import TextShow -- | Склонение. Describes declension of substantives data Declension = FirstDeclension | SecondDeclension | ThirdDeclension deriving (Eq, Ord, Enum, Show, Bou...
Teaspot-Studio/arhelk-armenian
src/Arhelk/Armenian/Lemma/Data/Substantive.hs
bsd-3-clause
2,690
0
12
475
643
344
299
-1
-1
[ ("chord1_begin_fade", "sounds/mono_chord1_begin_fade.wav", (0,11)) , ("chord2_begin_fade", "sounds/mono_chord2_begin_fade.wav", (0,11)) , ("chord3_begin_fade", "sounds/mono_chord3_begin_fade.wav", (0,11)) , ("chord4_begin_fade", "sounds/mono_chord4_begin_fade.wav", (0,11)) , ("chord5_begin_fade", "sounds/mono_chor...
hanshoglund/fluent
setupFluent.hs
bsd-3-clause
1,434
0
7
94
382
253
129
-1
-1
module Hive.WebSocketServer.State ( ServerState(..) , initialServerState ) where import Mitchell.Prelude import Hive.WebSocketServer.Room data ServerState = ServerState { stateRoom :: IORef Room -- ^ The one and only game room the server contains. } initialServerState :: IO ServerState initialServerStat...
mitchellwrosen/hive
hive-websocket-server/src/Hive/WebSocketServer/State.hs
bsd-3-clause
401
0
9
72
91
50
41
12
1
-- Copyright (c) 2016-present, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. An additional grant -- of patent rights can be found in the PATENTS file in the same directory. {-# LANGUAGE Deri...
rfranek/duckling
Duckling/Duration/Types.hs
bsd-3-clause
1,302
0
12
252
257
151
106
31
0
module Opaleye.Internal.QueryArr where import Prelude hiding (id) import qualified Opaleye.Internal.Unpackspec as U import qualified Opaleye.Internal.Tag as Tag import Opaleye.Internal.Tag (Tag) import qualified Opaleye.Internal.PrimQuery as PQ import qualified Opaleye.Internal.HaskellDB.PrimQuer...
hesselink/haskell-opaleye
src/Opaleye/Internal/QueryArr.hs
bsd-3-clause
2,486
0
11
515
947
549
398
51
1
-- | See Hoffman, Gelman (2011) The No U-Turn Sampler: Adaptively Setting Path -- Lengths in Hamiltonian Monte Carlo. -- -- This code pretty much follows the notation/structure as the algo in the -- paper. {-# OPTIONS_GHC -Wall #-} {-# OPTIONS_GHC -fno-warn-type-defaults #-} {-# OPTIONS_GHC -fno-warn-missing-sig...
glutamate/probably-baysig
src/Strategy/NUTSDualAveraging.hs
bsd-3-clause
6,523
0
22
2,028
2,509
1,346
1,163
144
3
{- - Route.hs - By Steven Smith -} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} -- | 'Route' is a data type defining the hierarchy of web routes for a web -- application. -- -- A web route is a URI path to a resource. Consider the following URL: -- -- > http://www.example.com/users/103/history?qu...
stevely/DumpTruck
src/Web/DumpTruck/Route.hs
bsd-3-clause
9,583
0
15
2,289
1,550
828
722
112
3
----------------------------------------------------------------------------- -- | -- Module : Distribution.Client.Brancher -- Copyright : (c) Andrea Vezzosi 2008 -- Duncan Coutts 2011 -- John Millikin 2012 -- Rahul Muttineni 2017 -- License : BSD-l...
typelead/epm
epm/Distribution/Client/Brancher.hs
bsd-3-clause
7,738
0
19
2,070
1,823
956
867
143
4
{-# OPTIONS -Wall #-} module TuringMachine.Models.TM3 ( mach ) where import Basic.Types (Pointed(..)) import Basic.MemoryImpl import TuringMachine.State import TuringMachine.Machine -------------------------------------------------------------------------- --------------------------specilized model operations & ...
davidzhulijun/TAM
TuringMachine/Models/TM3.hs
bsd-3-clause
1,346
0
8
207
459
273
186
24
1
module Main where import qualified Test.Binary as Binary import qualified Test.Vector as Vector import Test.Tasty main = defaultMain tests tests :: TestTree tests = testGroup "Test" [binaryTrie] binaryTrie :: TestTree binaryTrie = testGroup "Binary Trie" Binary.tests vector :: TestTree vector = testGrou...
TikhonJelvis/different-tries
tests/tests.hs
bsd-3-clause
342
0
6
60
85
50
35
11
1
{-# LANGUAGE NoMonomorphismRestriction #-} module Grammar.Utils where import Control.Applicative import Control.Arrow (second) import Data.Map (Map) import qualified Data.Map as M import Data.Maybe import AST import CppToken import Grammar.Parser infixl 3 $> ($>) = flip (<$) type MParser a = Parser ParserState To...
olsner/m3
Grammar/Utils.hs
bsd-3-clause
1,837
0
12
296
665
345
320
45
1
{-# LANGUAGE FlexibleContexts, RecordWildCards, CPP #-} module AWS.EC2.Route ( createRoute , deleteRoute , replaceRoute ) where import Data.ByteString (ByteString) #if MIN_VERSION_conduit(1,1,0) import Control.Monad.Trans.Resource (MonadBaseControl, MonadResource) #else import Data.Conduit (MonadBaseCo...
IanConnolly/aws-sdk-fork
AWS/EC2/Route.hs
bsd-3-clause
2,274
0
11
427
517
281
236
59
1
{-# LANGUAGE StandaloneDeriving #-} import Control.Parallel.Foldl import Control.Applicative import Numeric.Datasets.Iris import Numeric.Datasets.BostonHousing import Numeric.Datasets import qualified Data.Map.Strict as Map irisApply :: Fold Double Double -> Fold Iris Iris irisApply f = Iris <$> premap sepalLengt...
filopodia/open
parfoldl/TestParFoldl.hs
mit
1,488
0
14
387
372
180
192
28
1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ViewPatterns #-} -- Module : Khan.Model.EC2.Image -- Copyright : (c) 2013 Brendan Hay <brendan.g.hay@gmail.com> -- License : This Source Code Form is subject to the terms of -- ...
zinfra/khan
khan/src/Khan/Model/EC2/Image.hs
mpl-2.0
2,586
0
13
704
620
327
293
50
4
{- | Module : Data.PDRS.Merge Copyright : (c) Harm Brouwer and Noortje Venhuizen License : Apache-2.0 Maintainer : me@hbrouwer.eu, n.j.venhuizen@rug.nl Stability : provisional Portability : portable The module "Data.PDRS.Merge" contains functions required for merging 'PDRS's. -} module Data.PDRS....
hbrouwer/pdrt-sandbox
src/Data/PDRS/Merge.hs
apache-2.0
7,917
0
12
2,011
2,135
1,098
1,037
93
7
{-# LANGUAGE TemplateHaskell, ScopedTypeVariables, DataKinds, TupleSections #-} {-| This module provides common definitions for equivalence unification. -} module Language.K3.TypeSystem.Simplification.EquivalenceUnification.Common ( simplifyByEquivalenceUnification , EquivocatorFunction , Equivocator(..) , TVarEqui...
DaMSL/K3
src/Language/K3/TypeSystem/Simplification/EquivalenceUnification/Common.hs
apache-2.0
7,887
0
18
1,745
1,906
1,013
893
130
2
{-# LANGUAGE BangPatterns #-} import Control.Exception import Control.Monad import Control.Monad.ST import Gauge.Main import Data.Int import Data.Word import qualified Data.Vector.Unboxed as U import qualified System.Random as R import System.Random.MWC import System.Random.MWC.Distributions import System.Random.MWC.Co...
Shimuuar/mwc-random
bench/Benchmark.hs
bsd-2-clause
4,765
0
21
1,627
1,757
912
845
81
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleContexts #-} -- | Authentication backend using HDBC module Snap.Snaplet.Auth.Backends.Hdbc where import Control.Concurrent.MVar import Control.Monad.State imp...
soenkehahn/snaplet-hdbc
src/Snap/Snaplet/Auth/Backends/Hdbc.hs
bsd-3-clause
10,469
0
22
3,247
2,555
1,373
1,182
241
3
module Bead.Domain.Entity.Assessment where import Bead.Domain.Shared.Evaluation -- | Assesment for a student, without any submission -- just an evaluation for it. data Assessment = Assessment { description :: String , evaluationCfg :: EvConfig } deriving (Eq, Show) assessment f (Assessment desc cfg) = f de...
pgj/bead
src/Bead/Domain/Entity/Assessment.hs
bsd-3-clause
365
0
8
67
87
50
37
8
1
{- # Functor, Applicative, Monad Functor: (a -> b) Applicative: f (a -> b) Monad: (a -> m b) -} ($) :: (a -> b) -> a -> b (<$>) :: Functor f => (a -> b) -> f a -> f b (<*>) :: Applicative f => f (a -> b) -> f a ->f b (>>=) :: Monad m => (a -> m b) -> m a -> m b class Functor (f :: * -> *) where fmap :: (a -> b) -> f...
idf/haskell-examples
notes/monad.hs
bsd-3-clause
940
0
12
288
503
261
242
-1
-1
{-# OPTIONS_GHC -fno-warn-orphans -fsimpl-tick-factor=500 #-} module Micro.PkgBinary (serialise, deserialise) where import Micro.Types import Data.Binary as Binary import Data.ByteString.Lazy as BS serialise :: Tree -> BS.ByteString serialise = Binary.encode deserialise :: BS.ByteString -> Tree deserialise = Binary....
arianvp/binary-serialise-cbor
bench/Micro/PkgBinary.hs
bsd-3-clause
350
0
6
44
78
47
31
10
1
----------------------------------------------------------------------------- -- | -- Module : Control.Monad.ST -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : libraries@haskell.org -- Stability : experimental -- Porta...
FranklinChen/hugs98-plus-Sep2006
packages/base/Control/Monad/ST.hs
bsd-3-clause
1,817
22
10
321
301
183
118
14
0
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE BangPatterns #-} module Network.Wai.Handler.Warp.ResponseHeader (composeHeader) where import qualified Data.ByteString as S import Data.ByteString.Internal (create) import qualified Data.CaseInsensitive as CI import Foreign.Ptr import GHC.Storable import qualified Netwo...
creichert/wai
warp/Network/Wai/Handler/Warp/ResponseHeader.hs
mit
2,447
0
13
483
846
429
417
69
1
-- Test for trac #314 {-| /* This uses up some lines The following pragmas should not be parsed */ # 23 #pragma -} module ShouldFail where type_error = "Type error on line 25":"Type error on line 25"
sdiehl/ghc
testsuite/tests/parser/should_fail/readFail048.hs
bsd-3-clause
229
0
5
67
15
10
5
2
1
module Main where import LI11718 import qualified Tarefa4_2017li1g186 as T4 import System.Environment import Text.Read main = do args <- getArgs case args of ["atualiza"] -> do str <- getContents let params = readMaybe str case params of Nothing -> ...
hpacheco/HAAP
examples/plab/svn/2017li1g186/src/RunT4.hs
mit
554
0
17
168
153
79
74
16
4
{-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE DeriveDataTypeable, GeneralizedNewtypeDeriving, DeriveFunctor #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE ViewPatterns,NoMonomorphismRestriction,TypeSynonymInsta...
atzeus/reflectionwithoutremorse
Fixed/Eff.hs
mit
5,647
0
14
1,270
1,911
989
922
-1
-1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# OPTIONS_GHC -fno-warn-deprecations #-} module Network.Wai.Handler.Warp.Request ( recvRequest , headerLines , pauseTimeoutKey , getFileInfoKey , NoKeepAliveRequest (..) ) where im...
creichert/wai
warp/Network/Wai/Handler/Warp/Request.hs
mit
11,339
0
19
3,408
2,390
1,273
1,117
214
7
module RL.Generator.Features (FeatureConfig(..), featuresGenerator) where import RL.Generator import RL.Generator.Cells (Cell(..), cmid) import RL.Generator.Paths (Path(..)) import RL.Generator.Items (generateChestItems, ItemConfig(..)) import RL.Item import RL.Map (DLevel(..), Point(..), Feature(..), Difficulty) impo...
MichaelMackus/hsrl
RL/Generator/Features.hs
mit
2,175
0
19
579
680
371
309
47
2
module BlueWire.Database where
quantifiedtran/blue-wire-backend
src/BlueWire/Database.hs
mit
31
0
3
3
6
4
2
1
0
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {- | The core data type for this example application. -} module Factory.Types.Widget where import Data.Aeson as Aeson import qualified GHC.Generics as GHC import qualified Data.Text as Text import Data.Swagger.Schema as Swagger {- | ...
alexanderkjeldaas/factory
library/Factory/Types/Widget.hs
mit
541
0
9
122
99
63
36
11
0
import Control.Monad import Data.List readNumbers :: String -> [Int] readNumbers = map read . words readPair [a, b] = (a, b) readTriple [a, b, k] = (a, b, k) comparator (r1, k1) (r2, k2) = if r1 /= r2 then r1 `compare` r2 else r2 `compare` r1 main :: IO () main = do input <- getLine let (n, m) = readPair $ r...
mgrebenets/hackerrank
alg/greedy/algorithmic-crush.hs
mit
697
0
16
167
353
188
165
18
2
module Ringo.Generator ( dimensionTableDefinitionSQL , factTableDefinitionSQL , dimensionTableDefinitionStatements , factTableDefinitionStatements , dimensionTablePopulationSQL , dimensionTablePopulationStatement , factTablePopulationSQL , factTablePopulationState...
abhin4v/ringo
ringo-core/src/Ringo/Generator.hs
mit
451
0
4
90
52
35
17
12
0
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.Blob (js_newBlob, newBlob, js_newBlob', newBlob', js_slice, slice, js_getSize, getSize, js_getType, getType, Blob, castToBlob, gTypeBlob, IsBlob, toBlob) where import Prelude ((.), (=...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/JSFFI/Generated/Blob.hs
mit
3,181
36
14
557
865
491
374
58
1
{-# LANGUAGE CPP #-} module TetrisAttack.Grid ( Grid2D, GridLocation2D, generateGrid, fromLists, getRow, gridSize, get2D, update2D, bulkUpdate2D, GridWalker(..), walkRows, walkColumns, walkColumnsRev, mapGrid, mapGridM, mapGridM_, imapGrid, imapGridM, imapGridM_, zipGrid, unzipGrid, GridUpdater(..), updateC...
Mokosha/HsTetrisAttack
TetrisAttack/Grid.hs
mit
4,999
0
14
1,017
2,318
1,189
1,129
96
7
{-# OPTIONS_GHC -Wall -fno-warn-name-shadowing #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RankNTypes #-} module Yage.Core.Application.Logging ( getAppLogger, getWinLogger , logApp, logging , debugLog, infoLog, noticeLog, warningLog, errorLog, criticalLog, alertLog, emergencyLog ...
MaxDaten/yage-core
src/Yage/Core/Application/Logging.hs
mit
5,010
0
14
1,551
1,122
617
505
82
2
module Prop where import GildedRoseProp as G main :: IO () main = G.runProps
qwaneu/gilded-rose-haskell-solution
test/Spec.hs
mit
79
0
6
16
26
16
10
4
1
-- When you do a qualified import, type constructors also have to be preceeded -- with a module name. So you'd write: -- type IntMap = Map.Map Int import qualified Data.Map as Map -- Type synonims: type PhoneNumber = String type Name = String type PhoneBook = [(Name, PhoneNumber)] -- inPhoneBook :: Name -> PhoneNumb...
adizere/nifty-tree
playground/types.hs
mit
1,884
0
11
462
374
228
146
27
3
primes = 2 : primes' where primes' = sieve [3,5..] 9 primes' sieve (x:xs) q ps@ ~(p:t) | x < q = x : sieve xs q ps | True = sieve [x | x <- xs, x `mod` p > 0] (head t^2) t -- Its massively slow, like 30 seconds, but it works sumOfPrimesLessThan2Million = sum . takeWhile (<2000000) $ p...
ciderpunx/project_euler_in_haskell
euler010.hs
gpl-2.0
365
0
12
106
155
81
74
6
1
module PlotLab.Figure where -------------------------------------------------------------------------------- -- Standard Libraries import Control.Monad (unless, when) import Data.IORef (IORef, readIORef) import Data.Maybe (fromJust, isJust) ----------...
sumitsahrawat/plot-lab
src/PlotLab/Figure.hs
gpl-2.0
3,432
0
16
914
877
438
439
67
2
{-# LANGUAGE DeriveDataTypeable #-} {-| An implementation of various limits that can be applied to arbitrary code blocks. -} module Limits (limitTime, TimeoutException(..)) where import Control.Concurrent (forkIO, killThread, myThreadId, threadDelay, throwTo) import Control.DeepSeq (deepseq, NFData (..)) import Contro...
dflemstr/monad-presentation
src/Limits.hs
gpl-3.0
2,653
0
16
600
423
237
186
37
2
{- ============================================================================ | Copyright 2011 Matthew D. Steele <mdsteele@alum.mit.edu> | | | | This file is part of Fallback. | ...
mdsteele/fallback
src/Fallback/Scenario/Compile.hs
gpl-3.0
21,398
0
17
4,823
5,805
2,987
2,818
375
1
{-# LANGUAGE NoImplicitPrelude #-} module Jumpie.Types ( OutgoingAction(..), PointReal, RectReal, LineSegmentReal, LineSegmentInt, Real, RectInt, PointInt, Keydowns, isStarCollected, ) where import Jumpie.Geometry.LineSegment (LineSegment) import Jumpie.G...
pmiddend/jumpie
lib/Jumpie/Types.hs
gpl-3.0
849
0
7
188
198
120
78
28
1
{-# LANGUAGE TemplateHaskell #-} module Lamdu.GUI.ExpressionEdit.HoleEdit.ShownResult ( PickedResult(..), pickedEventResult, pickedIdTranslations , ShownResult(..) ) where import qualified Control.Lens as Lens import qualified Data.Store.Transaction as Transaction import qualified Graphics.UI.Bottle.Widget...
da-x/lamdu
Lamdu/GUI/ExpressionEdit/HoleEdit/ShownResult.hs
gpl-3.0
769
0
14
132
176
110
66
17
0
{-# 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/URLMaps/Insert.hs
mpl-2.0
4,213
0
16
955
484
292
192
74
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/Get.hs
mpl-2.0
3,747
0
16
901
468
280
188
76
1
{-# LANGUAGE OverloadedStrings #-} module Core.Request.Content where import qualified Data.Attoparsec.ByteString.Lazy as AL import qualified Data.ByteString.Char8 as BS import qualified Data.ByteString.Lazy.Char8 as LS import qualified Misc.Parser as P import qualified Data.Map as M import qualified Core.Request.Conte...
inq/manicure
src/Core/Request/Content.hs
agpl-3.0
2,419
0
17
507
804
421
383
60
4
-- | More functions on List module ListX (stripAnyPrefix) where import Data.List(stripPrefix) -- | stripAnyPrefix A b = Just (a, c) when the first a∈A that satisfies b = -- a ++ c is found, otherwise return Nothing stripAnyPrefix :: (Eq a) => [[a]] -> [a] -> Maybe ([a], [a]) stripAnyPrefix (a:as) b | Just c <- strip...
yjwen/hada
src/ListX.hs
lgpl-3.0
413
0
10
80
138
75
63
7
1
{-# OPTIONS_GHC -fno-warn-missing-signatures #-} module MyWmii where import XMonad hiding ((|||)) import qualified XMonad.Layout.Groups as G import XMonad.Layout.Groups.Examples import XMonad.Layout.Groups.Helpers import XMonad.Layout.Layou...
duckwork/dots
xmonad/lib/MyWmii.hs
unlicense
1,987
0
14
515
371
207
164
37
1
{- | Module : Cantor.Parser.Java Copyright : Copyright (C) 2014 Krzysztof Langner License : BSD3 Maintainer : Krzysztof Langner <klangner@gmail.com> Stability : alpha Portability : portable Parser for Java sources. To parse single file use: parseFile To parse all files in given directory use: parseProject -} module ...
klangner/cantor
src/Cantor/Parser/Java.hs
bsd-2-clause
1,989
0
11
438
430
213
217
45
1
import "hint" HLint.Default import "hint" HLint.Dollar ignore "Use fewer imports" ignore "Use ."
konn/hskk
HLint.hs
bsd-3-clause
98
0
5
14
25
12
13
-1
-1
module Abstract.Impl.Libs.Counter.MVar.Dec ( module Abstract.Interfaces.Counter.Dec, mkCounter'MVar'Dec ) where import Abstract.Interfaces.Counter.Dec import qualified Abstract.Impl.Libs.Counter.MVar.Internal as MVAR (mkCounter'MVar) mkCounter'MVar'Dec t = do v <- MVAR.mkCounter'MVar t return $ counterToDec v
adarqui/Abstract-Impl-Libs
src/Abstract/Impl/Libs/Counter/MVar/Dec.hs
bsd-3-clause
318
0
9
35
77
48
29
8
1
-- -- Copyright © 2013-2014 Anchor Systems, Pty Ltd and Others -- -- The code in this file, and the program it is a part of, is -- made available to you by its authors as open source software: -- you can redistribute it and/or modify it under the terms of -- the 3-clause BSD licence. -- {-# LANGUAGE OverloadedStrings ...
anchor/sieste
src/Sieste/Util.hs
bsd-3-clause
2,979
0
14
655
819
432
387
65
2
-- | Non-crossing partitions. -- -- See eg. <http://en.wikipedia.org/wiki/Noncrossing_partition> -- -- Non-crossing partitions of the set @[1..n]@ are encoded as lists of lists -- in standard form: Entries decreasing in each block and blocks listed in increasing order of their first entries. -- For example the...
chadbrewbaker/combinat
Math/Combinat/Partitions/NonCrossing.hs
bsd-3-clause
8,253
6
26
1,752
1,570
855
715
105
6
-- | Description: Shared types and functions module Utilities where import Data.Set (Set) import qualified Data.Set as S type Nat = Int type Error = String class Variable v where newVar :: Set v -> v newtype IntVar = IntVar { unpackIntVar :: Int } deriving (Ord, Eq) instance Show IntVar where show = show...
thsutton/type-assignment
lib/Utilities.hs
bsd-3-clause
572
0
12
152
204
112
92
18
0
{-# LANGUAGE CPP , GADTs , EmptyCase , KindSignatures , DataKinds , PolyKinds , TypeOperators , ScopedTypeVariables , Rank2Types , MultiParamTypeClasses , TypeSynonymInstances , FlexibleInstances ...
zaxtax/hakaru
haskell/Language/Hakaru/Disintegrate.hs
bsd-3-clause
52,600
1
34
15,880
11,292
5,779
5,513
-1
-1
{- The number 512 is interesting because it is equal to the sum of its digits raised to some power: 5 + 1 + 2 = 8, and 83 = 512. Another example of a number with this property is 614656 = 284. We shall define an to be the nth term of this sequence and insist that a number must contain at least two digits to have a sum...
bgwines/project-euler
src/solved/problem119.hs
bsd-3-clause
1,093
4
16
220
263
152
111
28
1
-------------------------------------------------------------------------------- -- Copyright © 2011 National Institute of Aerospace / Galois, Inc. -------------------------------------------------------------------------------- {-# LANGUAGE ExistentialQuantification #-} module Copilot.Compile.C99.Test.CheckSpec (che...
leepike/copilot-c99
src/Copilot/Compile/C99/Test/CheckSpec.hs
bsd-3-clause
4,661
0
12
776
1,113
625
488
83
1
{-# LANGUAGE GADTs, FlexibleInstances, MultiParamTypeClasses #-} module Main where import QueryArrow.Config import System.Environment import Database.HDBC import Database.HDBC.PostgreSQL import Data.List main :: IO () main = do args <- getArgs ps0 <- getConfig (args !! 1) let ps = db_info (...
xu-hao/QueryArrow
QueryArrow-db-sql-hdbc-postgresql/app/PostgreSQLTest.hs
bsd-3-clause
615
0
19
127
211
102
109
17
1
{-# LANGUAGE DeriveGeneric #-} module UeContextStates ( UeContext_enb (..) , UeContext_mme (..) , UeContext_ue (..) , RrcState (..) , initialUeState , initialUeContext_enb , defaultUeContext_enb , initialUeContext_mme , defaultUeContext_mme , a...
Ilydocus/frp-prototype
src/UeContextStates.hs
bsd-3-clause
5,798
0
24
1,051
1,417
797
620
166
1
module CacheDNS.Concurrent.CondVar ( CondVar , newCondVar , wakup , wait , reset ) where import Control.Applicative ((<$>)) import Control.Concurrent.STM import Data.IORef (newIORef, readIORef, atomicModifyIORef', IORef) newtype CondVar = CondVar (TMVar Int) newCondVar :: IO CondVar newCond...
DavidAlphaFox/CacheDNS
src/CacheDNS/Concurrent/CondVar.hs
bsd-3-clause
652
0
9
138
219
118
101
21
2
{-# LANGUAGE MultiParamTypeClasses, TypeFamilies, FlexibleContexts #-} -- | Type classes to allow for XML handling functions to be generalized to -- work with different document types. module Text.XML.Expat.Internal.DocumentClass where import Text.XML.Expat.Internal.NodeClass (NodeClass) import Control.DeepSeq import ...
sol/hexpat
Text/XML/Expat/Internal/DocumentClass.hs
bsd-3-clause
4,191
0
12
1,069
1,140
576
564
67
1
-- Tower of Hanoi Solver -- Author: David Terei -- -- This program will solve the tower of hanoi problem for you. -- It can be run in two modes, one which will print out all the -- steps that need to be made for the solution and a second mode -- which doesn't print out anything, useful for benchmarking the -- algorithm...
dterei/Scraps
haskell/tower.hs
bsd-3-clause
2,231
0
15
600
754
398
356
48
5
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE BangPatterns, CPP #-} {-# LANGUAGE RecordWildCards, NamedFieldPuns #-} module Network.Wai.Handler.Warp.HTTP2.Sender (frameSender) where #if __GLASGOW_HASKELL__ < 709 import Control.Applicative #endif import Control.Concurrent (forkIO) import Control.Concurrent.STM impor...
mfine/wai
warp/Network/Wai/Handler/Warp/HTTP2/Sender.hs
mit
18,150
0
22
5,184
4,402
2,178
2,224
305
18
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE RankNTypes #-} -- TODO: Not sure about the best way to avoid the orphan instances here {-# OPTIONS_GHC -fno-warn-orphans -Wno-redundant-constraints #-} -- | H...
input-output-hk/pos-haskell-prototype
wallet/src/Cardano/Wallet/Kernel/DB/HdWallet.hs
mit
38,022
0
20
8,901
6,895
3,715
3,180
-1
-1
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 The @Inst@ type: dictionaries or method instances -} {-# LANGUAGE CPP, MultiWayIf, TupleSections #-} module Inst ( deeplySkolemise, topInstantiate, topInstantiateInferred, deeplyInstantiate, instCall...
oldmanmike/ghc
compiler/typecheck/Inst.hs
bsd-3-clause
30,943
8
17
9,465
5,612
2,933
2,679
410
7
------------------------------------------------------------------------------ {-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} module Snap.Snaplet.Session.Backends.CookieSession ( initCoo...
sopvop/snap
src/Snap/Snaplet/Session/Backends/CookieSession.hs
bsd-3-clause
8,256
24
20
2,049
1,486
803
683
113
2
{-# OPTIONS_GHC -cpp -fffi #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple.Utils -- Copyright : Isaac Jones, Simon Marlow 2003-2004 -- -- Maintainer : Isaac Jones <ijones@syntaxpolice.org> -- Stability : alpha -- Portability : portab...
alekar/hugs
packages/Cabal/Distribution/Simple/Utils.hs
bsd-3-clause
19,695
51
26
4,880
3,754
1,968
1,786
282
5
-------------------------------------------------------------------------------- -- | -- Module : Network.OpenID.Normalization -- Copyright : (c) Trevor Elliott, 2008 -- License : BSD3 -- -- Maintainer : Trevor Elliott <trevor@geekgateway.com> -- Stability : -- Portability : -- module Network.OpenID.N...
substack/hsopenid
src/Network/OpenID/Normalization.hs
bsd-3-clause
1,616
0
14
396
369
199
170
27
1
{-# LANGUAGE TypeSynonymInstances #-} {- | Module : $Header$ Description : A Haskell MathLink interface Copyright : (c) Ewaryst Schulz, DFKI Bremen 2011 License : GPLv2 or higher, see LICENSE.txt Maintainer : Ewaryst.Schulz@dfki.de Stability : experimental Portability : non-portable (see language e...
mariefarrell/Hets
Common/MathLink.hs
gpl-2.0
14,930
0
17
3,626
3,749
1,912
1,837
350
6
{-# language DeriveDataTypeable #-} module Graphics.Qt.Events ( QtEvent(..), Key(..), keyDescription, translateQtKey, modifyTextField, QKeyboardModifier(..), marshallKeyboardModifiers, ) where import Data.Map (Map, member, (!), fromList) import Data.Data import Data.Set (Set, fromList) ...
geocurnoff/nikki
src/Graphics/Qt/Events.hs
lgpl-3.0
5,909
0
10
2,038
1,749
1,077
672
257
29
module Reddit.Types.SearchOptions ( Order(..) ) where import Network.API.Builder.Query data Order = Relevance | New | Hot | Top | MostComments deriving (Show, Read, Eq) instance ToQuery Order where toQuery k t = return $ (,) k $ case t of Relevance -> "relevance"...
FranklinChen/reddit
src/Reddit/Types/SearchOptions.hs
bsd-2-clause
403
0
9
128
123
69
54
16
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} module Complex ( Type(..) , OpenComplex(..) , CloseComplex(..) , Complex(..) , closeComplex ) where import Data.ByteString as B import Data.ByteString.Short as BS import Data.Typeab...
sdiehl/ghc
testsuite/tests/simplCore/should_run/T16893/Complex.hs
bsd-3-clause
1,612
0
12
309
430
237
193
57
2
{-# LANGUAGE RankNTypes,ScopedTypeVariables #-} module HLearn.Evaluation.CrossValidation where -- import Control.Monad import Control.Monad.Random hiding (fromList) -- import Control.Monad.ST import Control.Monad.Trans (lift) import Data.Array.ST import qualified GHC.Arr as Arr import qualified Data.Foldable as F ...
mikeizbicki/HLearn
src/HLearn/Evaluation/CrossValidation.hs
bsd-3-clause
4,722
0
20
1,118
1,345
718
627
-1
-1
{-# LANGUAGE #
wxwxwwxxx/ghc
testsuite/tests/parser/should_fail/T3153.hs
bsd-3-clause
15
3
5
3
11
5
6
-1
-1
{-# htermination sequence :: [Maybe a] -> Maybe [a] #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_sequence_3.hs
mit
56
0
2
10
3
2
1
1
0
{-# htermination (toEnumRatio :: MyInt -> Ratio MyInt) #-} import qualified Prelude data MyBool = MyTrue | MyFalse data List a = Cons a (List a) | Nil data MyInt = Pos Nat | Neg Nat ; data Nat = Succ Nat | Zero ; data Ratio a = CnPc a a; fromIntMyInt :: MyInt -> MyInt fromIntMyInt x = x; intToRatio x = Cn...
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/toEnum_2.hs
mit
509
0
11
110
170
96
74
13
1
import System.Exit (exitFailure, exitSuccess) import Lib main :: IO () main = do let result = kleinberg [10,20,30,40,100,101,102,103,104,105,200] $ defOpts if result == [0,0,0,0,0,0,3,3,3,3,3,0] then exitSuccess else exitFailure
yasukun/bursts
test/Spec.hs
mit
236
0
12
35
132
79
53
7
2
{-# LANGUAGE CPP #-} {-# LANGUAGE MonadComprehensions #-} module Cabal where import Config (cProjectVersion) import Control.Applicative import Control.Lens import Control.Monad (guard) import ...
bennofs/hdevtools
src/Cabal.hs
mit
7,067
0
18
2,133
1,858
968
890
114
5
main = do line <- fmap reverse getLine putStrLn $ "You said " ++ line ++ " backwards" putStrLn $ "You said " ++ line ++ " backwards"
maxtangli/sonico
language/haskell/fmap.hs
mit
139
2
15
34
50
23
27
3
1
import Utils (isPerfectSquare) import Data.Ratio import Data.List import ContinuedFractions --import Primes --import qualified Data.List.Ordered as Ordered --factorsForX d y = primes `Ordered.minus` (Ordered.sort (factorsD ++ factorsY)) -- where factorsD = factorize d primes -- factorsY = factorize...
arekfu/project_euler
p0066/p0066.hs
mit
829
0
11
179
272
149
123
15
1
{-# htermination (>>=) :: Monad m => m a -> (a -> m b) -> m b #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_GTGTEQ__1.hs
mit
67
0
2
19
3
2
1
1
0
{-# OPTIONS_GHC -fno-warn-missing-signatures #-} {-# LANGUAGE QuasiQuotes #-} module Grammar.Greek.Morph.Smyth.Conjunctions.Subordinating where import Grammar.Greek.Morph.QuasiQuoters -- Smyth 2770 causal = [accentedWords| ὅτι διότι διόπερ ἐπεί ἐπειδή ὅτε ὁπότε ὡς |] comparative = [accentedWords| ὡς ὥσπερ καθάπερ...
ancientlanguage/haskell-analysis
greek-morph/src/Grammar/Greek/Morph/Smyth/Conjunctions/Subordinating.hs
mit
1,069
0
4
150
105
83
22
13
1
{-# LANGUAGE FlexibleContexts #-} module Sequentc (Jmt(..), Rule(..), apply, prove, derive, qed) where import Data.List import Control.Monad.State infix 4 :|-: data Jmt p = [p] :|-: p deriving (Eq) infix 3 :---: data Rule p = [Jmt p] :---: Jmt p deriving (Eq) -- if the goal rule's first precondition matches up wit...
kaeluka/sequentc
sequentc.hs
mit
1,469
0
14
339
577
303
274
34
2
module Sublist (Sublist(..), sublist) where import Data.List (isInfixOf) data Sublist = Sublist | Superlist | Equal | Unequal deriving (Eq, Show) sublist :: Eq a => [a] -> [a] -> Sublist sublist xs ys | xs == ys = Equal | xs `isInfixOf` ys = Sublist | ys `isInfixOf` xs = Superlist | otherwise ...
derekprior/exercism
haskell/sublist/Sublist.hs
mit
334
0
8
86
138
76
62
10
1
module Chess.Board where import qualified Data.Map as Map import Chess.Color import Chess.Figure import Chess.Field import Chess.Move type Board = Map.Map Field Figure -- | The board state when the game starts. startingBoard :: Board startingBoard = Map.fromList [ (Field 1 1, Figure Rook White), (Field 2 1, Figu...
grzegorzbalcerek/chess-haskell
Chess/Board.hs
mit
3,397
0
14
870
1,149
590
559
71
5
module PPOL.Sat.Solver.DP ( solve ) where import qualified PPOL.Sat.Formula as F import qualified PPOL.Sat.Clause as C import qualified PPOL.Sat.Literal as L import qualified PPOL.Sat.Variable as V solve :: (Ord a) => Formula a -> Bool
vialette/PPOL
src/PPOL/Sat/Solver/DP.hs
mit
242
2
7
41
72
49
23
8
0
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeSynonymInstances #-} module Data.Tensor.Dense (SliceTo(..) ,GTensorGD ,GMatrix ) where import Prelude import Data.Foldable (fo...
lensky/hs-tensor
lib/Data/Tensor/Dense.hs
mit
1,504
0
13
482
405
233
172
34
0
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.RGBColor (js_getRed, getRed, js_getGreen, getGreen, js_getBlue, getBlue, RGBColor, castToRGBColor, gTypeRGBColor) where import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(...
manyoo/ghcjs-dom
ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/RGBColor.hs
mit
2,058
18
10
251
549
330
219
30
1