code
stringlengths
5
1.03M
repo_name
stringlengths
5
90
path
stringlengths
4
158
license
stringclasses
15 values
size
int64
5
1.03M
n_ast_errors
int64
0
53.9k
ast_max_depth
int64
2
4.17k
n_whitespaces
int64
0
365k
n_ast_nodes
int64
3
317k
n_ast_terminals
int64
1
171k
n_ast_nonterminals
int64
1
146k
loc
int64
-1
37.3k
cycloplexity
int64
-1
1.31k
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} module DFS where import Prelude hiding (pred) import Data.List ((\\), sort) import GraphClass class (Node n, Ord n) => DFSNode n instance (Node n, Ord n) => DFSNode n dfs :: (Graph g n, DFSNode n) => (n -> Bool) -> g -> n -> [n] dfs pred gra...
shouya/thinking-dumps
graph/DFS.hs
mit
929
0
14
262
396
208
188
-1
-1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeSynonymInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module IHaskell.Display.Widgets.Selection.SelectMultiple ( -- * The SelectMultiple Widget SelectMultiple -- * Constructor , mkSelectM...
gibiansky/IHaskell
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Selection/SelectMultiple.hs
mit
2,254
0
19
494
414
230
184
46
1
{-# LANGUAGE BangPatterns, DataKinds, DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module Hadoop.Protos.YarnServerResourceManagerServiceProtos.RefreshUserToGroupsMappingsResponseProto (RefreshUserToGroupsMappingsResponseProto(..)) where import Prel...
alexbiehl/hoop
hadoop-protos/src/Hadoop/Protos/YarnServerResourceManagerServiceProtos/RefreshUserToGroupsMappingsResponseProto.hs
mit
3,338
1
16
560
554
291
263
55
0
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.PopStateEvent (js_getState, getState, PopStateEvent, castToPopStateEvent, gTypePopStateEvent) where import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, f...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/JSFFI/Generated/PopStateEvent.hs
mit
1,315
6
9
152
370
234
136
22
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeSynonymInstances #-} module IHaskell.Display.Widgets.String.TextArea ( -- * The TextArea Widget TextArea, -- * Constructor mkTextArea) where -- To keep `cabal repl` happy when running...
sumitsahrawat/IHaskell
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/String/TextArea.hs
mit
1,883
0
14
441
386
210
176
42
1
{-# htermination foldM :: (a -> b -> [] a) -> a -> [b] -> [] a #-} import Monad
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Monad_foldM_1.hs
mit
81
0
3
21
5
3
2
1
0
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedLabels #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE NoImplicitPrelude #-} {-# OPTIONS_GHC -Wall #-} -- | Common web page input elements, often with bootstrap scaffolding. module Web.Rep.Html.Input ( Input (..), InputType (..), ) where import Data.Te...
tonyday567/lucid-page
src/Web/Rep/Html/Input.hs
mit
7,932
0
22
3,280
2,059
1,056
1,003
214
0
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.DataCue (js_newDataCue, newDataCue, js_newDataCue', newDataCue', js_setData, setData, js_getData, getData, js_setValue, setValue, js_getValue, getValue, js_getType, getType, DataCue, castToD...
manyoo/ghcjs-dom
ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/DataCue.hs
mit
3,658
50
11
547
889
507
382
56
1
{-# htermination (absRatio :: Ratio 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 Ordering = LT | EQ | GT ; data Ratio a = CnPc a a; primNegInt :: MyInt -> MyInt; pr...
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/abs_1.hs
mit
2,053
0
11
432
854
460
394
58
1
{-# LANGUAGE InstanceSigs #-} module RealWorld where import Control.Applicative import Control.Monad import Control.Monad.Reader import Control.Monad.State import Control.Monad.Writer import Data.Functor import Data.Monoid import Data.M...
alokpndy/haskell-learn
src/monads/monadThree.hs
mit
6,949
0
15
2,292
2,122
1,090
1,032
141
3
module Physics.Scenes.FourBoxesTwoStatic where import Linear.Epsilon import Linear.V2 import Physics.Constraint import Physics.Contact import Physics.External import Physics.Geometry import Physics.Object import Physics.World import Physics.Scenes.Scene boxA :: (Fractional a, Eq a) => PhysicalObj a boxA = PhysicalObj...
ublubu/shapes-demo
src/Physics/Scenes/FourBoxesTwoStatic.hs
mit
2,289
0
10
723
769
425
344
54
1
module Spear.Sys.Store.ID ( ID , IDStore , emptyIDStore , newID , freeID ) where import Data.Vector.Unboxed as U import Control.Monad.State -- test import Text.Printf -- test type ID = Int data IDStore = IDStore { assigned :: Vector Bool -- ^ A bit array indicating used IDs....
jeannekamikaze/Spear
Spear/Sys/Store/ID.hs
mit
2,492
0
16
807
847
432
415
71
3
module SuperUserSpark.Check.TestUtils where import TestImport import SuperUserSpark.Bake.Gen () import SuperUserSpark.Bake.Types import SuperUserSpark.Check.Gen () import SuperUserSpark.Check.Internal import SuperUserSpark.Check.Types import SuperUserSpark.CoreTypes import SuperUserSpark.Diagnose.Types -- * Test uti...
NorfairKing/super-user-spark
test/SuperUserSpark/Check/TestUtils.hs
mit
2,802
0
18
736
661
342
319
67
5
{-# OPTIONS_GHC -fno-warn-orphans #-} module Graphics.Urho3D.Math.Color( Color(..) , rgb , rgba , HasRComp(..) , HasGComp(..) , HasBComp(..) , HasAComp(..) , colorContext ) where import qualified Language.C.Inline as C import qualified Language.C.Inline.Cpp as C import Graphics.Urho3D.Creatable ...
Teaspot-Studio/Urho3D-Haskell
src/Graphics/Urho3D/Math/Color.hs
mit
2,586
0
10
543
886
486
400
-1
-1
module Analys where import Tree import Data.List kLimited :: AttainTree -> Chip kLimited (AttainTree (Marking mark) _ subTr) = let curMax = maximum mark subTrMax = case subTr of Tree pairs -> if null pairs then Num 0 else ...
NickolayStorm/PetriNet
Analys.hs
mit
5,468
0
20
1,772
1,305
671
634
95
7
{-# LANGUAGE UnicodeSyntax #-} {-# LANGUAGE TupleSections #-} -- |CSP example for "bring items to the other shore"-type of problems: -- Items i1,...,in are on one side of the shore and there's a boat -- with limited passenger size. The aim is to transport all items -- to the other side without leaving certain confl...
ombocomp/CSP
Algorithms/SimpleCSP/Examples/Wolf.hs
mit
4,449
0
15
1,353
1,235
673
562
81
2
{-# LANGUAGE TemplateHaskell , LambdaCase , RankNTypes #-} module AppDefs where import Control.Lens import Control.Monad.Reader import Control.Monad.State import Control.Monad.Trans.Either import Control.Concurrent.STM.TQueue import qualified Graphics.UI.GLFW as GLFW import qualified Grap...
blitzcode/rust-exp
hs-src/AppDefs.hs
mit
2,210
0
14
737
406
230
176
68
1
-- import Control.Monad import Control.Exception import System.Directory (doesFileExist) import System.Environment import System.Exit import qualified Data.Text as T import qualified Data.List as List -- iff :: Bool -> a -> a -> a iff True x _ = x iff False _ y = y -- strings_join :: String -> [String] -> String str...
AoiKuiyuyou/AoikWinWhich-Haskell
src/aoikwinwhich/aoikwinwhich.hs
mit
8,400
0
32
4,655
1,301
704
597
107
1
{-# LANGUAGE BangPatterns #-} module Util.BitSet( BitSet(), EnumBitSet(..), toWord, fromWord ) where import Data.List(foldl') import Data.Bits import Data.Word import Data.Monoid import Util.SetLike import Util.HasSize newtype BitSet = BitSet Word deriving(Eq,Ord) instance Monoid BitSet wher...
dec9ue/jhc_copygc
src/Util/BitSet.hs
gpl-2.0
3,994
0
12
1,112
1,093
555
538
-1
-1
{-| A history-aware add command to help with data entry. Note: this might not be sensible, but add has some aspirations of being both user-friendly and pipeable/scriptable and for this reason informational messages are mostly written to stderr rather than stdout. -} module Hledger.Cli.Add where import Control.Exce...
Lainepress/hledger
hledger/Hledger/Cli/Add.hs
gpl-3.0
13,414
0
21
3,526
3,272
1,673
1,599
217
7
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, TypeSynonymInstances, FlexibleContexts, NoMonomorphismRestriction #-} import System.IO import System.Exit import XMonad import XMonad.Config.Gnome import XMonad.Util.Run(spawnPipe) import XMonad.Util.CustomKeys import XMonad.Util.Font import XMonad.Util.WindowPr...
algebrato/Pad39A
xmonad.hs
gpl-3.0
5,254
56
16
942
1,318
755
563
97
2
-- -- Copyright (C) 2011 Kiel Friedt -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, either version 3 of the License, or -- (at your option) any later version. -- -- ...
kielfriedt/Languages
Hw0.hs
gpl-3.0
2,397
61
11
527
683
369
314
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.FirebaseHos...
brendanhay/gogol
gogol-firebasehosting/gen/Network/Google/FirebaseHosting/Types/Product.hs
mpl-2.0
13,292
0
15
2,879
2,058
1,195
863
222
1
{-# LANGUAGE TypeFamilies, GADTs, ExistentialQuantification, EmptyDataDecls, ScopedTypeVariables, FlexibleInstances #-} module HEP.Jet.FastJet.AddOn where
wavewave/HFastJet
oldsrc/HEP/Jet/FastJet/AddOn.hs
lgpl-2.1
157
0
3
14
9
7
2
2
0
addStuff :: Int -> Int addStuff = do a <- (*2) b <- (+10) return (a+b) addStuff1 = (*2) >>= \a -> (+10) >>= \b -> return (a+b) {- (*2) >>= \a -> (+10) >>= \b -> return (a+b) == \w -> (\a -> (+10) >>= \b -> return (a+b)) (w*2) w == \w -> ((+10) >>= \b -> return (w*2+b)) w == \w -> (\w'...
egaburov/funstuff
Haskell/monads/monad1.hs
apache-2.0
1,029
0
11
321
98
57
41
6
1
data List a = Nil | Cons a (List a) len xs = len' 0 xs len' acc xs = case xs of Nil -> acc Cons _ t -> len' (acc+1) t safe queen diag xs = case xs of Nil -> True Cons q t -> queen /= q && queen /= q + diag && queen /= q - diag && safe queen (diag + 1) t appendSafe k...
lpeterse/koka
test/medium/nqueens.hs
apache-2.0
874
2
15
323
382
189
193
29
3
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE BangPatterns #-} module Haskell.Decode.Operations where import Data.Int (Int32,Int16) import qualified Prelude as P import Prelude hiding (Num(..),Ord(..)) import Data.Monoid (Monoid(..),(<>)) type famil...
ku-fpg/ldpc
src/LDPC/Decode/Operations.hs
bsd-2-clause
4,590
0
12
1,320
1,866
1,000
866
121
2
module CLasH.Utils.Pretty (prettyShow, pprString, pprStringDebug, zEncodeString) where -- Standard imports import qualified Data.Map as Map import Text.PrettyPrint.HughesPJClass import Data.Char import Numeric -- GHC API import qualified CoreSyn import Outputable ( showSDoc, showSDocDebug, ppr, Outputable, Outputable...
christiaanb/clash
clash/CLasH/Utils/Pretty.hs
bsd-3-clause
5,175
0
17
1,542
1,504
788
716
105
4
{-# LANGUAGE RankNTypes, ScopedTypeVariables, GADTs, EmptyDataDecls, PatternGuards, TypeFamilies, MultiParamTypeClasses #-} module Compiler.Hoopl.Dataflow ( DataflowLattice(..), JoinFun, OldFact(..), NewFact(..), Fact, mkFactBase , ChangeFlag(..), changeIf , FwdPass(..), FwdTransfer, mkFTransfer, mkFTransfer3, g...
ezyang/hoopl
src/Compiler/Hoopl/Dataflow.hs
bsd-3-clause
36,430
137
35
11,096
10,193
5,347
4,846
471
13
-- 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 OverloadedStrings #-} module Duckling.Distance.FR.Corpus ( corpus ) where import Prelude import ...
facebookincubator/duckling
Duckling/Distance/FR/Corpus.hs
bsd-3-clause
1,102
0
9
365
210
124
86
29
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/Volume/Types.hs
bsd-3-clause
1,557
0
10
296
365
211
154
41
0
module Lib ( paletteThem ) where import Codec.Picture import System.Directory import Control.Monad import Data.List import qualified Data.ByteString.Lazy as B import System.Info dirSep :: String dirSep = if os == "linux" then "/" else "\\" isImage :: FilePath -> Bool isImage p = any (`isSuffixOf` p) formats ...
CharlesHD/Palettize
src/Lib.hs
bsd-3-clause
3,099
0
17
1,034
1,052
529
523
61
2
{-# LANGUAGE DeriveFunctor, DeriveFoldable, DeriveTraversable #-} module Distribution.Solver.Modular.Tree ( FailReason(..) , POption(..) , Tree(..) , TreeF(..) , Weight , ana , cata , dchoices , inn , innM , para , trav , zeroOrOneChoices ) where import Control.M...
sopvop/cabal
cabal-install/Distribution/Solver/Modular/Tree.hs
bsd-3-clause
7,333
0
11
2,025
1,830
983
847
113
1
{-# LANGUAGE RecordWildCards #-} module Main where import Control.Monad import Pipes import Pipes.Serial import Data.Serialize import qualified Data.ByteString.Char8 as B import qualified HXStream.Native as HX import qualified Pipes.Prelude as P import LDrive.Types.Adc import LDrive.Types.Encoder import LDrive.Types...
sorki/odrive
client/app/Main.hs
bsd-3-clause
5,189
0
19
1,383
2,147
1,103
1,044
142
9
triple x = tripleItYo x where tripleItYo :: Integer -> Integer tripleItYo y = y * 3
dhaneshkk/haskell-programming
localType.hs
bsd-3-clause
94
2
5
27
36
17
19
3
1
{-# LANGUAGE OverloadedStrings #-} module Filesystem ( isXmlFile , isDotFile , isDirectory , isRegularFile , isSymbolicLink , isBlockDevice , isCharacterDevice , isNamedPipe ,...
dxtr/hagento
src/Filesystem.hs
bsd-3-clause
2,695
0
14
646
727
373
354
66
2
{-# LANGUAGE TypeOperators #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE NoMonoPatBinds #-} import Types import Data.Iso import Language.JsonGrammar import Prelude hiding (id, (.), head, either) import Control.Category import Data.Aeson (Object) import Test.Framework (Test, defaultMain) import Test.Framework.Pr...
MedeaMelana/JsonGrammar
tests/Tests.hs
bsd-3-clause
1,130
0
12
226
361
191
170
-1
-1
{-# LANGUAGE BangPatterns , RankNTypes, GADTs, DataKinds #-} module Numerical.HBLAS.BLAS.Internal.Level1( AsumFun ,AxpyFun ,CopyFun ,NoScalarDotFun ,ScalarDotFun ,ComplexDotFun ,Nrm2Fun ,RotFun ,RotgFun ,RotmFun ,RotmgFun ,ScalFun ,SwapFun ,IamaxFun --,IaminFun ,asumAbstraction ,axpy...
yangjueji/hblas
src/Numerical/HBLAS/BLAS/Internal/Level1.hs
bsd-3-clause
15,741
0
26
3,383
4,557
2,292
2,265
271
2
import Data.ByteString (ByteString) import Control.Monad (replicateM) import Data.List (unfoldr) -- From the 'entropy' package - for non-determinstic random bits. -- These values come from -- - RDRAND (when on an x86-64 system with said instruction and using new enough compilers) -- - /dev/urandom (when on a nix...
GaloisInc/hacrypto
src/Haskell/rand.hs
bsd-3-clause
1,219
0
17
317
235
135
100
16
2
-------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.ARB.TextureStorageMultisample -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : portable -- ----...
haskell-opengl/OpenGLRaw
src/Graphics/GL/ARB/TextureStorageMultisample.hs
bsd-3-clause
700
0
4
89
47
36
11
7
0
module ErrMsg ( LogReader , setLogger , handleErrMsg ) where import Bag import Control.Applicative import Data.IORef import Data.Maybe import DynFlags import ErrUtils import GHC import qualified Gap import HscTypes import Outputable ---------------------------------------------------------------- type LogR...
johntyree/ghc-mod
ErrMsg.hs
bsd-3-clause
1,919
0
15
359
571
299
272
43
2
{- EEL -- Extensible Experimental Language by Lukáš Kuklínek, 2013 -} module Main.REPL(repl) where import Parser.Parser import Parser.State import Parser.Dump import Parser.Core import Sema.Term import Sema.Infer import Backend.Emit import System.IO import Control.Applicative import Text.Parsec import Data....
iljakuklic/eel-proto
src/Main/REPL.hs
bsd-3-clause
3,935
0
26
1,431
1,118
542
576
87
23
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeApplications #-} module RoundTripSpec (spec) where import Test.Hspec import Bound import Data.Aeson import Data.Default import Data.Map.Strict (fromList) import qualified Data.HashSet as HS import qualified Data.Vector as V import Pact.Types.RowData import Pact.Ty...
kadena-io/pact
tests/RoundTripSpec.hs
bsd-3-clause
4,328
0
20
937
1,558
812
746
96
3
main = putStrLn "Dummy fixpoint.native"
gridaphobe/liquid-fixpoint
src/Ocaml.hs
bsd-3-clause
40
0
5
5
9
4
5
1
1
module Main where import Trombone.Server main :: IO () main = runWithArgs
johanneshilden/principle
Main.hs
bsd-3-clause
77
0
6
15
24
14
10
4
1
module Foundation where import Prelude import Yesod import Yesod.Static import Yesod.Auth import Yesod.Auth.BrowserId import Yesod.Default.Config import Yesod.Default.Util (addStaticContentExternal) import Network.HTTP.Client.Conduit (Manager, HasHttpManager (getHttpManager)) import qualified Settings import Settings....
Laquendi/memopad
Foundation.hs
mit
6,292
0
18
1,413
924
504
420
-1
-1
{-# LANGUAGE TemplateHaskell #-} module Number.Base.Data where import Autolib.ToDoc import Autolib.Reporter import Autolib.Reader import Data.Typeable import Number.Wert import Data.Char data Ziffer = Ziffer Int deriving ( Eq, Ord, Typeable ) zehn :: Int zehn = 10 instance ToDoc Ziffer where toDoc (Ziffer...
florianpilz/autotool
src/Number/Base/Data.hs
gpl-2.0
2,067
0
22
712
656
330
326
-1
-1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeSynonymInstances #-} module GrLang.CompilerSpec where import Control.Arrow ((&&&)) import Control.Monad import Control.Monad.Except ...
rodrigo-machado/verigraph
tests/GrLang/CompilerSpec.hs
gpl-3.0
25,305
59
29
8,090
7,977
4,142
3,835
515
4
{-# 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-rds/gen/Network/AWS/RDS/AddSourceIdentifierToSubscription.hs
mpl-2.0
6,032
0
13
1,111
638
388
250
84
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-missing-fields #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -------------------...
sinjar666/fbthrift
thrift/compiler/test/fixtures/qualified/gen-hs/Module2_Types.hs
apache-2.0
7,963
0
18
1,208
2,373
1,340
1,033
126
3
{-# LANGUAGE TemplateHaskell, RankNTypes, FlexibleContexts #-} {-| Pure functions for manipulating reservations of temporary objects NOTE: Reservations aren't released specifically, they're just all released at the end of a job. This could be improved in the future. -} {- Copyright (C) 2014 Google Inc. All rights ...
mbakke/ganeti
src/Ganeti/WConfd/TempRes.hs
bsd-2-clause
19,053
112
15
4,135
4,556
2,440
2,116
-1
-1
{-# LANGUAGE BangPatterns #-} -------------------------------------------------------------------------------- -- | -- Module : Foreign.CUDA.Analysis.Occupancy -- Copyright : [2009..2014] Trevor L. McDonell -- License : BSD -- -- Occupancy calculations for CUDA kernels -- -- <http://developer.download.nvidia.com/c...
mwu-tow/cuda
Foreign/CUDA/Analysis/Occupancy.hs
bsd-3-clause
8,068
0
15
1,730
1,222
693
529
90
2
{- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section[RnBinds]{Renaming and dependency analysis of bindings} This module does renaming and dependency analysis on value bindings in the abstract syntax. It does {\em not} do cycle-checks on class or type-synonym declarations; those cannot be done at thi...
pparkkin/eta
compiler/ETA/Rename/RnBinds.hs
bsd-3-clause
47,418
0
23
14,084
9,358
4,949
4,409
562
20
----------------------------------------------------------------------------- -- | -- Module : Plugins.Monitors.Disk -- Copyright : (c) 2010, 2011, 2012 Jose A Ortega Ruiz -- License : BSD-style (see LICENSE) -- -- Maintainer : Jose A Ortega Ruiz <jao@gnu.org> -- Stability : unstable -- Portability :...
tsiliakis/xmobar
src/Plugins/Monitors/Disk.hs
bsd-3-clause
6,056
0
16
1,463
2,531
1,349
1,182
135
4
module Shift.Period where import Shift.Type import Shift.Computer import Shift.Repeater import Data.List ( group, inits, tails ) import Control.Monad ( guard ) ps k = [ 2*k, 3*k, 5*k+1, 7*k+1 ] lift :: [ Int ] -> [ Bool ] lift [] = [] lift ( neg : pos : rest ) = replicate neg False ++ replicate pos True ++ lift...
Erdwolf/autotool-bonn
src/Shift/Period.hs
gpl-2.0
1,063
3
15
358
674
369
305
32
3
{-------------------------------------------------------------------------------- Copyright (c) Daan Leijen 2004 wxWindows License. Demonstration of making a custom color box control in wxHaskell that behaves just like any other widget. ------------------------------------------------------------------------------...
ekmett/wxHaskell
samples/wx/CustomControl.hs
lgpl-2.1
2,219
0
14
589
452
227
225
33
2
module Core.Prelude where import Core.Data import Core.Syntax import Utilities lam :: Var -> Term -> Term lam = lambda int :: Integer -> Term int = literal . Int char :: Char -> Term char = literal . Char add :: Term -> Term -> Term add e1 e2 = primOp Add [e1, e2] nilDataCon, consDataCon :: DataCon nilDataCon...
batterseapower/chsc
Core/Prelude.hs
bsd-3-clause
1,525
0
10
307
596
325
271
52
2
{-# language TypeInType, ScopedTypeVariables #-} module Silly where import Type.Reflection (Typeable, typeRep, TypeRep) import Type.Reflection.Unsafe (mkTrApp) import GHC.Exts (TYPE, RuntimeRep (..)) import Data.Kind (Type) mkTrFun :: forall (r1 :: RuntimeRep) (r2 :: RuntimeRep) (a :: TYPE r1) (b :: ...
sdiehl/ghc
testsuite/tests/typecheck/should_fail/T16627.hs
bsd-3-clause
562
1
12
109
158
95
63
-1
-1
{-# LANGUAGE RankNTypes #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE FlexibleContexts #-} module OpenCog.Lojban.Syntax.Util where import Prelude hiding (id,(.),(<*>),(<$>),(*>),(<*),foldl) import Data.List.Split (splitOn) import Data.List (intercalate,find,delete) import Data.Char (chr,isLetter,isDigit) imp...
ngeiswei/opencog
opencog/nlp/lojban/HaskellLib/src/OpenCog/Lojban/Syntax/Util.hs
agpl-3.0
11,755
0
14
3,418
4,814
2,446
2,368
-1
-1
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="ko-KR"> <title>FuzzDB Files</title> <maps> <homeID>fuzzdb</homeID> <mapref location="ma...
thc202/zap-extensions
addOns/fuzzdb/src/main/javahelp/help_ko_KR/helpset_ko_KR.hs
apache-2.0
960
77
66
156
407
206
201
-1
-1
-- Check that the record selector for maskMB unfolds in the body of f -- At one stage it didn't because the implicit unfolding looked too big -- #2581 module ShouldCompile where import Data.Array.Base data MBloom s a = MB { shiftMB :: {-# UNPACK #-} !Int , maskMB :: {-# UNPACK #-} !Int , bitArrayMB :: {...
sdiehl/ghc
testsuite/tests/eyeball/record1.hs
bsd-3-clause
444
0
11
128
99
57
42
9
2
{-# LANGUAGE BangPatterns, GeneralizedNewtypeDeriving #-} module Distribution.Server.Features.Search.TermBag ( TermId, TermBag, size, fromList, elems, termCount, ) where import Distribution.Server.Framework.MemSize import qualified Data.Vector.Unboxed as Vec import qualified Data.Map as Map ...
mpickering/hackage-server
Distribution/Server/Features/Search/TermBag.hs
bsd-3-clause
2,174
0
15
558
695
371
324
60
3
{-# LANGUAGE GADTs #-} {-# LANGUAGE ConstraintKinds #-} -- | Facilities for changing the lore of some fragment, with no context. module Futhark.Analysis.Rephrase ( rephraseProg , rephraseFunDef , rephraseExp , rephraseBody , rephraseStm , rephraseLambda , rephraseExtLamb...
ihc/futhark
src/Futhark/Analysis/Rephrase.hs
isc
4,856
0
12
1,268
1,481
733
748
96
1
class Foo a where foo :: Int -> a data Emp = Emp String Int deriving (Eq, Show) data Tmp = Tmp String Int deriving (Eq, Show) instance Foo Emp where foo x = Emp "Permanent" x instance Foo Tmp where foo x = Tmp "Temporary" x test x y = if x == y then True e...
gitrookie/functionalcode
code/Haskell/retpoly.hs
mit
472
0
7
168
181
96
85
19
2
{-# OPTIONS -Wall #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TupleSections #-} import qualified Data.List as List import qualified Data.Map.Strict as Map import qualified Data.Maybe as Maybe import Data.Text (Text) import Helpers.Graph (Graph) import qualified Helpers.Graph as Graph import Helpers.Parse imp...
SamirTalwar/advent-of-code
2021/AOC_14_1.hs
mit
1,226
0
15
244
440
230
210
35
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE LambdaCase #-} module ProducerExample where import Control.Concurrent.MVar (newEmptyMVar, putMVar, takeMVar) import Control.Exception (bracket) import Control.Monad (forM_) import Control.Monad.IO.Class (MonadIO(..)) import Data.ByteString (Byte...
haskell-works/kafka-client
example/ProducerExample.hs
mit
3,229
0
17
862
728
369
359
64
4
module Main where import Test.QuickCheck import Test.QuickCheck.Gen (oneof) -- Trivial data Trivial = Trivial deriving (Eq, Show) trivialGen :: Gen Trivial trivialGen = return Trivial instance Arbitrary Trivial where arbitrary = trivialGen -- Identity data Identity a = Identity a deriving (Eq, Show) ins...
raventid/coursera_learning
haskell/chapter14/kicking-around-quickcheck/app/Main.hs
mit
1,802
0
11
490
585
307
278
64
1
{- Inductive program synthesis : Agent training Author: Abdul Rahim Nizamani, ITIT, Gothenburg University, Sweden Started: 2013-09-29 Updated: 2013-09-29 -} {-# LANGUAGE DataKinds #-} module Main where import System.Environment (getArgs, getProgName) import Niz import Parsing import Data.Char import I...
arnizamani/occam
occam.hs
mit
22,531
27
23
7,345
6,981
3,591
3,390
-1
-1
{-# LANGUAGE TypeFamilies, GADTs, CPP #-} module Database.Selda.Selectors ( Assignment ((:=)), Selector, Coalesce , (!), (?), with, ($=) , selectorIndex, unsafeSelector ) where import Database.Selda.SqlRow (SqlRow) import Database.Selda.SqlType import Database.Selda.Column import Data.List (foldl') import Unsaf...
valderman/selda
selda/src/Database/Selda/Selectors.hs
mit
2,813
0
14
650
808
432
376
45
3
{-# LANGUAGE DeriveDataTypeable, CPP #-} import GetURL import TimeIt import Data.Either import Control.Monad import System.IO import Control.Concurrent hiding(forkFinally) import Control.Exception import Text.Printf import qualified Data.ByteString as B import Data.Typeable import Prelude hiding (catch) ...
Forec/learn
2017.3/Parallel Haskell/ch10/geturlscancel2.hs
mit
1,569
0
16
387
582
286
296
49
2
module Glucose.Lexer.Location where import Data.Char import Glucose.Lexer.Char data Location = Location { codePoint, line, column :: Int } deriving (Eq, Ord) instance Show Location where show (Location cp line col) = show line ++ ":" ++ show col ++ "@" ++ show cp instance Read Location where readsPre...
sardonicpresence/glucose
src/Glucose/Lexer/Location.hs
mit
1,364
0
11
359
579
301
278
26
1
module PayPal.Identity ( createIdentity , getIdentity ) where createIdentity = undefined getIdentity = undefined
AndrewRademacher/hs-paypal-rest
src/PayPal/Identity.hs
mit
127
0
4
28
24
15
9
5
1
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE RecursiveDo #-} {-# LANGUAGE RecordWildCards #-} module W...
achirkin/qua-view
src/Widgets/Tabs/Reviews.hs
mit
12,801
10
23
4,106
3,247
1,590
1,657
252
6
{-# LANGUAGE OverloadedStrings #-} module IRTS.CodegenGo (codegenGo) where import Control.Monad.Trans.State.Strict (State, evalState, gets) import Data.Char (isAlphaNum, ord) import Data.Int (Int64) import qualified Data.Map.Strict ...
Trundle/idris-go
src/IRTS/CodegenGo.hs
mit
32,179
0
19
9,664
9,873
5,186
4,687
786
25
-- The solution of exercise 1.23 -- The `smallest-divisor` procedure shown at the start of this section does -- lots of needless testing: After it checks to see if the number is -- divisible by 2 there is no point in checking to see if it is divisible -- by any larger even numbers. This suggests that the values used fo...
perryleo/sicp
ch1/sicpc1e23.hs
mit
4,498
0
17
1,090
776
402
374
61
2
{-# LANGUAGE NoImplicitPrelude #-} module Compiler.IO (unsafeInterleaveIO, unsafePerformIO) where import Compiler.Base -- for seq, IO = IOActionX, LazyIO, IOAndPass, MFIX, IOReturn import Data.Tuple -- for snd -- See Control.Monad.State -- drat -- my implementation of IO assumes that the s...
bredelings/BAli-Phy
haskell/Compiler/IO.hs
gpl-2.0
761
0
11
144
218
110
108
12
1
{-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE OverloadedStrings #-} module Main where import Data.Char (isSpace) import Control.DeepSeq import Criterion.Main import qualified Criterion.Main as C import Data.Text (unlines, Text, replicate) import Prelude hiding (un...
siddhanathan/yi-rope
bench/MainBenchmarkSuite.hs
gpl-2.0
6,077
0
15
1,254
2,057
1,110
947
140
1
-- Parse module -- By Gregory W. Schwartz -- Collects all functions pertaining to the parsing of strings to data -- structures {-# LANGUAGE OverloadedStrings #-} module Parse where -- | Built-in import Data.List import Data.Maybe -- | Cabal import qualified Data.Text.Lazy as T -- | Local import Types -- | Parse ...
GregorySchwartz/csv-to-fasta
src/Parse.hs
gpl-2.0
4,119
0
18
2,312
789
412
377
90
5
{-# LANGUAGE NoImplicitPrelude, OverloadedStrings #-} module Lamdu.GUI.ExpressionEdit.NomEdit ( makeFromNom, makeToNom ) where import Prelude.Compat import Control.Lens.Operators import Control.Lens.Tuple import Control.MonadA (MonadA) import Data.Store.Transa...
rvion/lamdu
Lamdu/GUI/ExpressionEdit/NomEdit.hs
gpl-3.0
3,316
0
15
780
913
484
429
-1
-1
module Mapgen.CampusArgs where -- todo: It's gonna be fun splitting stuff up once I actually decide to add another mapgen... data CampusArgs = CampusArgs { numOutsidePaths :: Int, numCrossingCorridors :: Int, numCorridors :: Int, randomConnectionChance :: Double, randomOutsideConnectionC...
arirahikkala/straylight-divergence
src/Mapgen/CampusArgs.hs
gpl-3.0
338
0
8
73
46
30
16
7
0
module Chapter15_monoids where import Test.QuickCheck hiding (Failure, Success) import Data.Monoid import qualified Data.Semigroup as S import Data.Semigroup (Semigroup) data Optional a = Nada | Only a deriving (Eq, Show) instance Monoid a => Monoid (Optional a) where mempty = Nada mappend Nada o@(Only a) ...
maruks/haskell-book
src/Chapter15_monoids.hs
gpl-3.0
7,799
0
11
1,750
3,359
1,722
1,637
170
1
module Lexer where -- -- the lexer for my new language -- import ApplicativeParsec import qualified Text.ParserCombinators.Parsec.Token as P import Types languageDef = P.LanguageDef { P.commentStart = "{-" , P.commentEnd = "-}" , P.commentLine = "--" , P.nestedComments = True , ...
Jem777/deepthought
src/Lexer.hs
gpl-3.0
2,563
0
10
766
767
425
342
66
1
module LevelSpec(main, spec) where import Test.Hspec import Level import Renderable import TestHelper main :: IO () main = hspec spec spec :: Spec spec = describe "A Level" $ do let levelString = unlines [ "###" , " ##" , "m #" ] level = createLevel levelString at' c =...
svenkeidel/gnome-citadel
test/LevelSpec.hs
gpl-3.0
662
0
15
185
265
140
125
23
1
{-# LANGUAGE OverloadedStrings #-} module Greg.Commands.Default (defaultCommands, success, failure) where import System.Random (randomRIO) import System.Process (createProcess, proc, CreateProcess (std_out), StdStream (..)) import Control.Concurrent (readMVar, modifyMVar_) import qualified Data.Text.IO...
mikeplus64/Greg
src/Greg/Commands/Default.hs
gpl-3.0
6,443
0
22
2,240
2,137
1,168
969
156
4
{-# LANGUAGE OverloadedStrings #-} -- Type : module -- Crée le: 17 Fév. 2013 à 16h46 -- Auteur : Sarfraz Kapasi -- License: GPLv3 module MSendT ( Provider (..) , Auth (..) , Cred (..) , emptyAuth , emptyCred , gmail , mimeMsg , emailT ) where import Network import Network.TLS import Network.TLS.Extra impor...
neliel/MSendT
MsendT.hs
gpl-3.0
5,002
0
34
1,185
1,753
905
848
128
2
-- This file is part of seismic_acc_no_up. -- -- seismic_acc_no_up 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. -- -- seism...
agremm/Seismic
accelerate/imaginary_gpu_update/Main.hs
gpl-3.0
1,528
0
12
319
281
145
136
24
2
#!/usr/bin/env stack {- stack runghc --verbosity info --package aeson --package bytestring --package conduit --package http-conduit --package resourcet --package text -} {- gist.hs - a command-line client for gist.github.com that works. (c) 2012-2017 Simon Michael <simon@joyful.com> -} {-# LANGUAGE Overlo...
simonmichael/gist
gist.hs
gpl-3.0
2,094
0
18
488
512
273
239
47
3
{-# LANGUAGE RankNTypes #-} module Diaspec.Backend.PrintDiaspec where {- - This module is intended to handle pretty printing of - Diaspec code. Using the compiler using this backend - should be like a linter. -} -- Copyright 2015 © Paul van der Walt <paul.vanderwalt@inria.fr> import UU.Pretty hiding (pp) import...
toothbrush/diaspec
src/Diaspec/Backend/PrintDiaspec.hs
gpl-3.0
1,538
0
14
413
354
188
166
22
1
{-# LANGUAGE OverloadedStrings #-} module Web.Crew.Templates.Helpers where import Text.Blaze.Html5 as H import Text.Blaze.Html5.Attributes as A headWithTitle :: H.Markup -> Html headWithTitle t = H.head $ do meta ! charset "utf-8" meta ! name "viewport" ! content "width=device-width, initial-scale=1.0" me...
schell/scottys-crew
Web/Crew/Templates/Helpers.hs
gpl-3.0
738
0
10
128
164
80
84
14
1
module QFeldspar.ErrorMonad(ErrM(..),frmRgt) where import Prelude (Monad(..),String,Eq,Show,Functor,error) import Control.Applicative (Applicative(..)) import Data.Foldable (Foldable) import Data.Traversable (Traversable) data ErrM t = Rgt t | Lft String deriving instance Eq t => Eq (ErrM t) deriving...
shayan-najd/QFeldspar
QFeldspar/ErrorMonad.hs
gpl-3.0
774
0
10
205
311
162
149
-1
-1
{-# LANGUAGE FlexibleContexts #-} -------------------------------------------------------------------------------- -- | -- Module : Web.Model -- Copyright : (C) 2014 Yorick Laupa -- License : (see the file LICENSE) -- -- Maintainer : Yorick Laupa <yo.eight@gmail.com> -- Stability : provisional -- Portability : non-port...
YoEight/personal-site
Web/Model.hs
gpl-3.0
2,346
0
9
315
451
242
209
32
2
import Test.QuickCheck import Test.QuickCheck.Checkers import Test.QuickCheck.Classes import ListApplicative import Validation import ChapterExercises main :: IO() main = do quickBatch $ functor (undefined :: List (String, Char, Integer)) quickBatch $ applicative (undefined :: List (String, Char, Integer)) ...
nirvinm/Solving-Exercises-in-Haskell-Programming-From-First-Principles
Applicative/test/Spec.hs
gpl-3.0
1,218
0
11
211
454
245
209
22
1
-- Martelli and Montanari 1976 unification Algorithm A -- I call it Unification Transform because it transforms -- a first order term equations set (FOTEset) into its solved form -- 23 Jun 2015 V 1 module MMAlgoA ( unificationTransform, eliminatableVariablesExist, isInSolvedFo...
YueLiPicasso/unification
MMAlgoA.hs
gpl-3.0
9,961
0
12
2,717
1,626
879
747
105
1
{-# LANGUAGE CPP #-} {-| Print some statistics for the journal. -} module Hledger.Cli.Stats where import Data.List import Data.Maybe import Data.Ord import Data.Time.Calendar import Text.Printf import qualified Data.Map as Map import Hledger.Cli.Options import Hledger.Data import Prelude hiding (putStr) import Hled...
trygvis/hledger
hledger/Hledger/Cli/Stats.hs
gpl-3.0
3,888
0
15
1,221
1,111
571
540
66
4
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Firewall/IngressRules/Get.hs
mpl-2.0
5,719
0
19
1,272
790
461
329
120
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Openshift.V1.ImageStreamImage where import GHC.Generics import Data.Text import Kubernetes.V1.ObjectMeta import Openshift.V1.Image import quali...
minhdoboi/deprecated-openshift-haskell-api
openshift/lib/Openshift/V1/ImageStreamImage.hs
apache-2.0
1,233
0
9
178
122
75
47
19
0
{- Copyright 2020 The CodeWorld Authors. All rights reserved. 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 applicab...
google/codeworld
codeworld-prediction/src/CodeWorld/Prediction.hs
apache-2.0
8,940
0
14
1,922
2,079
1,092
987
152
1
import Data.Char import Data.List import qualified Data.Vector.Unboxed as U insert_word :: [[Char]] -> [Char] -> [[Char]] insert_word (a:tail) word | a==word = [(a)] ++ tail | otherwise = [(a)] ++ insert_word tail word insert_word _ w = [(w)] find_word :: [[Char]] -> [Char] -> Bool find_word (a:tail) word | a==...
rybycy/HaskellStringSimilarity
projekt_extended.hs
apache-2.0
5,465
56
17
918
1,780
915
865
96
3
{-# LANGUAGE CPP #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# ...
Javran/twitter-conduit
Web/Twitter/Conduit/Request/Internal.hs
bsd-2-clause
3,530
1
14
735
1,060
590
470
-1
-1
{-# LANGUAGE DeriveGeneric, DeriveDataTypeable, GeneralizedNewtypeDeriving #-} -- | Handling project configuration, types. -- module Distribution.Client.ProjectConfig.Types ( -- * Types for project config ProjectConfig(..), ProjectConfigBuildOnly(..), ProjectConfigShared(..), PackageConfig(..), ...
sopvop/cabal
cabal-install/Distribution/Client/ProjectConfig/Types.hs
bsd-3-clause
16,126
0
14
4,155
2,047
1,252
795
216
0