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
{-# OPTIONS_HADDOCK ignore-exports #-} module Algorithms.GrahamScan where import Algebra.Vector import Diagrams.TwoD.Types import MyPrelude -- |Get all points on a convex hull by using the graham scan -- algorithm. {-- ========== FUNCTIONAL PSEUDO CODE ====================== input: unsorted list us' output: sorted...
hasufell/CGA
Algorithms/GrahamScan.hs
gpl-2.0
4,204
4
12
971
801
420
381
40
1
module HEP.Automation.MadGraph.Dataset.Set20110429set1 where import HEP.Storage.WebDAV import HEP.Automation.MadGraph.Model import HEP.Automation.MadGraph.Machine import HEP.Automation.MadGraph.UserCut import HEP.Automation.MadGraph.SetupType import HEP.Automation.MadGraph.Model.SM import HEP.Automation.MadGraph.Da...
wavewave/madgraph-auto-dataset
src/HEP/Automation/MadGraph/Dataset/Set20110429set1.hs
gpl-3.0
1,450
0
10
370
340
209
131
40
1
{-# LANGUAGE TypeApplications, FlexibleInstances, MultiParamTypeClasses, DefaultSignatures, ScopedTypeVariables, UndecidableInstances #-} module Lamdu.Sugar.OrderTags ( orderDef, orderType, orderNode ) where import qualified Control.Lens as Lens import Control.Monad ((>=>), zipWithM_) import ...
Peaker/lamdu
src/Lamdu/Sugar/OrderTags.hs
gpl-3.0
9,566
0
17
2,142
3,318
1,701
1,617
-1
-1
-- reverse a list p5 :: [a] -> [a] p5 [] = [] p5 (x:xs) = p5 xs ++ [x]
yalpul/CENG242
H99/1-10/p5.hs
gpl-3.0
72
0
7
21
54
29
25
3
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} module Controllers.ReservationsController where import qualified DB import Models.Reservation import Controller.Types(Action, ControllerResponse(body)) import Controller(defaultControllerResponse,ToBody(toBody)...
shinjiro-itagaki/shinjirecs
shinjirecs-api/src/Controllers/ReservationsController.hs
gpl-3.0
1,084
0
6
124
128
80
48
11
1
{-# OPTIONS -Wall #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Graphics.UI.Bottle.Widgets.Spacer ( make, makeWidget, indentRight, indentRightWidget, makeHorizontal, makeHorizontalExpanding, makeVerticalExpanding) where import Data.Monoid(mempty) import Data.Vector.Vector2(Vector2(..)) import Graphics.UI....
alonho/bottle
src/Graphics/UI/Bottle/Widgets/Spacer.hs
gpl-3.0
1,437
0
10
162
399
229
170
29
1
module MaaS.Maths ( genComplexSpace, linearInterpol, spaceByCorner ) where import Data.Complex genComplexSpace :: (Enum a, RealFloat a) => a -> a -> a -> a -> a -> [Complex a] genComplexSpace xpt ypt resx resy zoom = concat [ [((x*r+offx) :+ (y*r+offy)) | x <- [0.0,1.0..(resx-1)]] | y <- [0.0,1.0..(resy-1)]] ...
maeln/MaaS
MaaS/Maths.hs
gpl-3.0
736
0
13
170
466
255
211
16
1
module Diagrams.Chart where
hsyl20/diagrams-chart
src/Diagrams/Chart.hs
gpl-3.0
30
0
3
5
6
4
2
1
0
module Sound.Tidal.MIDI.VolcaKick where import Sound.Tidal.Params import Sound.Tidal.MIDI.Control volcakickController :: ControllerShape volcakickController = ControllerShape { controls = [ mCC pulsecolour_p 40 , mCC pulselevel_p 41 , mCC ampattack_p 42 , mCC ampdecay_p 43 ...
tidalcycles/tidal-midi
Sound/Tidal/MIDI/VolcaKick.hs
gpl-3.0
1,005
0
8
269
364
194
170
29
1
{-| Module : WallHugger Description : A robot that sticks to the walls and fires at a target. Copyright : (c) Bradley Hardy, 2015 License : GPL3 Maintainer : bradleyhardy@live.com Stability : experimental Portability : non-portable -} {-# LANGUAGE UnicodeSyntax #-} module WallHugger (wallhugger) where ...
bch29/robo-monad
demo/WallHugger.hs
gpl-3.0
2,907
0
14
721
887
454
433
82
2
module Parse (parseChores, parseBrothers, parseHistory, parseLatestHistory, ChoreName, BrotherName, Difficulty, BrotherHistory(..)) where import Data.List.Split import Data.List (findIndices) -- |The parseChores function takes a chore file and parses it to a list of chore tuples -- Skips the header line parseChores :...
JerryLeiDing/haskell-house-chores
Parse.hs
gpl-3.0
3,749
0
17
843
787
457
330
56
3
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRoles/Patch.hs
mpl-2.0
3,594
0
15
841
507
298
209
73
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.YouTube.Types.Sum -- Copyright : (c) 2015-2016 Brendan...
brendanhay/gogol
gogol-youtube/gen/Network/Google/YouTube/Types/Sum.hs
mpl-2.0
238,877
0
11
59,972
38,885
20,601
18,284
4,874
0
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.CloudIdentity.Types -- Copyright : (c) 2015-2016 Brend...
brendanhay/gogol
gogol-cloudidentity/gen/Network/Google/CloudIdentity/Types.hs
mpl-2.0
14,627
0
7
2,692
1,209
839
370
317
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-iam/gen/Network/Google/Resource/IAM/Projects/Locations/WorkLoadIdentityPools/Providers/Operations/Get.hs
mpl-2.0
6,369
0
15
1,237
702
413
289
113
1
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TupleSections #-} module Flow.Run.DNA ( execStrategyDNA ) where import Control.Monad import Control.Monad.State.Strict import Control.Distributed.Process import Contr...
SKA-ScienceDataProcessor/RC
MS6/dna/flow/Flow/Run/DNA.hs
apache-2.0
24,190
0
27
6,174
5,680
2,896
2,784
350
9
-- Copyright 2020 Google LLC -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in ...
google/cabal2bazel
bzl/tests/proto/SubTest.hs
apache-2.0
737
0
6
117
52
39
13
4
1
{-# LANGUAGE OverloadedStrings #-} module Site.Rss ( rss , rssSplice ) where import Prelude hiding (id) import Blaze.ByteString.Builder (toLazyByteString) import Data.ByteString (ByteString) import qualified Data.Text as T import qualified Data.Text.Encoding as T import ...
dikmax/haskell-blog
src/Site/Rss.hs
bsd-2-clause
3,011
0
19
769
835
448
387
65
1
{-# LANGUAGE FlexibleInstances, UndecidableInstances, OverlappingInstances #-} -- | -- Maintainer : Roman Smrž <roman.smrz@seznam.cz> -- Stability : experimental -- -- 'Snapshot' is a type class generalizing 'Serialize', as it, apart from -- writing values in the 'Put' monad (or reading in 'Get'), allows to perform...
roman-smrz/swapper
src/Data/Disk/Swapper/Snapshot.hs
bsd-2-clause
903
0
9
166
130
75
55
12
0
{-# LANGUAGE TemplateHaskell #-} module Lol.Stats where import Prelude hiding ((.)) import Control.Category import Control.Monad import Control.Monad.Trans.State.Lazy import Data.Lens.Common import Data.Lens.Lazy import Data.Lens.Template import qualified Data.Map as M import Data.Maybe import Lol.Champs import Lol...
MostAwesomeDude/lollerskates
Lol/Stats.hs
bsd-2-clause
5,251
0
16
1,639
1,101
583
518
-1
-1
module Web (serverListen, sendFrame, readFrame) where import Network import System.IO import Char import Control.Concurrent import Control.Monad -- restarting an apache server (apache2ctl restart) -- magic configuration file /etc/apache2/sites-available/default -- http://www.haskell.org/haskellwiki/Roll_your_own_IRC...
fffej/haskellprojects
websockets/Web.hs
bsd-2-clause
1,655
0
14
502
389
192
197
35
3
module FieldML_test_mesh01 ( mesh_SansConnectivity, globalNodesFSet, elementIdFSet, localNodeFSet, elementId, localNode, localToGlobalNodes, pressureAtGlobalNodes, -- Exported for testing t1, -- Exported for testing t2, -- Exported for testing pressureViaTemplate, ...
codecurve/FieldML-Haskell-01
src/FieldML_test_mesh01.hs
bsd-2-clause
5,349
0
13
1,039
777
452
325
98
1
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 Type subsumption and unification -} {-# LANGUAGE CPP, MultiWayIf, TupleSections #-} module TcUnify ( -- Full-blown subsumption tcWrapResult, tcWrapResultO, tcSkolemise, tcSkolemiseET, tcSubTypeHR, tcSubType, tcSubT...
vikraman/ghc
compiler/typecheck/TcUnify.hs
bsd-3-clause
69,372
87
30
21,428
10,543
5,499
5,044
-1
-1
{-# LANGUAGE OverloadedStrings #-} -- everything related to Thera module Thera where import Data.Aeson.Lens import Network.Wreq import Control.Lens import qualified Data.ByteString.Lazy as LBS import qualified Data.Text as T import Data.List ((\\)) import Types import Util eveScoutApiWormholes :: String eveScoutApiW...
Frefreak/Gideon
src/Thera.hs
bsd-3-clause
1,994
0
20
385
579
304
275
-1
-1
-- | This module inplements keys. module Music.Diatonic.Key ( Key, majorKey, minorKey, center, key, parallel, relative, relativeMajor, relativeMinor, Signature, signature, sigDetails ) where import Music.Diatonic import Music.Diatonic.Scale import Data.List (sortBy) import Data.Maybe (fromJust)...
xpika/music-diatonic
Music/Diatonic/Key.hs
bsd-3-clause
3,916
0
19
1,101
1,380
728
652
87
2
{-# LANGUAGE BangPatterns, TemplateHaskell, TypeFamilies, TypeOperators, FlexibleContexts, UndecidableInstances, DeriveDataTypeable, MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} module Numeric.AD.Internal.Sparse ( Index(..) , emptyIndex , ...
yairchu/ad
src/Numeric/AD/Internal/Sparse.hs
bsd-3-clause
8,756
0
16
2,494
3,723
1,915
1,808
183
1
{-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE Rank2Types ...
kadena-io/pact
src-tool/Pact/Analyze/Model/Tags.hs
bsd-3-clause
10,510
0
23
2,722
3,025
1,565
1,460
-1
-1
----------------------------------------------------------------------------- -- | -- Module : XMonad.Actions.RandomBackground -- Description : Start terminals with a random background color. -- Copyright : (c) 2009 Anze Slosar -- translation to Haskell by Adam Vogt -- License : BSD3-style...
xmonad/xmonad-contrib
XMonad/Actions/RandomBackground.hs
bsd-3-clause
2,552
0
15
617
626
356
270
33
3
-- Kent-buggen -- Problem ID: kentbuggenTime limit: 6 secondsMemory limit: 1024 MB -- Indata: n (1≤n≤10^5) - antalet artister. Sedan följer n rader med namn. -- Utdata: antalet olika artistnamn som förekommer mer än en gång. import qualified Data.Map.Strict as Map type Namn = String solution :: [Namn] -> Int solutio...
patrikja/progolymp
onlinekval/2015/kentbuggen.hs
bsd-3-clause
696
0
10
128
187
103
84
15
1
-- Copyright (c) 2016-present, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. {-# LANGUAGE OverloadedStrings #-} module Duckling.AmountOfMoney.PT.Corpus ( corpus ) where import Data.Str...
facebookincubator/duckling
Duckling/AmountOfMoney/PT/Corpus.hs
bsd-3-clause
1,726
0
9
718
338
196
142
50
1
{-# LANGUAGE OverloadedStrings, TupleSections #-} -- | -- Copyright : 2012 Eric Kow (Computational Linguistics Ltd.) -- License : BSD3 -- Maintainer : eric.kow@gmail.com -- Stability : experimental -- Portability : portable -- -- Helper functions for the antfarm demonstrator. You probably don't want to -- imp...
kowey/antfarm
NLP/Antfarm/Demo.hs
bsd-3-clause
9,104
0
16
2,307
2,745
1,509
1,236
210
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE LambdaCase #-} module SystemFOmega where {- λ2 (System F Omega) k ::= ∗ | k → k kinds A ::= a | p | A → B | ∀a:k. A | λa:k.A | A B types e ::= x | λx:A.e | e e | Λa:k. e | e [A] ...
ak3n/lambda-zoo
src/SystemFOmega.hs
bsd-3-clause
6,744
0
19
2,287
2,896
1,411
1,485
229
28
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANG...
jgm/pandoc-citeproc
src/Text/CSL/Util.hs
bsd-3-clause
21,380
0
21
7,131
7,756
3,974
3,782
453
16
{-# language CPP #-} -- No documentation found for Chapter "InstanceCreateFlags" module Vulkan.Core10.Enums.InstanceCreateFlags (InstanceCreateFlags(..)) where import Vulkan.Internal.Utils (enumReadPrec) import Vulkan.Internal.Utils (enumShowsPrec) import GHC.Show (showString) import Numeric (showHex) import Vulkan.Z...
expipiplus1/vulkan
src/Vulkan/Core10/Enums/InstanceCreateFlags.hs
bsd-3-clause
1,882
0
10
360
305
184
121
-1
-1
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE OverloadedStrings #-} module Tut.Repl where import Prelude hiding (fail) import Tut.Misc hiding (fail) import Tut.Transformation import Text.Pandoc import Data.List (groupBy, delete) import qualified Data.Text as T import Data.Bool(bool) import Data.Function(on) --TO...
aaronvargo/htut
src/Tut/Repl.hs
bsd-3-clause
2,625
0
23
908
850
434
416
77
4
#!/usr/bin/env runghc {-# LANGUAGE OverloadedStrings, NoImplicitPrelude #-} module Main where import BasicPrelude import Util import Menu import Weight (runWeightRoutine) import Food (runFoodRoutine) import Data.Default (def) import System.IO(stdout, stdin, hSetBuffering, BufferMode(..)) data MainMenuCommand = MM...
mindreader/iron-tracker
Main.hs
bsd-3-clause
871
0
14
190
237
130
107
28
4
{-# LANGUAGE RankNTypes, DeriveDataTypeable, GeneralizedNewtypeDeriving, RecordWildCards, NoImplicitPrelude #-} module Json.Internal.Types ( -- * Core JSON types Json(..), Object, Array, -- * Parsing types Parser(..), JsonPathElement(..), JsonPath, -- * Encoding\/decoding configuration Options...
aelve/json-x
lib/Json/Internal/Types.hs
bsd-3-clause
9,235
0
25
2,505
1,958
1,102
856
-1
-1
module Main where main :: IO () main = someFunc
bgwines/avalon-meta-comparison
app/Main.hs
bsd-3-clause
49
0
6
11
19
11
8
3
1
{-| Copyright : (c) Dave Laing, 2017 License : BSD3 Maintainer : dave.laing.80@gmail.com Stability : experimental Portability : non-portable -} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeFamilies #-} module Fragment.SystemFw.Rules ( RSystemFw ) where import GHC.Exts (Co...
dalaing/type-systems
src/Fragment/SystemFw/Rules.hs
bsd-3-clause
1,472
1
8
241
385
212
173
-1
-1
-- | -- Module: Math.NumberTheory.Primes.Counting -- Copyright: (c) 2011 Daniel Fischer -- Licence: MIT -- Maintainer: Daniel Fischer <daniel.is.fischer@googlemail.com> -- Stability: Provisional -- Portability: non-portable -- -- Number of primes not exceeding @n@, @&#960;(n)@, and @n@-th prime; also fast...
shlevy/arithmoi
Math/NumberTheory/Primes/Counting.hs
mit
656
0
4
116
50
39
11
8
0
-- Copyright (c) Microsoft. All rights reserved. -- Licensed under the MIT license. See LICENSE file in the project root for full license information. {-# LANGUAGE OverloadedStrings #-} {-| Copyright : (c) Microsoft License : MIT Maintainer : adamsap@microsoft.com Stability : provisional Portability : portab...
alfpark/bond
compiler/src/Language/Bond/Util.hs
mit
2,991
0
9
723
591
317
274
45
1
{-# LANGUAGE CPP #-} module Buildsome.Opts ( OverwriteUnregisteredOutputs(..) , UpdateGitIgnore(..) , KeepGoing(..) , Color(..) , Opt(..) , CompatMakefile(..) , ExtraOutputs(..), extraOutputsAtFilePaths , Opts(..), get , PrintCommands(..) , PrintOutputs(..) , Verbosity(..) ) where import Prelud...
buildsome/buildsome
src/Buildsome/Opts.hs
gpl-2.0
7,671
0
24
2,465
1,475
783
692
176
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-cloudhsm/gen/Network/AWS/CloudHSM/CreateLunaClient.hs
mpl-2.0
4,620
0
13
1,047
667
397
270
88
1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE MagicHash #-} ----------------------------------------------------------------------------- -- | -- Module : Data.IntUnique -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- An abstract interface ...
deepfire/mood
src/Data/IntUnique.hs
agpl-3.0
1,631
0
14
319
183
113
70
18
1
{-| Utility functions for MonadPlus operations -} {- Copyright (C) 2014 Google Inc. 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 retain the above copyright n...
mbakke/ganeti
src/Ganeti/Utils/Monad.hs
bsd-2-clause
3,486
0
15
780
671
358
313
36
2
{-# LANGUAGE CPP #-} module Util.System(tempfile,withTempdir,rmFile,catchIO, isWindows, writeSource, readSource, setupBundledCC) where -- System helper functions. import Control.Monad (when) import System.Directory (getTemporaryDirectory , removeFile , re...
BartAdv/Idris-dev
src/Util/System.hs
bsd-3-clause
3,170
0
14
1,147
729
375
354
46
2
module Grains (square, total) where square :: Int -> Integer square = (2 ^) . pred total :: Integer total = pred $ 2 ^ (64 :: Int)
pminten/xhaskell
grains/example.hs
mit
133
0
6
30
58
35
23
5
1
{-# language DeriveDataTypeable, ScopedTypeVariables #-} import Data.Aeson import qualified Data.ByteString.Lazy.Char8 as BSL import Text.Logging import System.IO import System.Console.CmdArgs import System.Directory import System.FilePath import Network.URI import Network.Fancy import Network.Server import Utils...
changlinli/nikki
src/LevelServer.hs
lgpl-3.0
2,724
1
15
675
742
375
367
73
3
{-# LANGUAGE BangPatterns, RankNTypes #-} {-| Space efficient bit arrays The module is meant to be imported qualified (as it is common with collection libraries). -} {- Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without mo...
mbakke/ganeti
src/Ganeti/Objects/BitArray.hs
bsd-2-clause
5,151
0
13
1,180
1,183
634
549
84
2
-- | -- Module : $Header$ -- Copyright : (c) 2013-2015 Galois, Inc. -- License : BSD3 -- Maintainer : cryptol@galois.com -- Stability : provisional -- Portability : portable {-# LANGUAGE Safe #-} module Cryptol.Version ( commitHash , commitShortHash , commitBranch , commitDirty , versi...
iblumenfeld/cryptol
src/Cryptol/Version.hs
bsd-3-clause
591
0
6
119
91
58
33
17
1
module Main where import Lab.Core.Main import Preamble main :: IO () main = labMain [ ]
irreverent-pixel-feats/bitbucket
bitbucket-optparse/test/test.hs
bsd-3-clause
99
0
6
27
33
19
14
6
1
-- Copyright (c) Microsoft. All rights reserved. -- Licensed under the MIT license. See LICENSE file in the project root for full license information. {-# LANGUAGE QuasiQuotes, OverloadedStrings, RecordWildCards #-} module Language.Bond.Codegen.Java.Util ( qualifiedDeclaredTypeName , generatedClassAnnotations...
chwarr/bond
compiler/src/Language/Bond/Codegen/Java/Util.hs
mit
3,043
0
10
386
528
298
230
53
2
{- (c) The University of Glasgow 2006 (c) The AQUA Project, Glasgow University, 1994-1998 Core-syntax unfoldings Unfoldings (which can travel across module boundaries) are in Core syntax (namely @CoreExpr@s). The type @Unfolding@ sits ``above'' simply-Core-expressions unfoldings, capturing ``higher-level'' things w...
green-haskell/ghc
compiler/coreSyn/CoreUnfold.hs
bsd-3-clause
61,030
0
19
17,831
7,058
3,725
3,333
522
32
{-# LANGUAGE CPP, GeneralizedNewtypeDeriving #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Hooks.DebugEvents -- Copyright : (c) Brandon S Allbery KF8NH, 2012 -- License : BSD3-style (see LICENSE) -- -- Maintainer : allbery.b@gmail.com -- Stabil...
pjones/xmonad-test
vendor/xmonad-contrib/XMonad/Hooks/DebugEvents.hs
bsd-2-clause
54,476
0
37
26,748
11,566
6,027
5,539
-1
-1
-- | Trivial test for effects module Eff0 (test0, test1) where import Data.IORef {-@ type IntN N = {v:Int | v = N} @-} {-@ test0 :: IO (IntN {0}) @-} test0 :: IO Int test0 = do p <- newIORef 0 _ <- writeIORef p 10 v1 <- readIORef p return v1 {-@ test1 :: IO (IntN {0}, IntN {10...
mightymoose/liquidhaskell
tests/todo/Eff2.hs
bsd-3-clause
500
0
8
183
145
71
74
13
1
{-# LANGUAGE RecordWildCards, NamedFieldPuns, RecursiveDo #-} module Distribution.Server.Features.Sitemap ( SitemapFeature(..) , initSitemapFeature ) where import Distribution.Server.Framework import Distribution.Server.Features.Sitemap.Functions import Distribution.Server.Features.Core import Distribution.Serv...
ocharles/hackage-server
Distribution/Server/Features/Sitemap.hs
bsd-3-clause
7,524
0
16
2,263
1,268
702
566
159
1
import Control.Exception import GHC.Compact data HiddenFunction = HiddenFunction (Int -> Int) main = compact (HiddenFunction (+1))
ezyang/ghc
libraries/ghc-compact/tests/compact_function.hs
bsd-3-clause
133
0
8
18
45
25
20
4
1
{-# OPTIONS_GHC -ddump-rn -ddump-splices #-} {-# LANGUAGE TemplateHaskell, TypeFamilies #-} module T7532 where import Language.Haskell.TH import T7532a instance C Bool where data D Bool = MkD $(bang')
olsner/ghc
testsuite/tests/th/T7532.hs
bsd-3-clause
206
0
6
32
41
23
18
8
0
module Yage.Texture.CubeImageLayout where import Quine.Cubemap import Yage.Lens import Yage.Math import Yage.Image import Yage.Prelude import Yage.Geometry.D2.Rectangle data CubeImageLayout = HorizontalCross | VerticalCross | Strip deriving ( Show, Read, O...
MaxDaten/yage
src/Yage/Texture/CubeImageLayout.hs
mit
2,547
0
12
776
949
503
446
-1
-1
module TestParse where import Control.Monad (zipWithM_) import Text.XML.Light import Web.WeChat.XMLParse test :: IO () test = do x <- readFile "test.xml" let contents = onlyElems $ parseXML x zipWithM_ (\i elt -> putStr (show i ++ " ") >> print (parseInMessage' elt)) [1..] $ contents
Vlix/wechat
TestParse.hs
mit
296
0
15
56
118
61
57
9
1
import Graphics.UI.GLUT hiding (position) import qualified Graphics.Rendering.OpenGL.GLU as GLU import Control.OldException import Control.Monad import System.Exit import Prelude hiding (catch) import Data.IORef import Data.List import Data.Maybe import System.Process -- import Graphics.Rendering.Ope...
spetz911/progames
_src/shuting.hs
mit
17,604
3
20
4,069
7,392
4,096
3,296
396
43
module Trace where import Control.Applicative import Control.Monad (liftM) import Data.Maybe (fromMaybe) import Language.ECMAScript3 import Language.ECMAScript3.PrettyPrint (Pretty, prettyPrint) import Language.ECMAScript3.Syntax.Annotations (getAnnotation, reannotate) import Text.Parsec.Pos (sourceLine, sourceColumn...
heyLu/tracing-js
Trace.hs
mit
3,823
0
14
704
1,709
854
855
66
1
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.SVGFEComponentTransferElement (js_getIn1, getIn1, SVGFEComponentTransferElement, castToSVGFEComponentTransferElement, gTypeSVGFEComponentTransferElement) where import Prelude ((.), (=...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/JSFFI/Generated/SVGFEComponentTransferElement.hs
mit
1,521
6
11
186
377
238
139
27
1
main = readFile "067.txt" >>= print . foldr1 f . map (map read . words) . lines f x y = zipWith (+) x . zipWith max y $ tail y
nickspinale/euler
complete/067.hs
mit
128
0
10
32
75
35
40
2
1
{-# LANGUAGE OverloadedStrings #-} import Conduit (ConduitT, Void, await, connect, liftIO, ($$+), ($$+-), (.|)) import Control.Applicative ((<$>)) import Control.Concurrent (forkIO) import Control.Concurr...
rnons/shadowsocks-haskell
app/server.hs
mit
3,822
0
19
1,374
996
521
475
71
2
bmi :: Double -> Double -> Double bmi h w = w / (h / 100) ^2 isObase :: Double -> Double -> Bool isObase h w = bmi h w >= 25
threetreeslight/learning-haskell
practice/bmi.hs
mit
126
0
8
34
71
36
35
4
1
sumSquare n = sum [x | y <- [1..n], let x = y*y] squareSum n = (sum [1..n]) * (sum [1..n]) problem6 n = squareSum n - sumSquare n
danhaller/euler-haskell
6.hs
mit
131
0
11
30
94
47
47
3
1
{-# LANGUAGE NoMonomorphismRestriction, LambdaCase, RankNTypes #-} module UnionFind (Ufr, newUfr, readUfr, writeUfr, modifyUfr, mergeUfr, equalUfr) where import Control.Applicative import Control.Monad import Control.Monad.ST import Control.Monad.ST.Class import Data.STRef import Useful data Path s a = PE...
vizziv/Twocan
unionfind.hs
mit
2,505
0
18
857
811
401
410
-1
-1
{-# LANGUAGE MultiParamTypeClasses , CPP , ForeignFunctionInterface , FlexibleInstances , GeneralizedNewtypeDeriving #-} module OSGeo.Proj4 ( Projection , Projectable (transform) , projection , isLatLong , toRadian , fromRadian ) where import Foreign...
meteogrid/bindings-proj4
OSGeo/Proj4.hs
mit
3,560
0
25
1,059
1,020
518
502
-1
-1
{-# LANGUAGE OverloadedStrings #-} module KnobSpec ( main, spec ) where import Control.Monad.IO.Class (liftIO) import qualified Data.ByteString import Data.ByteString.Char8 () import Data.ByteString.Unsafe (unsafePackCStringLen) import Foreign (nullPtr) import ...
fujimura/knob
test/KnobSpec.hs
mit
2,273
0
12
577
686
327
359
64
1
module Main where import Haste import Haste.Graphics.Canvas main = do Just canvas <- getCanvasById "canvas" animate canvas 0 square = do rect (-120, -120) (120, 120) rect (-30, -30) (30, 30) animate canvas angle = do render canvas $ translate (190, 190) $ rotate angle $ stroke square setTim...
laser/haste-experiment
demos/canvas/canvas.hs
mit
364
0
11
89
157
79
78
16
1
{- | Module : $Header$ Description : Interface to the Leo II theorem prover. Copyright : (c) Jonathan von Schroeder, DFKI Bremen 2012 License : GPLv2 or higher, see LICENSE.txt Maintainer : Jonathan von Schroeder <jonathan.von_schroeder@dfki.de> Stability : provisional Portability : non-portable ...
nevrenato/HetsAlloy
THF/ProveLeoII.hs
gpl-2.0
1,513
4
12
428
298
163
135
29
3
module C ( declare, Type(..), CFunction(..) ) where import Expression ( Code(..) ) -- Type None means it is a constructor or destructor data Type = Void | Double | Int | Vector | ComplexVector | ConstCharPtr | Bool | EnergyGradAndPrecond | None | Reference Type instance Code Type where codePrec _ Void ...
droundy/deft
src/haskell/C.hs
gpl-2.0
2,806
0
18
547
911
457
454
57
1
module Search2 where -- ToDO: Create all game tree for -- -- position fen 1r2k3/2q5/8/8/8/K7/8/8 w - - 0 1 moves a3a4 -- -- Check for which of the nodes is children == [] but isCheckMate == False import Data.Tree.Game_tree.Game_tree import Data.Tree.Game_tree.Negascout import Board import Pieces import Evaluator imp...
adityashah30/haskellchess
chessEngine/Search2.hs
gpl-2.0
3,972
0
15
1,456
1,144
582
562
72
2
{- | Module : FMP.Matrix Copyright : (c) 2003-2010 Peter Simons (c) 2002-2003 Ferenc Wágner (c) 2002-2003 Meik Hellmund (c) 1998-2002 Ralf Hinze (c) 1998-2002 Joachim Korittky (c) 1998-2002 Marco Kuhlmann License...
peti/funcmp
FMP/Matrix.hs
gpl-3.0
5,379
0
18
2,636
1,498
787
711
74
11
{-| Module : System.Arte.TimeSync Description : Facilities for synchronizing with arte network time Copyright : (c) Greg Hale, 2015 Shea Levy, 2015 License : BSD3 Maintainer : imalsogreg@gmail.com Stability : experimental Portability : GHC, Linux -} {-# LANGUAGE RecordWildCards #-} mod...
imalsogreg/arte-ephys
arte-lib/src/System/Arte/TimeSync.hs
gpl-3.0
3,009
0
14
699
516
264
252
60
2
-- GnUtils, utils for a haskell implementation of GNU core-utils. {-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-} module GnUtils where import Data.List -- these could be consolidated by just returning "" if no help is to be shown rather than checking then displaying doHelp :: ProgramData -> Bool doHelp (Pr...
PuZZleDucK/Hls
GnUtils.hs
gpl-3.0
11,149
0
16
2,359
3,425
1,830
1,595
206
3
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} ----------------------------------------------------------------------------- -- | -- Module : HEP.Automation.EventGeneration.Util -- Copyright : (c) 2011-2013 Ian-Woo Kim -- -- License : GPL-3 -- Maintainer : Ian-Woo Kim <ianwookim@gmail....
wavewave/pipeline-eventgen
lib/HEP/Automation/EventGeneration/Util.hs
gpl-3.0
1,813
0
13
435
391
204
187
37
1
{-# LANGUAGE OverloadedStrings #-} module View.Error where import Data.Text import Text.Blaze (toValue) import Text.Blaze.Html5 import Text.Blaze.Html5.Attributes show :: Text -> Html show error = do p $ toHtml error
bitraten/hands
src/View/Error.hs
gpl-3.0
223
0
8
35
62
36
26
9
1
----------------------------------------------------------------------------- -- | -- Module : Numeric.LinearAlgebra.Static -- Copyright : (c) Reiner Pope 2008 -- License : GPL-style -- -- Maintainer : Reiner Pope <reiner.pope@gmail.com> -- Stability : experimental -- Portability : portable -- -- Ma...
reinerp/hmatrix-static
Numeric/LinearAlgebra/Static.hs
gpl-3.0
640
0
5
81
51
40
11
5
0
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ExtendedDefaultRules #-} {-# OPTIONS_GHC -fno-warn-type-defaults #-} module Languages where import Data.Monoid ((<>)) import Data.Text (Text) import Prelude hiding (FilePath) import Shelly (FilePath,(<.>),(</>)) import qualified Data.Text as T import Predictability (Ex...
gdetrez/rgl-stats
Languages.hs
gpl-3.0
2,757
0
11
589
812
453
359
80
1
module Mescaline.Application.Logger ( module System.Log.Logger , module System.Log.Formatter , module System.Log.Handler.Simple ) where import Control.Monad.Error import Data.Char (toUpper) import qualified Data.ConfigFile as Config import qualified Mescaline.Application.Config as Config im...
kaoskorobase/mescaline
lib/mescaline/Mescaline/Application/Logger.hs
gpl-3.0
798
0
15
195
201
118
83
18
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-file/gen/Network/Google/Resource/File/Projects/Locations/Operations/Cancel.hs
mpl-2.0
6,594
0
16
1,356
794
470
324
115
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-ec2/gen/Network/AWS/EC2/DeleteVolume.hs
mpl-2.0
3,570
0
9
768
402
247
155
51
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.ServiceUser.Types -- Copyright : (c) 2015-2016 Brendan...
brendanhay/gogol
gogol-serviceuser/gen/Network/Google/ServiceUser/Types.hs
mpl-2.0
10,550
0
7
3,109
1,370
943
427
393
1
----------------------------------------------------------------------------- -- Copyright 2012 Microsoft Corporation. -- -- This is free software; you can redistribute it and/or modify it under the -- terms of the Apache License, Version 2.0. A copy of the License can be -- found in the file "license.txt" at the root ...
lpeterse/koka
src/Compiler/Module.hs
apache-2.0
5,977
0
18
1,832
1,167
658
509
110
2
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoMonoLocalBinds #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE TypeFamilies #-}...
yliu120/K3
src/Language/K3/Parser.hs
apache-2.0
50,879
0
19
12,323
17,048
8,810
8,238
-1
-1
-- cabal-helper: Simple interface to Cabal's configuration state -- Copyright (C) 2015-2019 Daniel Gröber <cabal-helper@dxld.at> -- -- SPDX-License-Identifier: Apache-2.0 -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may...
DanielG/cabal-helper
lib/Distribution/Helper.hs
apache-2.0
29,714
318
25
7,204
6,665
3,630
3,035
664
11
module Language.P4.Parser.Tokens ( Token(..) , TokenName(..) , Position(..) , tokenString ) where import Text.Printf tokenString :: Token -> String tokenString (Token _ s _) = s data Position = Position String Int Int deriving Eq instance Show Position where show (Position f l c) = printf "%s:%d:%d" f l...
brooksbp/P4
src/Language/P4/Parser/Tokens.hs
apache-2.0
2,019
0
8
501
468
296
172
118
1
-- TODO: Clean up imports import Control.Concurrent.STM import Control.Exception (bracket) import Control.Concurrent.ThreadPool as ThreadPool import qualified Data.CaseInsensitive as CI import Data.Conduit (runResourceT) import Data.List (nub) import Data.Function (on) import Data.Maybe (maybeToList, catMaybes) import ...
frerich/lambdacrawler
src/Main.hs
bsd-3-clause
6,111
20
14
1,589
1,555
814
741
110
3
module Main where import Test.DocTest main :: IO () main = doctest[ "src/Okasaki/List.hs" , "src/Okasaki/BinaryTree.hs" , "src/Okasaki/LeftistHeap.hs" ]
shuhei/okasaki
test/doctest.hs
bsd-3-clause
197
0
6
62
36
21
15
6
1
-- Copyright (c) 2014-present, Facebook, Inc. -- All rights reserved. -- -- This source code is distributed under the terms of a BSD license, -- found in the LICENSE file. {-# LANGUAGE CPP #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} -- | Psuedo-parallel operat...
facebook/Haxl
Haxl/Core/Parallel.hs
bsd-3-clause
5,206
0
32
1,699
1,285
645
640
93
12
module WordNumber where import Data.List (intersperse) digitToWord :: Int -> String digitToWord 0 = "zero" digitToWord 1 = "one" digitToWord 2 = "two" digitToWord 3 = "three" digitToWord 4 = "four" digitToWord 5 = "five" digitToWord 6 = "six" digitToWord 7 = "seven" digitToWord 8 = "eight" digitToWord 9 = "nine" digi...
dsaenztagarro/haskellbook
src/chapter8/WordNumber.hs
bsd-3-clause
642
0
11
144
265
135
130
22
2
{-# Language PatternGuards #-} module Blub ( blub , foo , bar ) where -- | Some Haddock doc -- One line more f :: Int -> Int f = (+ 3) g :: Int -> Int g = where
dan-t/hsimport
tests/inputFiles/ModuleTest33.hs
bsd-3-clause
179
0
5
58
50
32
18
-1
-1
-- | -- Module : Crypto.Random.AESCtr.Internal -- License : BSD-style -- Maintainer : Vincent Hanquez <vincent@snarc.org> -- Stability : stable -- Portability : unknown -- {-# LANGUAGE CPP #-} {-# LANGUAGE BangPatterns #-} module Crypto.Random.AESCtr.Internal where import qualified Crypto.Cipher.AES as AES...
vincenthz/hs-cprng-aes
Crypto/Random/AESCtr/Internal.hs
bsd-3-clause
1,187
0
9
257
351
198
153
31
1
module Main where import Control.Monad (forM_) import Data.BloomFilter.Easy (easyList, elemB) import Data.BloomFilter.Hash (Hashable(..), hash64) import qualified Data.ByteString.Char8 as SB import qualified Data.ByteString.Lazy.Char8 as LB import Data.Int (Int8, Int16, Int32, Int64) import Data.Word (Word8, Word16, W...
brinchj/bloomfilter
tests/QC.hs
bsd-3-clause
2,519
0
14
492
907
491
416
-1
-1
{-# LANGUAGE CPP , OverloadedStrings , DataKinds , KindSignatures , GADTs #-} {-# OPTIONS_GHC -Wall -fwarn-tabs #-} module Language.Hakaru.Parser.SymbolResolve where import Data.Text hiding (concat, map, maximum, foldr1, singleton) #if __GLASGOW_HASKELL__ < 710 im...
zaxtax/hakaru
haskell/Language/Hakaru/Parser/SymbolResolve.hs
bsd-3-clause
24,674
2
17
7,586
9,617
4,855
4,762
546
30
{-# LANGUAGE OverloadedStrings #-} module State ( doit ) where import Control.Monad import Control.Monad.IO.Class import Control.Monad.Trans.Resource import qualified Data.ByteString as B import Data.Default import qualified Database.LevelDB as DB import System.Directory import System.FilePath import qualified D...
jamshidh/ethereum-query
src/State.hs
bsd-3-clause
2,718
0
19
449
634
333
301
59
2
{-# language CPP #-} {-# language QuasiQuotes #-} {-# language TemplateHaskell #-} #if __GLASGOW_HASKELL__ >= 800 {-# options_ghc -Wno-redundant-constraints #-} #endif {- | Operations on arrays -} module OpenCV.Core.ArrayOps ( -- * Per element operations -- $per_element_intro matScalarAdd , matSca...
lukexi/haskell-opencv
src/OpenCV/Core/ArrayOps.hs
bsd-3-clause
25,359
0
26
6,897
3,545
1,884
1,661
-1
-1
----------------------------------------------------------------------------- -- | -- Module : Text.OrgMode -- Copyright : (c) Brent Yorgey 2010 -- License : BSD3-style (see LICENSE) -- -- Maintainer : byorgey@gmail.com -- Stability : experimental -- Portability : -- -- Tools for working with emacs o...
cvb/hs-orgmode
Text/OrgMode.hs
bsd-3-clause
555
0
3
82
21
19
2
1
0