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
{- Copyright 2016, Dominic Orchard, Andrew Rice, Mistral Contrastin, Matthew Danish 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 ...
mrd/camfort
src/Camfort/Specification/Stencils/Model.hs
apache-2.0
14,669
0
24
4,122
3,974
2,043
1,931
264
9
module Main where import Control.Concurrent (threadDelay) import Control.Lens import System.Exit (exitWith, ExitCode(..)) import X import Graphics import MenuConf strs = ["räksmörgåßαr", "hello, world!", "conjure me", "and more"] main :: IO () main = -- withXConf sets up the necessary basic X configuratio...
kqr/hmenu
Main.hs
bsd-2-clause
667
0
12
141
215
115
100
-1
-1
-- http://www.codewars.com/kata/5520714decb43308ea000083 module Codewars.Kata.NthRoot where root :: Double -> Double -> Double root x n = exp $ log x / n
Bodigrim/katas
src/haskell/B-Nth-Root-of-a-Number.hs
bsd-2-clause
154
0
7
22
42
23
19
3
1
module Substitution where import Syntax import Control.Arrow (first, second) import qualified Data.Map as M import qualified Data.Set as S type InScopeSet = (S.Set Var, S.Set CoVar) emptyInScopeSet :: InScopeSet emptyInScopeSet = (S.empty, S.empty) varInInScopeSet :: InScopeSet -> Var -> Bool varInInScopeSet = ...
batterseapower/dual-calculus
Substitution.hs
bsd-3-clause
3,693
2
19
844
1,519
782
737
76
7
module Dir.Reuse(reused) where import Dir.Reexport import Dir.TypesOnly import Foo.Used() reused = (0 :: Word8) `seq` Ctor1 1 1
ndmitchell/weeder
test/foo/src/Dir/Reuse.hs
bsd-3-clause
131
0
6
21
51
31
20
5
1
module Main where import ShakespeareTrie main :: IO () main = someFunc
krisajenkins/Shakespeare-Trie
app/Main.hs
bsd-3-clause
73
0
6
14
22
13
9
4
1
import Lib import Test as T testEq :: Value -> Value -> Result testEq input expected = T.test (show input) ((\(Prog value _) -> value ) (eval (Prog input defaultContext)) == expected) main :: IO () main = T.runTests [ testEq (Var "I") (Lambda "x" (Var "x")) , testEq (Var "K") (Lambda "x" (Lambda "y" (Var "x"))...
sleexyz/untyped
test/Spec.hs
bsd-3-clause
506
0
15
106
295
150
145
10
1
{-# LANGUAGE CPP, NondecreasingIndentation, ScopedTypeVariables #-} -- ----------------------------------------------------------------------------- -- -- (c) The University of Glasgow, 2005-2012 -- -- The GHC API -- -- ----------------------------------------------------------------------------- module GHC ( ...
snoyberg/ghc
compiler/main/GHC.hs
bsd-3-clause
56,788
4
28
15,369
10,140
5,462
4,678
-1
-1
module ParsecPos(module Text.ParserCombinators.Parsec.Pos) where import Text.ParserCombinators.Parsec.Pos
OS2World/DEV-UTIL-HUGS
oldlib/ParsecPos.hs
bsd-3-clause
106
0
5
6
21
15
6
2
0
----------------------------------------------------------------------------- -- | -- Module : Data.SBV.SMT.SMTLib -- Copyright : (c) Levent Erkok -- License : BSD3 -- Maintainer : erkokl@gmail.com -- Stability : experimental -- -- Conversion of symbolic programs to SMTLib format --------------------...
josefs/sbv
Data/SBV/SMT/SMTLib.hs
bsd-3-clause
3,020
0
17
879
615
326
289
46
1
{-#LANGUAGE ScopedTypeVariables#-} module Main where import Lib import Misc import Numeric.LinearAlgebra as NA import Data.Foldable import Data.Maybe import Data.Default.Class import Numeric.GSL.Minimization import Optimise import Data.Packed.Repa import Data.Array.Repa (computeUnboxedP) import Data.Array.Repa.IO.BMP...
LeMarwin/bmt16
app/Main.hs
bsd-3-clause
1,906
0
17
509
818
428
390
55
2
----------------------------------------------------------------------------- -- -- Code generation for profiling -- -- (c) The University of Glasgow 2004-2006 -- ----------------------------------------------------------------------------- {-# OPTIONS -fno-warn-tabs #-} -- The above warning supression flag is a tempo...
nomeata/ghc
compiler/codeGen/StgCmmProf.hs
bsd-3-clause
12,996
35
21
2,739
2,244
1,198
1,046
201
2
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE CPP #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE LambdaCase #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Actions.TreeSelect -- Description : Display workspaces or...
xmonad/xmonad-contrib
XMonad/Actions/TreeSelect.hs
bsd-3-clause
26,109
0
22
8,040
4,863
2,651
2,212
314
3
----------------------------------------------------------------------------- -- | -- Module : XMonad.Prompt.Workspace -- Copyright : (C) 2007 Andrea Rossato, David Roundy -- License : BSD3 -- -- Maintainer : -- Stability : unstable -- Portability : unportable -- -- A workspace prompt for XMonad -- -...
eb-gh-cr/XMonadContrib1
XMonad/Prompt/Workspace.hs
bsd-3-clause
2,074
0
11
636
359
197
162
23
1
{-# LANGUAGE RankNTypes #-} {-# LANGUAGE FlexibleContexts #-} module DodgerBlue.IO (evalDslIO, newQueue, writeQueue, tryReadQueue, readQueue) where import DodgerBlue.Types import Control.Concurrent.Async import Control.Concurrent.STM import Control.Monad.Free.Churc...
adbrowne/dodgerblue
src/DodgerBlue/IO.hs
bsd-3-clause
1,583
0
13
375
558
283
275
43
7
{-# LANGUAGE ExistentialQuantification #-} module Valkyrie.Resource( createResourceManager, attachResourceLocator, attachLocator, obtainResource, releaseResource, obtainResourceInternal, releaseResourceInternal ) where import Valkyrie.Types import Valkyrie.Resource.Types import Valkyri...
Feeniks/valkyrie
src/Valkyrie/Resource.hs
bsd-3-clause
3,000
0
14
623
1,117
570
547
68
2
{-# LANGUAGE TypeFamilies, RankNTypes, FlexibleContexts, OverloadedStrings #-} module DirectedKeys.GenerateCfg where -- import DirectedKeys import DirectedKeys.GenerateCfg.Internal import Control.Applicative import Data.Aeson import Data.List import Database.Persist.Class import Database.Persist.Types import Persist....
plow-technologies/dkrouter-generator
src/DirectedKeys/GenerateCfg.hs
bsd-3-clause
1,840
0
13
359
602
326
276
38
1
{-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} module Data.API.Subledger.Types ( AccountingValue(..) , Action(..) , BalanceValue(..) , CreditValue(..) , DebitValue(..) , WrappedBa...
whittle/subledger
subledger-core/src/Data/API/Subledger/Types.hs
bsd-3-clause
7,063
0
15
1,671
1,982
1,081
901
156
1
{-# LANGUAGE OverloadedStrings #-} -- Hmm… so not all functions really need to get the client passed in, but for consistency's (and safety's on some level) sake, they all do in the module {- | Client interface to Neo4j over REST. Here's a simple example (never mind the cavalier pattern matching): > import Database....
ThoughtLeadr/neo4j-haskell-http-client
src/Database/Neo4j.hs
bsd-3-clause
8,765
0
26
2,607
1,967
1,048
919
151
9
module Model where import Prelude import Yesod import Data.Text (Text) import Database.Persist.Quasi import Data.Typeable (Typeable) import Hitweb.Identity -- You can define all of your database entities in the entities file. -- You can find more information on persistent and how to declare entities -- at: -- http://...
NicolasDP/hitweb
Model.hs
bsd-3-clause
469
0
8
61
74
43
31
-1
-1
module Performer where import System.Process import Control.Concurrent import Control.Monad import Types boxsize = 24 ctopleft = (122, 26) cbotleft1_1 = (122, 290) cbotleft1_2 = (122, 321) cbotleft2_1 = (274, 290) chua = (689, 26) czhong = (600, 50) cfa = (600, 140) cbai = (600, 220) voffset = snd cbotleft1_2 - snd ...
Frefreak/solitaire-solver
src/Performer.hs
bsd-3-clause
2,947
0
15
727
1,101
564
537
85
1
{-# LANGUAGE OverloadedStrings, RecursiveDo, ScopedTypeVariables, FlexibleContexts, TypeFamilies, ConstraintKinds #-} module Frontend.Properties.DDB ( dbProperties ) where import Prelude hiding (mapM, mapM_, all, sequence) import qualified Data.Map as Map import Data.Monoid ((<>))...
Rizary/awspi
Lib/Frontend/Properties/DDB.hs
bsd-3-clause
1,807
3
18
492
520
267
253
43
2
{-# LANGUAGE ForeignFunctionInterface #-} module CRF.LogMath ( logIsZero , logAdd , logSum ) where import Data.List (sort) foreign import ccall unsafe "math.h log1p" log1p :: Double -> Double inf :: RealFloat a => a inf = (1/0) m_inf :: RealFloat a => a m_inf = -(1/0) logIsZero :: Double -> Bool logIsZero x =...
kawu/tagger
src/CRF/LogMath.hs
bsd-3-clause
824
0
11
225
349
180
169
26
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE ViewPatterns #-}...
kadena-io/pact
src/Pact/Native/Db.hs
bsd-3-clause
19,739
0
26
4,627
6,523
3,284
3,239
388
5
{-# OPTIONS_GHC -fno-warn-type-defaults #-} import Test.Hspec (Spec, describe, it, shouldBe) import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith) import Robot ( Bearing ( East , North , South , West ) , bearing , coordinates , mkRobot , s...
vaibhav276/exercism_haskell
robot-simulator/test/Tests.hs
mit
3,575
0
19
979
908
477
431
63
1
module MultipleInnerEntriesRemoved where import Language.Haskell.Exts (Exp(Var,Con,Lit)) foo = Con
serokell/importify
test/test-data/haskell-src-exts@constructors/06-MultipleInnerEntriesRemoved.hs
mit
101
0
6
11
28
20
8
3
1
{-# LANGUAGE FlexibleContexts, OverloadedStrings #-} -- | Module : Network.MPD.Commands.Parse -- Copyright : (c) Ben Sinclair 2005-2009, Joachim Fasting 2010 -- License : MIT (see LICENSE) -- Maintainer : Joachim Fasting <joachim.fasting@gmail.com> -- Stability : alpha -- -- Parsers for MPD data types. mo...
beni55/libmpd-haskell
src/Network/MPD/Commands/Parse.hs
mit
5,618
0
15
1,961
1,585
844
741
90
24
{-| Module : TS_Compile License : GPL Maintainer : bastiaan@cs.uu.nl Stability : experimental Portability : portable Compile a .type file. (directives based on "Scripting the Type Inference Process", ICFP 2003) -} module Helium.StaticAnalysis.Directives.TS_Compile where import H...
roberth/uu-helium
src/Helium/StaticAnalysis/Directives/TS_Compile.hs
gpl-3.0
3,359
0
25
1,127
637
333
304
51
5
{-# LANGUAGE DeriveDataTypeable, GeneralizedNewtypeDeriving, Rank2Types, RecordWildCards #-} -- | -- Module: Data.Aeson.Types.Internal -- Copyright: (c) 2011-2015 Bryan O'Sullivan -- (c) 2011 MailRank, Inc. -- License: Apache -- Maintainer: Bryan O'Sullivan <bos@serpentine.com> -- Stabilit...
abbradar/aeson
Data/Aeson/Types/Internal.hs
bsd-3-clause
18,503
0
25
5,208
4,044
2,226
1,818
359
5
{-# LANGUAGE OverloadedStrings, TypeFamilies, CPP #-} -- | Events relating to mouse keyboard input. module Haste.Events.KeyEvents (KeyEvent (..), KeyData (..), mkKeyData) where import Haste.Any import Haste.Events.Core #if __GLASGOW_HASKELL__ < 710 import Control.Applicative #endif -- | Event data for keyboard events....
akru/haste-compiler
libraries/haste-lib/src/Haste/Events/KeyEvents.hs
bsd-3-clause
1,585
0
11
418
440
240
200
52
1
{-# Language TypeInType #-} {-# Language TypeOperators, DataKinds, PolyKinds, GADTs #-} module T14555 where import Data.Kind import GHC.Types (TYPE) data Exp :: [TYPE rep] -> TYPE rep -> Type where --data Exp (x :: [TYPE rep]) (y :: TYPE rep) where --data Exp (x :: [TYPE rep]) y where Lam :: Exp (a:xs) b -> Exp xs...
shlevy/ghc
testsuite/tests/polykinds/T14555.hs
bsd-3-clause
330
0
9
65
80
46
34
7
0
module Handler.Feed where import Import import Model.UserComment import Text.Blaze.Html (toMarkup) import Yesod.RssFeed getFeedR :: SiteId -> Handler RepRss getFeedR siteId = do site <- runDB $ get404 siteId comments <- runDB $ findRecentUserComments siteId feedFromComments (Entity siteId site) comments...
vaporware/carnival
Handler/Feed.hs
mit
1,790
0
13
442
453
230
223
39
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-ses/gen/Network/AWS/SES/VerifyEmailAddress.hs
mpl-2.0
3,256
0
9
672
334
207
127
45
1
{- (c) The University of Glasgow 2006-2008 (c) The GRASP/AQUA Project, Glasgow University, 1993-1998 -} {-# LANGUAGE CPP, NondecreasingIndentation #-} -- | Module for constructing @ModIface@ values (interface files), -- writing them to disk and comparing two versions to see if -- recompilation is required. module MkI...
green-haskell/ghc
compiler/iface/MkIface.hs
bsd-3-clause
87,030
3
24
27,759
15,437
8,096
7,341
-1
-1
module ResolvePred (myFold) where {-@ data L [llen] = C (h :: Int) (t :: L) | N @-} {-@ invariant {v:L | (llen v) >= 0} @-} data L = C Int L | N {-@ myFold :: forall <q :: L -> b -> Prop>. (as:L -> a:Int -> b<q as> -> b<q (C a as)>) -> b<q N> -> l:L -> b<q l> @-} myFo...
ssaavedra/liquidhaskell
tests/pos/ResolvePred.hs
bsd-3-clause
571
0
9
218
77
43
34
5
2
{-# LANGUAGE CPP #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UnicodeSyntax #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Main (main) where import Prelude import Data.Default #if __GLASGOW_HASKELL__ == 704 import ...
liyang/vector-th-unbox
tests/sanity.hs
bsd-3-clause
702
0
6
116
102
69
33
18
1
{-# LANGUAGE BangPatterns #-} foo = case v of !1 -> x
bitemyapp/apply-refact
tests/examples/Structure20.hs
bsd-3-clause
54
1
8
12
21
9
12
2
1
{-# LANGUAGE OverloadedStrings #-} {-| 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 r...
robgssp/csh-eval
src/CSH/Eval/Config.hs
mit
2,824
0
16
765
443
251
192
47
2
----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple.GHC.IPI641 -- Copyright : (c) The University of Glasgow 2004 -- License : BSD3 -- -- Maintainer : cabal-devel@haskell.org -- Portability : portable -- module Distribution.Simple.GHC.IPI64...
DavidAlphaFox/ghc
libraries/Cabal/Cabal/Distribution/Simple/GHC/IPI641.hs
bsd-3-clause
4,347
0
13
1,160
831
497
334
79
1
----------------------------------------------------------------------------- -- | -- Module : XMonad.Util.WorkspaceCompare -- Copyright : (c) Spencer Janssen <spencerjanssen@gmail.com> -- License : BSD3-style (see LICENSE) -- -- Maintainer : Spencer Janssen <spencerjanssen@gmail.com> -- Stability : ...
markus1189/xmonad-contrib-710
XMonad/Util/WorkspaceCompare.hs
bsd-3-clause
4,362
1
15
1,047
817
439
378
61
5
-- Programatica Front-End, level 2, see README.html module PFE2( PFE2MT,runPFE2,clean2, getSt2ext,updSt2ext,setSt2ext, getAllExports,getExports,getModuleExports,getModuleExportsTime,getModuleTime ) where import Prelude hiding (readFile,putStrLn) import Data.Maybe(isJust,isNothing,fromJust) import Data.List(nub,...
kmate/HaRe
old/tools/pfe/PFE2.hs
bsd-3-clause
5,580
73
20
1,303
1,347
779
568
121
11
{-# LANGUAGE OverloadedStrings #-} module CreateIssue where import qualified Github.Issues as Github main = do let auth = Github.GithubBasicAuth "user" "password" newiss = (Github.newIssue "A new issue") { Github.newIssueBody = Just "Issue description text goes here" } possibleIssue <- Githu...
mavenraven/github
samples/Issues/CreateIssue.hs
bsd-3-clause
810
0
17
191
211
108
103
18
1
module TiRhs where --import HasBaseStruct import BaseSyntaxStruct import TI --import TiPrelude(tBool) import MUtils --import PrettyPrint -- debug instance (--Printable i, -- debug TypeCon i,Fresh i,TypeCheck i e (Typed i e'),HasTypeAnnot i e') => TypeCheck i (HsRhs e) (Typed i (HsRhs e')) where tc = ...
forste/haReFork
tools/base/TI/TiRhs.hs
bsd-3-clause
688
0
10
173
277
137
140
-1
-1
{-# LANGUAGE KindSignatures, TypeFamilies, GADTs, DataKinds #-} module T12444a where type family F a :: * type instance F (Maybe x) = Maybe (F x) foo :: a -> Maybe (F a) foo = undefined -- bad :: (F (Maybe t) ~ t) => Maybe t -> [Maybe t] bad x = [x, foo x]
olsner/ghc
testsuite/tests/indexed-types/should_compile/T12444a.hs
bsd-3-clause
261
0
8
59
80
45
35
7
1
module Prim where map2 f [] = [] map2 f (x:xs) = f x : map2 f xs zipWith2 f [] [] = [] zipWith2 f (a:x) (b:y) = (f a b):zipWith2 f x y
ezyang/ghc
testsuite/tests/arityanal/prim.hs
bsd-3-clause
137
0
7
37
110
56
54
5
1
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleContexts #-} module Examples.WithTVar where import Control.Concurrent.STM import Control.Applicative import Data.Time import System.IO import Database.EventSafe import Examples.Shared -- Naive simple program prompting the user allowing him/her -- to add ne...
thoferon/eventsafe
Examples/WithTVar.hs
mit
2,332
0
16
589
633
285
348
71
4
{-# LANGUAGE PatternSynonyms #-} -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module JSDOM.Generated.HTMLFormControlsCollection (get, get_, getUnsafe, getUnchecked, namedItem, namedItem_, namedItemUnsafe, n...
ghcjs/jsaddle-dom
src/JSDOM/Generated/HTMLFormControlsCollection.hs
mit
4,046
0
14
634
870
498
372
-1
-1
module Classifier ( ) where
Yukits/classyou
src/Classifier.hs
mit
36
0
3
13
7
5
2
2
0
module Main where foo a | even (fst a) = False | True = True boo = any foo [(2,2), (6,3), (7,4)] main = print $ boo
NickolayStorm/usatu-learning
Functional programming/lab3/1st.hs
mit
120
0
10
31
82
45
37
5
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} -- | Simple model for slides module Slides where import Control.Lens hiding (children) import Data.Foldable (foldl') import Data.Maybe (listToMaybe) import qualified Data.Text as T import VirtualHom.Element import VirtualHom.View(View, renderUI, spe...
j-mueller/talks
2016-05-laf/src/Slides.hs
mit
3,143
0
17
698
1,061
571
490
-1
-1
{-# LANGUAGE OverloadedStrings #-} import Data.Text.IO as Text main = Text.putStrLn "Hello"
yamadapc/stack-run-auto
test-files/Test2.hs
mit
93
0
6
13
20
12
8
3
1
module Main (main) where import MuchAdo import NoAdo import Criterion.Main import Control.DeepSeq import GHC.TypeLits import Numeric.Sized.WordOfSize instance KnownNat n => NFData (WordOfSize n) main :: IO () main = defaultMain [ env (pure ([1 .. 6], 8)) $ \ ~(xs,n) -> bgroup...
oisdk/constrained-monads
bench/bench.hs
mit
1,983
0
14
783
439
223
216
36
1
{-#LANGUAGE EmptyDataDecls, CPP #-} module Melchior.Data.String ( JSString , jsStringToString , stringToJSString ) where #ifdef __UHC_TARGET_JS__ import Language.UHC.JScript.ECMA.String (JSString, stringToJSString, jsStringToString) instance Show JSString where show h = jsStringToString h #else data JSStr...
kjgorman/melchior
Melchior/Data/String.hs
mit
440
0
6
66
60
38
22
-1
-1
import Data.List --sort und reverse hIndex :: (Num a, Ord a) => [a] -> a hIndex l = helper (reverse (sort l)) 0 where helper [] acc = acc helper (z:ls) acc | z > acc = helper ls (acc + 1) | otherwise = acc -- Alternativ hindex1 = length . takeWhile id . zipWith (<=) ...
MartinThoma/LaTeX-examples
documents/Programmierparadigmen/scripts/haskell/hirsch-index.hs
mit
431
0
12
143
204
106
98
11
2
{-# LANGUAGE GeneralizedNewtypeDeriving #-} -- | The @Client@ monad type. module Haste.App.Client.Type ( MonadError (..), MonadConc (..), MonadEvent (..), MonadIO (..) , Client, ClientError (..) , runClient ) where import Haste.Concurrent (MonadConc (..), CIO, concurrent) import Control.Monad.IO.Class (MonadIO)...
valderman/haste-app
src/Haste/App/Client/Type.hs
mit
1,187
0
12
237
393
216
177
31
2
module Network.BitFunctor2.Platform.Blockchain.Forging where
BitFunctor/bitfunctor
src/Network/BitFunctor2/Platform/Blockchain/Forging.hs
mit
62
0
3
4
9
7
2
1
0
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE LambdaCase #-} {-| Module : PostgREST.Auth Description : PostgREST authorization functions. This module provides functions to deal with the JWT authorization (http://jwt.io). It also can be used to define other authorization functions, in the future Oauth, LDAP...
diogob/postgrest
src/PostgREST/Auth.hs
mit
3,823
0
19
891
844
437
407
63
3
{-# LANGUAGE OverloadedStrings #-} module HXSDL (mainLoop) where import Graphics.UI.SDL import Control.Concurrent mainLoop :: Renderer -> IO () mainLoop renderer = do putStrLn "mainloop" renderClear renderer putStrLn "clear renderer" setRenderDrawColor renderer maxBound maxBound maxB...
EDeijl/HXSDL
src/HXSDL.hs
mit
447
0
10
118
112
52
60
14
1
{-# LANGUAGE OverloadedStrings, QuasiQuotes #-} module Types.GraphAnnotationSpec where import Control.Monad (forM_) import Data.Aeson (decode, encode, Value(..)) import Data.Aeson.QQ import qualified Data.HashMap.Lazy as HM import Test.Hspec import Web.Mackerel.Types.GraphAnnotation spec :: Spec spec = do let gra...
itchyny/mackerel-client-hs
test/Types/GraphAnnotationSpec.hs
mit
1,639
0
23
353
346
191
155
30
1
-- -- -- ------------------ -- Exercise 12.37. ------------------ -- -- -- module E'12'37 where
pascal-knodel/haskell-craft
_/links/E'12'37.hs
mit
106
0
2
24
13
12
1
1
0
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-step.html module Stratosphere.Resources.EMRStep where import Stratosphere.ResourceImports import Stratosph...
frontrowed/stratosphere
library-gen/Stratosphere/Resources/EMRStep.hs
mit
2,708
0
15
374
454
260
194
44
1
{-# LANGUAGE QuasiQuotes #-} module Doppler.Html.SyntaxSpec where import Test.Hspec import Doppler.Html.Types import qualified Doppler.Css.Types as Css import Doppler.Html.Syntax import Language.Haskell.TH.Syntax (lift) main :: IO () main = hspec spec spec :: Spec spec = do describe "Tags" $ do it "parses ...
oinuar/doppler-html
test/Doppler/Html/SyntaxSpec.hs
mit
12,289
0
26
2,818
3,105
1,579
1,526
164
1
module Trainer where import Numeric.LinearAlgebra import Models import Layer import Optimization import Data.Foldable import Control.Monad.IO.Class import Utils data TrainConfig = TrainConfig { trainConfigRowNum :: Int, trainConfigColNum :: Int, trainConfigLearningRate :: Double, trainConfigMomentum :: Double...
neutronest/vortex
vortex/Trainer.hs
mit
2,040
0
23
570
436
234
202
45
2
module Server where import Network (listenOn, withSocketsDo, accept, PortID(..), Socket{-, HostName, PortNumber-}) import System.IO (hSetBuffering, hGetLine, hPutStrLn, hPrint, BufferMode(..), Handle) import Control.Concurrent --(forkIO, newEmptyMVar, MVar) import qualified Data.Map as Map import DataTypes run :: St...
Zolomon/PokemonArena
src/Server.hs
mit
7,651
0
20
2,739
1,963
982
981
125
3
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable #-} module Graph.Weighted.Data where import Autolib.ToDoc import Autolib.Reader import Autolib.Set import Autolib.Hash import Data.Typeable data ( Ord v ) => Kante v w = Kante { von :: v, nach :: v, gewicht :: w } deriving ( Typeable ) instance ( Ord v, H...
Erdwolf/autotool-bonn
src/Graph/Weighted/Data.hs
gpl-2.0
1,258
0
11
318
416
222
194
23
0
import Prelude hiding (map) import Hiding2 hiding (x, y) --TODO: statische error bij verbergen show functie x, y :: Int x = 3 y = 4 map :: Num a => [a] -> a map xs = sum xs main :: (Int, String) main = ( map [x,y,z] -- should be 307 , show X -- show functions, types and constructors may not be hidden )...
Helium4Haskell/helium
test/make/Hiding1.hs
gpl-3.0
321
0
7
83
109
65
44
10
1
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverlappingInstances #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANG...
bennofs/vplan
src/Data/VPlan/Modifier/Enum.hs
gpl-3.0
8,851
0
15
2,303
3,953
2,060
1,893
-1
-1
ssa :: State s (State s a) runState ssa :: s -> (State s a, s)
hmemcpy/milewski-ctfp-pdf
src/content/3.6/code/haskell/snippet24.hs
gpl-3.0
62
1
8
15
42
21
21
-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 #-} -- ...
olorin/amazonka
amazonka-cloudfront/gen/Network/AWS/CloudFront/ListDistributions.hs
mpl-2.0
5,092
0
14
1,079
710
416
294
-1
-1
-- | Parsing of Enums. module Data.GI.GIR.Enum ( Enumeration(..) , parseEnum ) where import Data.Int (Int64) import Data.Text (Text) import Foreign.C (CInt(..)) import Data.GI.GIR.Parser data Enumeration = Enumeration { enumValues :: [(Text, Int64)], errorDomain :: Maybe Text, enumTypeInit ::...
hamishmack/haskell-gi
lib/Data/GI/GIR/Enum.hs
lgpl-2.1
1,625
0
13
341
367
205
162
38
1
-- -*-haskell-*- -- GIMP Toolkit (GTK) CellRenderer TreeView -- -- Author : Axel Simon -- -- Created: 23 May 2001 -- -- Copyright (C) 1999-2005 Axel Simon -- -- This library is free software; you can redistribute it and/or -- modify it under the terms of the GNU Lesser General Public -- License as published by t...
thiagoarrais/gtk2hs
gtk/Graphics/UI/Gtk/TreeList/CellRenderer.hs
lgpl-2.1
4,931
12
14
1,147
457
284
173
35
1
{-# LANGUAGE InstanceSigs #-} module MoiState where newtype Moi s a = Moi { runMoi :: s -> (a, s) } instance Functor (Moi s) where fmap :: (a -> b) -> Moi s a -> Moi s b fmap f (Moi g) = Moi $ (\(a,s) -> (f a, s)) . g instance Applicative (Moi s) where pure :: a -> Moi s a pure a = Moi $ \s -> (a, s) (<*...
thewoolleyman/haskellbook
23/08/haskell-club/MoiState.hs
unlicense
676
0
14
202
382
207
175
16
0
{- A Pythagorean triplet is a set of three natural numbers, a < b < c, for which, a2 + b2 = c2 For example, 32 + 42 = 9 + 16 = 25 = 52. There exists exactly one Pythagorean triplet for which a + b + c = 1000. Find the product abc. -} isPythTriple :: (Integral a) => a -> a -> a -> Bool isPythTriple a b c =...
m3mitsuppe/haskell
projecteuler/pr009.hs
unlicense
578
4
10
166
163
84
79
9
3
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE OverloadedStrings #-} import Data.FileEmbed import Test.HUnit ((@?=)) import System.FilePath ((</>)) main :: IO () main = do let received = $(embedDir "test/sample") received @?= [ ("foo", "foo\r\n") , ("bar" </> "baz", "baz\r\n") ]
phadej/file-embed
test/main.hs
bsd-2-clause
313
0
12
73
92
53
39
11
1
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QGraphicsSimpleTextItem_h.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:26 Warning : this file is machine ge...
keera-studios/hsQt
Qtc/Gui/QGraphicsSimpleTextItem_h.hs
bsd-2-clause
102,263
0
18
20,812
30,664
14,671
15,993
-1
-1
module Propellor.Property.DnsSec where import Propellor.Base import qualified Propellor.Property.File as File -- | Puts the DNSSEC key files in place from PrivData. -- -- signedPrimary uses this, so this property does not normally need to be -- used directly. keysInstalled :: Domain -> RevertableProperty HasInfo keys...
np/propellor
src/Propellor/Property/DnsSec.hs
bsd-2-clause
3,620
83
16
723
916
486
430
74
2
{-# OPTIONS_GHC -fno-warn-type-defaults #-} -------------------------------------------------------------------- -- | -- Copyright : (c) Edward Kmett and Dan Doel 2012-2014 -- License : BSD3 -- Maintainer: Edward Kmett <ekmett@gmail.com> -- Stability : experimental -- Portability: non-portable -- -- General-purpo...
ekmett/ermine
src/Ermine/Pretty.hs
bsd-2-clause
2,999
0
19
647
1,099
599
500
66
4
{-| Module : Network.NSFW.Firewall.Packet Description : Defines the Packet data type. -} module Network.NSFW.Firewall.Packet ( IpAddress , Protocol , Packet(..) ) where import Data.Int (Int8, Int16) type IpAddress = String type Protocol = String data Packet = Packet { getProtocol ...
m-renaud/NSFW
src/Network/NSFW/Firewall/Packet.hs
bsd-2-clause
597
0
8
168
115
74
41
16
0
-- %%%%%%%%%%%%%%%%%%%%%%%%%% -- WARNING -- File not actually used in drasil.cabal for GamePhysics -- so it is not actually 'plugged in'. The definitions in here -- may not type check anymore! -- %%%%%%%%%%%%%%%%%%%%%%%%%% module Drasil.GamePhysics.GDefs (genDefs) where import Language.Drasil import Utils.Drasil imp...
JacquesCarette/literate-scientific-software
code/drasil-example/Drasil/GamePhysics/GDef.hs
bsd-2-clause
6,973
0
10
1,106
1,313
678
635
128
1
module Pokemon.Experience where data ExpCurve = Slow | MediumSlow | Medium | Fast deriving (Eq, Show, Ord) lowestExpForLevel :: ExpCurve -> Integer -> Integer lowestExpForLevel curve n = case curve of Slow -> 5 * n^3 `div` 4 MediumSlow -> 6 * n^3 `div` 5 - 15 * n^2 + 100 * n - 140 Medi...
bhamrick/RouteNeo
Pokemon/Experience.hs
bsd-3-clause
362
0
16
107
158
86
72
10
4
{-# LANGUAGE TypeFamilies #-} module EFA.Test.Arithmetic where import qualified EFA.Equation.Arithmetic as Arith import EFA.Equation.Arithmetic (Sum, (~+), (~-), Product, (~*), (~/), Constant, zero, Integrate, Scalar, integrate) import Control.Applicative (Applicative, pure,...
energyflowanalysis/efa-2.1
test/EFA/Test/Arithmetic.hs
bsd-3-clause
1,336
0
8
315
541
302
239
36
0
module Main where import Control.Concurrent (threadDelay) import Control.Concurrent.Async (poll) import Control.Concurrent.MVar (MVar, newMVar, withMVar) import Control.Monad (forever, forM_) import Data.Monoid ((<>)) import Data.Set (fromList, toList) import Data.Oddjob.Worker lockedPutStrLn :: MVar () -> String ->...
helium/oddjob
app/Main.hs
bsd-3-clause
1,413
0
16
503
450
233
217
39
1
{-# OPTIONS_GHC -fno-warn-unused-matches -fno-warn-unused-binds #-} module Ling.Layout where import Ling.Lex import Data.Maybe (isNothing, fromJust) -- Generated by the BNF Converter -- local parameters topLayout :: Bool topLayout = True layoutWords, layoutStopWords :: [String] layoutWords = ["of"] layoutSt...
np/ling
Ling/Layout.hs
bsd-3-clause
9,793
0
25
3,206
2,533
1,312
1,221
188
49
{-# Language RecordWildCards, GADTs, TupleSections, MultiParamTypeClasses #-} module Analysis.Types.Annotation where import qualified Analysis.Types.Sorts as S import qualified Data.Set as D import Analysis.Common import qualified Data.Map as M import Data.Maybe import Control.Monad.Identity import Control.Monad.State ...
netogallo/polyvariant
src/Analysis/Types/Annotation.hs
bsd-3-clause
6,992
0
16
1,875
2,691
1,390
1,301
178
7
{-# LANGUAGE UndecidableInstances, MultiParamTypeClasses #-} -- Copyright (c) 2012 Eric McCorkle. All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions -- are met: -- 1. Redistributions of source code must ret...
emc2/proglang-util
Control/Monad/Symtab/Class.hs
bsd-3-clause
2,105
0
11
380
142
94
48
9
0
{-# LANGUAGE PatternGuards, RecordWildCards #-} module Website where import Data.Char (toLower) import Data.Function (on) import Data.List (find, groupBy, nub, sort) import Data.Version (showVersion, versionBranch) import Development.Shake import Text.Hastache import Text.Hastache.Context import Dirs import Paths im...
ardumont/haskell-platform
hptool/src/Website.hs
bsd-3-clause
4,647
0
15
1,189
1,488
765
723
103
9
-- | Reacts to changes in the selection in the diagram module Controller.Conditions.Selection (installHandlers) where -- External imports import Control.Monad import Data.Maybe import Graphics.UI.Gtk import Hails.MVC.Model.ProtectedModel.Reactive -- Internal imports import CombinedEnvironment import Model.Model ...
ivanperez-keera/SoOSiM-ui
src/Controller/Conditions/Selection.hs
bsd-3-clause
1,798
0
15
361
442
227
215
39
2
{-# LANGUAGE CPP, MagicHash, NondecreasingIndentation, UnboxedTuples #-} -- ----------------------------------------------------------------------------- -- -- (c) The University of Glasgow, 2005-2007 -- -- Running statements interactively -- -- -------------------------------------------------------------------------...
bitemyapp/ghc
compiler/main/InteractiveEval.hs
bsd-3-clause
41,677
19
36
11,816
8,984
4,588
4,396
2
0
{-# LANGUAGE OverloadedStrings, RecordWildCards #-} module IRTS.Cil.UnreachableCodeRemoval (removeUnreachable) where import Data.Graph import Language.Cil hiding (entryPoint) removeUnreachable :: [MethodDef] -> [MethodDef] removeUnreachable defs = let (graph, fromVertex, toVertex) = callGraph defs ...
BartAdv/idris-cil
src/IRTS/Cil/UnreachableCodeRemoval.hs
bsd-3-clause
1,004
0
12
291
328
175
153
18
4
{-# LANGUAGE PatternGuards, ViewPatterns, RecordWildCards #-} module Settings( Severity(..), Classify(..), HintRule(..), Note(..), showNotes, Setting(..), defaultHintName, isUnifyVar, findSettings, readSettings, readSettings2, readPragma, findSettings2 ) where import HSE.All import Data.Char impor...
bergmark/hlint
src/Settings.hs
bsd-3-clause
13,005
0
19
3,113
4,317
2,195
2,122
198
13
----------------------------------------------------------------------------- -- | -- Copyright : (C) 2015 Dimitri Sabadie -- License : BSD3 -- -- Maintainer : Dimitri Sabadie <dimitri.sabadie@gmail.com> -- Stability : experimental -- Portability : portable -- -- OpenGL log committer. ---------------...
phaazon/quaazar
src/Quaazar/Render/GL/Log.hs
bsd-3-clause
592
0
6
100
54
39
15
5
1
{-# LANGUAGE OverloadedStrings #-} module Afftrack.API.Brand.Merchant ( addBrowserLanguageBlocked , createMerchant , getMerchant , getMerchantBlacklist ) where import GHC.Generics import Data.Aeson import Control.Applicative import Network.HTTP.Client import qualified Data.B...
kelecorix/api-afftrack
src/Afftrack/API/Brand/Merchant.hs
bsd-3-clause
3,404
0
7
1,254
699
365
334
86
1
{-# LANGUAGE QuasiQuotes #-} module LLVM.General.Quote.Test.InlineAssembly where import Test.Tasty import Test.Tasty.HUnit import Test.HUnit import LLVM.General.Quote.LLVM import LLVM.General.AST import LLVM.General.AST.InlineAssembly as IA import qualified LLVM.General.AST.Linkage as L import qualified LLVM.Genera...
tvh/llvm-general-quote
test/LLVM/General/Quote/Test/InlineAssembly.hs
bsd-3-clause
2,795
0
29
1,321
509
301
208
51
1
{- (c) The AQUA Project, Glasgow University, 1993-1998 \section{Common subexpression} -} {-# LANGUAGE CPP #-} module CSE (cseProgram) where #include "HsVersions.h" import CoreSubst import Var ( Var ) import Id ( Id, idType, idInlineActivation, zapIdOccInfo, zapIdUsageInfo ) import CoreUt...
forked-upstream-packages-for-ghcjs/ghc
compiler/simplCore/CSE.hs
bsd-3-clause
12,445
0
12
4,082
1,991
1,077
914
117
3
{-# LANGUAGE GADTs #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE DefaultSignature...
ekmett/hask
old/src/Hask/Foldable.hs
bsd-3-clause
3,968
0
17
688
1,167
621
546
72
1
module Network.Protocol.Uri.Chars ( unreserved , genDelims , subDelims ) where import Data.Char -- 2.3. Unreserved Characters unreserved :: Char -> Bool unreserved c = isAlphaNum c || elem c "-._~" -- 2.2. Reserved Characters genDelims :: Char -> Bool genDelims = flip elem ":/?#[]@" subDelims :: Char -> B...
sebastiaanvisser/salvia-protocol
src/Network/Protocol/Uri/Chars.hs
bsd-3-clause
361
0
6
69
93
52
41
11
1
{-# OPTIONS_JHC -fno-prelude #-} module Data.Ix ( Ix(range, index, inRange, rangeSize) ) where import Jhc.Int import Jhc.Enum import Jhc.Order import Jhc.Basics import Jhc.Num import Jhc.Tuples import Jhc.IO class Ord a => Ix a where range :: (a,a) -> [a] index :: (a,a) -> a -> Int inRange :: ...
dec9ue/jhc_copygc
lib/haskell-extras/Data/Ix.hs
gpl-2.0
2,388
8
11
759
877
487
390
48
0
predecessor n :: Int -> Int predecessor n | n>0 = n-1 | n==0 = 0 {- predecessor n :: Num a => a -> a -}
roberth/uu-helium
test/thompson/Thompson18.hs
gpl-3.0
116
2
8
39
49
23
26
-1
-1
{-# LANGUAGE ForeignFunctionInterface, EmptyDataDecls, NamedFieldPuns, DeriveDataTypeable, FlexibleInstances, ScopedTypeVariables #-} module Graphics.Qt.CPPWrapper ( -- * globale qtVersion, qtOpenUrl, -- * QApplication QApplication, withQApplication, execQApplication, processEven...
geocurnoff/nikki
src/Graphics/Qt/CPPWrapper.hs
lgpl-3.0
21,607
0
16
4,376
6,564
3,274
3,290
-1
-1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module Test.IO.Ambiata.Cli.Processing where import Ambiata.Cli.Data import Ambiata.Cli.Incoming import Ambiata.Cli.Processing import P import Test.QuickCheck imp...
ambiata/tatooine-cli
test/Test/IO/Ambiata/Cli/Processing.hs
apache-2.0
4,164
0
20
923
1,342
682
660
84
1