code
stringlengths
5
1.03M
repo_name
stringlengths
5
90
path
stringlengths
4
158
license
stringclasses
15 values
size
int64
5
1.03M
n_ast_errors
int64
0
53.9k
ast_max_depth
int64
2
4.17k
n_whitespaces
int64
0
365k
n_ast_nodes
int64
3
317k
n_ast_terminals
int64
1
171k
n_ast_nonterminals
int64
1
146k
loc
int64
-1
37.3k
cycloplexity
int64
-1
1.31k
module Language.Haskell.Inspector ( hasComposition, hasGuards, hasIf, hasConditional, hasLambda, hasDirectRecursion, hasUsage, hasComprehension, hasBinding, hasTypeDeclaration, hasTypeSignature, hasAnonymousVariable, hasExpression, hasDecl, hasRhs, isParseable, Inspection, GlobalInsp...
flbulgarelli/hs-inspector
src/Language/Haskell/Inspector.hs
mit
3,260
0
15
716
812
432
380
76
2
{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances #-} {- | Module : ./OWL2/Propositional2OWL2.hs Description : Comorphism from Propostional Logic to OWL 2 Copyright : (c) Felix Gabriel Mance License : GPLv2 or higher, see LICENSE.txt Maintainer : f.mance@jacobs-university.de ...
gnn/Hets
OWL2/Propositional2OWL2.hs
gpl-2.0
3,922
0
11
719
934
495
439
93
8
import Data.List main :: IO () main = readLn >>= print . solve -- Take the sum of all diagonal numbers solve :: Int -> Integer solve p = sum [ l !! i | i <- indices p ] where l = [1..] -- The list [2,4,...(p-1)] represents the gaps between the spiral numbers -- in every square. -- These gaps each happe...
NorfairKing/project-euler
028/haskell/solution.hs
gpl-2.0
506
0
9
116
145
80
65
8
1
-- The fraction 49/98 is a curious fraction, as an inexperienced mathematician in attempting to simplify it may incorrectly believe that 49/98 = 4/8, which is correct, is obtained by cancelling the 9s. -- -- We shall consider fractions like, 30/50 = 3/5, to be trivial examples. -- -- There are exactly four non-trivia...
ciderpunx/project_euler_in_haskell
euler033.hs
gpl-2.0
1,404
0
12
388
269
157
112
17
1
module NLP.Summarizer.Arguments where import Data.Text (Text) data Ratio = RatioByPercent Int | RatioByLines Int deriving Show data SummarizerArguments = SummarizerArguments { dictionaryLanguage :: Text , inputString :: Text , ratio :: Ratio } d...
rainbyte/summarizer
src/NLP/Summarizer/Arguments.hs
gpl-3.0
333
0
8
110
64
40
24
9
0
{-# LANGUAGE DeriveFoldable #-} module A2List where import A1Nat data List a = Nil | a `Cons` List a deriving (Show, Eq, Ord, Foldable) infixr 5 `Cons` append :: List a -> List a -> List a Nil `append` ys = ys (x `Cons` xs) `append` ys = x `Cons` (xs `append` ys) data Perhaps a = ...
alexander-b/thug-beginners
solutions/A2List.hs
gpl-3.0
3,230
0
9
1,022
1,484
783
701
84
2
{-# LANGUAGE QuasiQuotes #-} import Codec.Rga.Parser import Quote import Control.Monad import Data.List import Data.String.Interpolation import Triangulation import Data.Binary import Control.Applicative import Data.Ord import Util import Codec.Compression.GZip tetsp p = p . tNumberOfTetrahedra_ . snd maxTets n = filt...
DanielSchuessler/hstri
import-census.hs
gpl-3.0
1,799
0
16
464
350
179
171
34
1
module Hive.Data.Queue ( Queue , mkEmpty , isEmpty , insert , peak , size , remove ) where ------------------------------------------------------------------------------- data Queue a = Queue [a] [a] ------------------------------------------------------------------------------- mkEmpty :: Queue a...
chrisbloecker/Hive
src/Hive/Data/Queue.hs
gpl-3.0
874
0
9
190
370
192
178
24
1
module OSC.UDPSocket( udpSocket , udpSocketWithHandler , sendBytes , sendEmpty , UdpOscHandle ) where import qualified Control.Monad as M (when) import qualified Control.Concurrent as C (forkIO, forkFinally) import qualified Network.Socket as S hiding (send, send...
destroyhimmyrobots/osc.hs
OSC/UDPSocket.hs
gpl-3.0
2,305
47
14
496
612
352
260
48
1
module Hadolint.Process (run, RulesConfig (..)) where import qualified Control.Foldl as Foldl import qualified Data.IntMap.Strict as SMap import qualified Data.Sequence as Seq import qualified Data.Set as Set import qualified Data.Text as Text import qualified Hadolint.Ignore import Hadolint.Rule (CheckFailure (..), F...
lukasmartinelli/hadolint
src/Hadolint/Process.hs
gpl-3.0
7,110
0
69
1,024
1,636
1,006
630
-1
-1
module Main where import Data.Char import Data.List import Data.Ord intToList 0 = [] intToList a = ( intToDigit (fromIntegral l)) : intToList r where l = a `mod` 10 r = a `div` 10 isGood :: String -> Bool isGood = (== ['1'..'9']) --check :: Integer -> Integer -> Integer -> [(Integer , Integer...
knotman90/google-interview
problems/project_euler/euler.hs
gpl-3.0
5,368
1
17
1,482
2,705
1,423
1,282
110
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-toolresults/gen/Network/Google/Resource/ToolResults/Projects/Histories/Executions/Steps/GetPerfMetricsSummary.hs
mpl-2.0
5,690
0
19
1,253
548
326
222
101
1
import System.IO main = do todoItem <- getLine appendFile "./Learn_You_a_Haskell_programs/todo.txt" (todoItem ++ "\n")
haroldcarr/learn-haskell-coq-ml-etc
haskell/book/2011-Learn_You_a_Haskell/appendtodo.hs
unlicense
127
1
10
21
37
16
21
4
1
module Brainfuck.Pointer (Pointer) where type Pointer = Int
expede/brainfucker
src/Brainfuck/Pointer.hs
apache-2.0
61
0
4
9
17
11
6
2
0
module Log where import Control.Applicative import Control.Monad -- Simplified version of State Monad type Log = [String] newtype Logger a = Logger { run :: (a, Log)} -- data vs newtype? instance (Show a) => Show (Logger a) where show (Logger a) = show a instance (Eq a) => Eq (Logger a) where Logger (x,...
riccardotommasini/plp16
haskell/prepared/ESE20181213/log.hs
apache-2.0
5,895
14
15
1,564
1,719
878
841
-1
-1
-- lets put it all toghether module Wholemeal where -- aparently this is bad Haskell style foobar :: [Integer] -> Integer foobar [] = 0 foobar (x:xs) | x > 3 = (7*x + 2) + foobar xs | otherwise = foobar xs -- we can do the above, as a series of functions -- to create a single partial function foobar' :: ...
markmandel/cis194
src/week2/lecture/Wholemeal.hs
apache-2.0
391
0
10
94
135
74
61
8
1
module Emulator.CPU.Instructions.Types where import Emulator.CPU import Emulator.Types import Data.Int import GHC.Read data CPUMode = ARM | THUMB deriving (Show, Read, Eq, Ord) type ARM = 'ARM type THUMB = 'THUMB newtype SetCondition = SetCondition Bool deriving (Show, Read, Eq, Ord) data LoadStore = Load | S...
intolerable/GroupProject
src/Emulator/CPU/Instructions/Types.hs
bsd-2-clause
1,794
0
10
346
626
355
271
-1
-1
module RomanNumerals where solution :: Integer -> String solution n | n >= 1000 = 'M':solution (n - 1000) | n >= 900 = 'C':'M':solution (n - 900) | n >= 500 = 'D':solution (n - 500) | n >= 400 = 'C':'D':solution (n - 400) | n >= 100 = 'C':solution (n - 100) | n >= 90 = 'X':'C':solution (n...
lisphacker/codewars
RomanNumerals.hs
bsd-2-clause
636
0
9
212
402
195
207
17
1
module Drasil.Projectile.TMods (tMods, accelerationTM, velocityTM) where import Language.Drasil import Theory.Drasil (TheoryModel, tm) import Data.Drasil.Quantities.Physics (acceleration, position, time, velocity) import Drasil.Projectile.References (accelerationWiki, velocityWiki, hibbeler2004) tMods :: [TheoryMode...
JacquesCarette/literate-scientific-software
code/drasil-example/Drasil/Projectile/TMods.hs
bsd-2-clause
1,226
0
9
153
390
215
175
23
1
-- | -- Thorn, Datatype Manipulation with Template Haskell. module Data.Thorn ( -- * Functors module Data.Thorn.Functor -- * Folding and Unfolding , module Data.Thorn.Fold -- * Zippers , module Data.Thorn.Zipper -- * Basic , module Data.Thorn.Basic ) where import Data.Thorn.Functor import ...
Kinokkory/thorn
Data/Thorn.hs
bsd-3-clause
386
0
5
78
66
47
19
9
0
module Flows ( Flow (..) , FlowGroup , User , Host , Port , intersection , null , all , isSubFlow , isOverlapped , make , simple , toMatch , toMatch' , flowSwitchMatch , fromSwitchMatch , fromMatch ) where import Prelude hiding (null, all) import Data.Word (Word16) import Set (Set) ...
brownsys/pane
src/Flows.hs
bsd-3-clause
5,237
0
17
1,519
1,556
820
736
117
6
-- | This module provides common functionality for abstract states. module Jat.PState.Fun ( mkInstance , mkAbsInstance , mergeStates , Correlation (..) , mergeStates' , mkGetField , mkPutField , pState2TRS , instruction , isTerminal , isSimilar {-, isBackJump-} , isTarget , maybePutFiel...
ComputationWithBoundedResources/jat
src/Jat/PState/Fun.hs
bsd-3-clause
17,186
0
18
4,578
6,421
3,251
3,170
-1
-1
import QuickCheck import Test.QuickCheck import HUnit import Test.HUnit main :: IO Counts main = do --TEST 1 --idempotency — applying a function twice has the same result as applying it only once quickCheck idempotent_quicksort quickCheck idempotent_bubblesort quickCheck idempotent_insertionsort quickCheck...
Regulareveryday/our_sorting_algos
test/MainTest.hs
bsd-3-clause
2,824
1
10
398
331
141
190
39
1
{-# LANGUAGE TypeOperators, TypeFamilies #-} module Control.Monad.Unpack.Class where import Control.Applicative import Control.Monad.Trans.Class class Unpackable arg where data UnpackedReaderT arg :: (* -> *) -> * -> * runUnpackedReaderT :: UnpackedReaderT arg m a -> arg -> m a unpackedReaderT :: (arg -> m a) -...
lowasser/unpack-funcs
Control/Monad/Unpack/Class.hs
bsd-3-clause
1,465
1
13
284
494
254
240
32
1
module Main where import Scheme import System.Environment main:: IO () main = getArgs >>= print . eval . readExpr . head -- do -- (expr:_) <- getArgs -- print $ eval $ readExpr $ head expr
Parajao/Scheme
src/Main.hs
bsd-3-clause
227
0
8
74
46
27
19
5
1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} module Heist.Splices.Json ( bindJson ) where ------------------------------------------------------------------------------ import Control.Monad.Reader import Data.Aeson import qualifie...
snapframework/heist
src/Heist/Splices/Json.hs
bsd-3-clause
8,551
0
16
2,592
1,727
900
827
126
6
----------------------------------------------------------------------------- -- | -- Module : -- Copyright : (c) 2012 Boyun Tang -- License : BSD-style -- Maintainer : tangboyun@hotmail.com -- Stability : experimental -- Portability : ghc -- -- -- ---------------------------------------------------------------------...
tangboyun/bio-web-api
Bio/Web/MicroTV4/Types.hs
bsd-3-clause
2,362
0
12
606
542
322
220
134
0
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-...
trskop/yx
src/YX/Type/RuntimeConfig.hs
bsd-3-clause
4,033
5
28
988
929
521
408
96
5
{-# LANGUAGE LambdaCase #-} module Main where import Control.Monad ( filterM, foldM, join, unless ) import Control.Monad.IO.Class (liftIO) import Data.List ( isPrefixOf, intercalate, sort ) import Data.Maybe ( fromMaybe ) import System.Directory ( getCurrentDirectory, findExecutable, listDirectory ...
GaloisInc/saw-script
intTests/IntegrationTest.hs
bsd-3-clause
9,405
0
20
2,343
2,019
1,067
952
125
4
{- Directive to allow Text and String to be mixed -} {-# LANGUAGE OverloadedStrings #-} module Dropbox.Types ( DropboxSession (..) , AccountInfo , Quota , Metadata , Content , SessionId ) where...
tinkhaven/haskell-dropbox-api
Dropbox/Types.hs
bsd-3-clause
1,128
0
9
460
198
131
67
22
0
module Main where import Lib import VCard main :: IO () main = someFunc
illis/hbook
app/Main.hs
bsd-3-clause
74
0
6
16
25
15
10
5
1
{-# LANGUAGE RecordWildCards, NamedFieldPuns, OverloadedStrings #-} module Network.OAuth.Http.BrowserClient where import Network.OAuth.Http.HttpClient import Network.OAuth.Http.Request import Network.OAuth.Http.Response import qualified Network.HTTP as B import Data.ByteString.Lazy.Char8 hiding (map, empty, head, drop,...
konn/libkonn
src/Network/OAuth/Http/BrowserClient.hs
bsd-3-clause
2,586
1
16
550
908
500
408
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ExtendedDefaultRules #-} -- | We can't lens into DOM on the server-side, yet, so we've made some auxilliary functions -- for creating @row_@ @<div>@ tags, and some class names for creating columns. -- . -- Use them like this: -- . -- > div_ [class_ $ mconcat [ row_ -- >...
athanclark/lucid-foundation
src/Lucid/Foundation/Structure/Grid.hs
bsd-3-clause
3,125
0
9
784
711
393
318
63
1
{-# LANGUAGE GADTs #-} ------------------------------------------------------------------------------- -- | -- Module : Control.Monad.CC.Seq -- Copyright : (c) R. Kent Dybvig, Simon L. Peyton Jones and Amr Sabry -- License : MIT -- -- Maintainer : Dan Doel -- Stability : Experimental -- Portability : Non...
vito/hummus
src/Control/Monad/CC/Seq.hs
bsd-3-clause
2,930
0
14
713
601
331
270
37
2
{-# LANGUAGE TemplateHaskell #-} module Codegen.TigerSymbolTable where import Tiger.TigerLanguage import qualified LLVM.General.AST as AST import qualified LLVM.General.AST.Type as Type import qualified LLVM.General.AST.Constant as Constant import Control.Lens import qualified Data.Map as Map import Data.Map.Lens ...
lialan/TigerCompiler
app/Codegen/TigerSymbolTable.hs
bsd-3-clause
1,262
0
13
224
352
203
149
27
3
{-# LANGUAGE QuasiQuotes #-} module Init ( Init.createInstance , Init.createDevice , PhysicalDeviceInfo(..) , createVMA , createCommandPools ) where import Control.Applicative import Control.Monad.IO.Class import Control.Monad.Trans.Maybe ( MaybeT(..) ) import ...
expipiplus1/vulkan
examples/rays/Init.hs
bsd-3-clause
11,010
0
18
3,551
1,730
959
771
-1
-1
{-# OPTIONS #-} ----------------------------------------------------------------------------- -- | -- Module : Language.Python.Version2.Parser -- Copyright : (c) 2009 Bernie Pope -- License : BSD-style -- Maintainer : bjpop@csse.unimelb.edu.au -- Stability : experimental -- Portability : ghc -- -- A par...
jml/language-python
src/Language/Python/Version2/Parser.hs
bsd-3-clause
3,452
0
9
550
347
216
131
32
1
{-| Module : Data.Filterable Description : Generalization of filter function. Copyright : (c) Anton Gushcha, 2015-2016 Oganyan Levon, 2016 License : BSD3 Maintainer : ncrashed@gmail.com Stability : experimental Portability : POSIX Defines generic filter utilities for collections. -} mod...
Teaspot-Studio/gore-and-ash
src/Data/Filterable.hs
bsd-3-clause
2,902
0
15
660
860
463
397
-1
-1
class X where x :: Int <ESC>a{- | Another Class -}
itchyny/vim-haskell-indent
test/comment/top_level_block_comment.in.hs
mit
51
1
7
11
24
11
13
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- ...
fmapfmapfmap/amazonka
amazonka-elasticbeanstalk/gen/Network/AWS/ElasticBeanstalk/DeleteConfigurationTemplate.hs
mpl-2.0
4,310
0
9
772
445
272
173
65
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- ...
fmapfmapfmap/amazonka
amazonka-autoscaling/gen/Network/AWS/AutoScaling/DeleteNotificationConfiguration.hs
mpl-2.0
4,189
0
9
777
439
266
173
67
1
{-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE NamedFieldPuns, RecordWildCards, BangPatterns, StandaloneDeriving, GeneralizedNewtypeDeriving #-} module Distribution.Server.Features.EditCabalFiles ( initEditCabalFilesFeature , diffCabalRevisions , Change(..) ) where import Distribution.Serve...
haskell-infra/hackage-server
Distribution/Server/Features/EditCabalFiles.hs
bsd-3-clause
18,260
0
18
4,938
4,537
2,280
2,257
365
5
{-# LANGUAGE CPP #-} -- | Read and write JSMods. module Haste.Module (writeModule, readModule) where import Module (moduleNameSlashes, mkModuleName) import qualified Data.ByteString.Lazy as B import Control.Shell import Control.Applicative import Control.Monad (when, filterM) import Data.JSTarget import Data.Binary imp...
santolucito/haste-compiler
src/Haste/Module.hs
bsd-3-clause
4,776
0
20
1,252
1,321
673
648
93
5
{-#LANGUAGE NoImplicitPrelude #-} {-#LANGUAGE OverloadedStrings #-} {-#LANGUAGE OverloadedLists #-} {-#LANGUAGE LambdaCase #-} {-#LANGUAGE ScopedTypeVariables #-} {-#LANGUAGE FlexibleInstances #-} {-#LANGUAGE FlexibleContexts #-} {-#LANGUAGE MultiParamTypeClasses #-} {-#LANGUAGE TemplateHaskell #-} {-#LANGUAGE TypeAppl...
tdammers/templar
src/Web/Sprinkles/Bake.hs
bsd-3-clause
6,679
0
24
2,057
1,862
976
886
173
9
module Database.Persist.Redis.Internal ( toKey , unKey , mkEntity , toKeyId , toKeyText , toInsertFields , toB ) where import qualified Data.ByteString as B import qualified Data.ByteString.UTF8 as U import Data.Text (Text, unpack) import qualified Data.Text as T import Database.Persis...
creichert/persistent
persistent-redis/Database/Persist/Redis/Internal.hs
mit
2,625
0
12
538
860
453
407
58
2
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances, PatternGuards #-} module Text.Pandoc.Readers.Docx.Reducible ( concatReduce , (<+>) ) where import Text.Pandoc.Builder import Data.List import Data.Sequence (ViewR(..), ...
alexvong1995/pandoc
src/Text/Pandoc/Readers/Docx/Reducible.hs
gpl-2.0
5,674
80
19
1,886
2,283
1,190
1,093
145
2
{-# LANGUAGE OverloadedStrings #-} module SqliteInit ( (@/=), (@==), (==@) , asIO , assertNotEqual , assertNotEmpty , assertEmpty , isTravis , BackendMonad , runConn , MonadIO , persistSettings , MkPersistSettings (..) , db , sqlite_database , sqlite_database_file , BackendKey(..) , Ge...
creichert/persistent
persistent-sqlite/test/SqliteInit.hs
mit
2,710
0
12
444
739
456
283
83
2
<?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="fil-PH"> <title>Regular Expression Tester</title> <maps> <homeID>regextester</homeID> <...
thc202/zap-extensions
addOns/regextester/src/main/javahelp/help_fil_PH/helpset_fil_PH.hs
apache-2.0
979
89
29
157
391
210
181
-1
-1
-- In this example, remove 'Tree(Leaf,Branch)' from the export. Note that this -- refactoring does not handle sub entries in the export list and this may be -- improved in the future. module C3(sumTree, myFringe, SameOrNot(..)) where data Tree a = Leaf a | Branch (Tree a) (Tree a) sumTree:: (Num a) => Tree a -> ...
SAdams601/HaRe
old/testing/rmFromExport/C3_TokOut.hs
bsd-3-clause
668
0
8
154
234
124
110
14
1
module E4 where --Any type/data constructor name declared in this module can be renamed. --Any type variable can be renamed. --Rename type Constructor 'BTree' to 'MyBTree' data BTree a = Empty | T a (BTree a) (BTree a) deriving Show buildtree :: (Monad m, Ord a) => [a] -> m (BTree a) buildtree [] = ...
kmate/HaRe
old/testing/unfoldAsPatterns/E4.hs
bsd-3-clause
1,074
0
15
452
375
186
189
23
3
module Monad where -- create :: Int -> (Ptr Word8 -> IO ()) -> IO ByteString create l = do fp <- mallocByteString l return () data P a = P a mallocByteString :: a -> IO (P a) mallocByteString l = undefined
abakst/liquidhaskell
tests/pos/monad1.hs
bsd-3-clause
220
0
8
57
67
34
33
7
1
module T14773b where b :: Bool (Just b) | False = Nothing c :: Bool (Just c) | False = Nothing | True = Just True
sdiehl/ghc
testsuite/tests/deSugar/should_compile/T14773b.hs
bsd-3-clause
125
0
7
37
62
30
32
6
1
module GitHashObject where import qualified Github.GitData.Blobs as Github import Data.List( intercalate) main = do possibleBlob <- Github.blob "mike-burns" "github" "1dc7b1f6e0c7bf1118f3b03195071dd6ea6db9b3" case possibleBlob of (Left error) -> putStrLn $ "Error: " ++ (show error) (Right blob) -> putStrL...
mavenraven/github
samples/GitData/Blobs/GitHashObject.hs
bsd-3-clause
348
0
12
54
98
52
46
8
2
{-# LANGUAGE UnboxedTuples #-} module Main where {-# NOINLINE f1 #-} f1 :: (# #) -> (# #) -> String f1 (# #) (# #) = "o" {-# NOINLINE f2 #-} f2 :: (# (# #), (# #) #) -> String f2 (# (# #), (# #) #) = "k" main :: IO () main = do let t = (# (# #), (# #) #) case t of (# t1, t2 #) -> putStrLn (f1 t1 t2 ++...
shlevy/ghc
testsuite/tests/unboxedsums/unarise.hs
bsd-3-clause
327
0
13
99
122
65
57
13
1
-- | Settings are centralized, as much as possible, into this file. This -- includes database connection settings, static file locations, etc. -- In addition, you can configure a number of different aspects of Yesod -- by overriding methods in the Yesod typeclass. That instance is -- declared in the Foundation.hs file....
dgonyeo/lambdollars
Settings.hs
mit
2,966
0
18
558
353
220
133
-1
-1
-- | Athena.Translation.Rule.Strip module. {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE UnicodeSyntax #-} module Athena.Translation.Rules.Strip ( inferSplit , split , unshunt ) where ------------------------------------------------------------------------------ import Data.Proof ( ProofMap ...
jonaprieto/athena
src/Athena/Translation/Rules/Strip.hs
mit
3,455
93
14
780
1,607
885
722
105
1
module Spec where main :: IO () main = return ()
barkmadley/etd-retreat-2014-hteam
testsuite/tests/Spec.hs
mit
49
0
6
11
24
13
11
3
1
{-# LANGUAGE CPP #-} module GHCJS.DOM.SVGStyleElement ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.SVGStyleElement #else #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) import GHCJS.DOM.JSFFI.G...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/SVGStyleElement.hs
mit
358
0
5
33
33
26
7
4
0
----------------------------------------------------------------------------- -- -- Module : CFrac -- Copyright : -- License : AllRightsReserved -- -- Maintainer : -- Stability : -- Portability : -- -- | Fun continued fractions: given the terms of the continued fraction, produces -- a list of correspond...
equational/JL2012
HaskellExamples/src/CFrac.hs
mit
729
0
14
153
124
76
48
5
2
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, ScopedTypeVariables, Rank2Types, FlexibleContexts, ExistentialQuantification, OverlappingInstances, FunctionalDependencies, UndecidableInstances #-} module Perl.Sub ( G.getSubContext , retSub , Subable (..) , sub , subDo , defSub , die ) where impo...
CindyLinz/Haskell-Perl
src/Perl/Sub.hs
mit
2,867
0
15
565
1,079
557
522
67
2
{-# LANGUAGE TupleSections #-} -- | Convert the concrete syntax into the syntax of cubical TT. module Resolver where import Control.Applicative import Control.Monad import Control.Monad.Reader import Control.Monad.Except import Control.Monad.Identity import Data.Maybe import Data.List import Data.Map (Map,(!)) import...
linuborj/cubicaltt
Resolver.hs
mit
15,188
0
20
3,931
6,002
3,030
2,972
319
29
module Network.BitFunctor.Tests where import Network.BitFunctor.Account (AccountId) import Network.BitFunctor.Block (Block) import Network.BitFunctor.Block.Arbitrary () import Network.BitFunctor.Crypto.Hash (Hash, Id) import Network.BitFunctor.Crypto.Types (PublicKey, Signature) import Network.BitFunctor.Transaction (...
BitFunctor/bitfunctor
test/src/Network/BitFunctor/Tests.hs
mit
1,755
0
11
216
437
251
186
29
1
{-# OPTIONS_GHC -Wall #-} module Todo.Cli (run) where import Data.List (sortBy, isInfixOf) import Data.Char (toLower, isUpper) import Data.Ord (comparing) import System.IO import qualified System.IO.Strict as S import Options.Applicative import Todo type TaskArg = Task type RepoReader = (String -> [Task]) -> IO [Task...
nadirs/todohs
src/cli/Todo/Cli.hs
mit
5,708
0
15
1,359
1,602
809
793
109
7
{-# LANGUAGE OverloadedStrings #-} import Control.Concurrent import Control.Monad import System.IO import System.Exit import System.Environment import Data.Time.Clock import System.ZMQ4.Monadic import qualified Data.ByteString as SB import Text.Printf main :: IO () main = do args <- getArgs when (length args /...
twittner/zeromq-haskell
examples/perf/local_thr.hs
mit
1,558
1
14
473
483
228
255
46
1
module Git.Repository where import Foreign.ForeignPtr hiding (newForeignPtr) import Foreign.Concurrent import Foreign.Marshal.Alloc import Foreign.C.String import Foreign.Storable import Bindings.Libgit2 import Control.Monad import Git.Result data Repository = Repository { repository_ptr::ForeignPtr C'git_repository }...
sakari/hgit
src/Git/Repository.hs
gpl-2.0
641
0
11
97
166
90
76
16
1
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- -- Module : IDE.TextEditor.GtkSourceView -- Copyright : 2007-2013 Juergen Nicklisch-Franken, Hamish Mackenzi...
cessationoftime/leksah
src/IDE/TextEditor/GtkSourceView.hs
gpl-2.0
24,180
0
46
6,073
6,214
3,148
3,066
421
5
-- Copyright : 2012 Eric Kow -- License : BSD3 (NB: GPL still applies due to GenI 0.20.x) {-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-} {-# LANGUAGE StandaloneDeriving #-} module NLP.GenI.Test.Show where import NLP.GenI import NLP.GenI.FeatureStructure import NLP.GenI.GeniShow import NLP.GenI.GeniV...
kowey/GenI
geni-test/NLP/GenI/Test/Show.hs
gpl-2.0
1,109
0
7
150
232
134
98
31
0
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-} module System.Console.RemoteCLI.CommandState ( CommandState (..) , Synopsis , Help , CommandHandlerEntry , Printout , MonadicCommandHandler , PureCommandHandler , lookupEntry , lookupHandler , localCommands , remoteCommands , empty , fro...
SneakingCat/rcli
src/System/Console/RemoteCLI/CommandState.hs
gpl-3.0
3,964
0
10
1,131
676
389
287
63
3
-- -- Exotic Model Utility Function -- by Ian-Woo Kim (iankim@umich.edu) -- -- created on 2011 Jan 12 -- -- based on arXiv:0911.3237 module HEP.Physics.TTBar.Model.Exotic where import Prelude hiding (subtract) import HEP.Util.Functions hiding (beta) import Numeric.GSL.Integration import HEP.Physics.TTBar.Mod...
wavewave/ttbar
lib/HEP/Physics/TTBar/Model/Exotic.hs
gpl-3.0
5,759
0
18
1,883
1,990
1,105
885
121
4
module Hython.AttributeDict where import Control.Monad.IO.Class (MonadIO) import Data.HashMap.Strict (HashMap) import qualified Data.HashMap.Strict as HashMap import Data.Text (Text) import Hython.Ref type AttributeDict obj = HashMap Text (Ref obj) empty :: AttributeDict obj empty = HashMap.empty insertRef :: Text...
mattgreen/hython
src/Hython/AttributeDict.hs
gpl-3.0
1,083
0
12
217
391
200
191
29
2
module Crepuscolo.Recognizer.Ruby ( recognizer ) where import System.FilePath (takeExtension) import qualified Crepuscolo.Recognize.DSL as DSL data Recognizer = Ruby deriving (Show) instance DSL.Recognizer Recognizer where recognize Ruby path = return (DSL.recognizePath Ruby path) recognizeP...
meh/crepuscolo
src/Crepuscolo/Recognizer/Ruby.hs
gpl-3.0
556
0
9
139
137
74
63
16
1
{- | Module : $Header$ Description : Module to deal with generic modular arithmetic functions Copyright : (c) Michal Parusinski License : GPLv3 Maintainer : mparusinski@gmail.com Stability : experimental Portability : portable <module description starting at first column> -} module ModularArithm...
mparusinski/Haskell-number-theory-library
ModularArithmetic/Standard.hs
gpl-3.0
670
0
8
136
133
71
62
10
1
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverlappingInstances #-} {-# LANGUAGE OverloadedStrings #-} -- Copyright (C) 2009-2012 John Millikin <john@john-millikin.com> -- -- This program is free software: you can redistribute it and/or modify -- it under t...
jotrk/haskell-dbus
lib/DBus/Client.hs
gpl-3.0
32,576
1,041
15
5,979
6,777
3,930
2,847
528
8
module Lab5 where import System.Random import Data.List import Data.Maybe (fromJust) import Data.Sequence (Seq,fromList) import Lecture5 import Example import Control.Applicative -- Define Main -- main = do putStrLn "====================" putStrLn "Assignment 5 / Lab 5" putStrLn "====================" ...
vdweegen/UvA-Software_Testing
Lab5/Cas/Exercises.hs
gpl-3.0
12,144
0
17
2,476
3,935
2,132
1,803
234
3
import Control.Monad (replicateM) import qualified Data.Map.Strict as M import Data.Word -- Add first ocurrence seen x p = M.insert x p -- Remove older ocurrences prune p = M.filter (>= p) enmap x p (mg, m) | M.notMember x m = (mg, seen x p m) | otherwise = case (mg, m M.! x, p - (m M.! x)) of (Noth...
itsbruce/hackerrank
alg/implementation/minDistance.hs
unlicense
900
7
12
271
463
234
229
23
3
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Kubernetes.V1.SecurityContextConstraintsList where import GHC.Generics import Data.Text import Kubernetes.Unversioned.ListMeta import Kubernete...
minhdoboi/deprecated-openshift-haskell-api
kubernetes/lib/Kubernetes/V1/SecurityContextConstraintsList.hs
apache-2.0
1,298
0
9
170
125
77
48
19
0
{-| -} module Image ( Image ) where import VecMath (UVCoord) import Raster (Color) -- | An image takes a UVCoord and returns a Color. -- -- Images are conceptually continuous. type Image = UVCoord -> Color
lancelet/approxier
src/lib/Image.hs
apache-2.0
217
0
5
48
39
26
13
5
0
{-# LANGUAGE TupleSections #-} {-# LANGUAGE ScopedTypeVariables #-} {-|Functions utilizing Kleisli Arrows to merge, pipe & split input. -} module Control.Arrow.Utils ( -- * Lifting & composing functions liftP, (>>>), (<<<), idP, -- * Splitting inputs (<>), (<>*), -- ** Convenience functio...
ombocomp/Renaming
Control/Arrow/Utils.hs
apache-2.0
3,594
0
11
964
1,087
613
474
79
2
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QTranslator.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:32 Warning : this file is machine generated - do n...
uduki/hsQt
Qtc/Core/QTranslator.hs
bsd-2-clause
11,810
0
16
2,023
3,785
1,939
1,846
-1
-1
import Data.Foldable import Data.List import Data.Sequence rotate 0 _ = [] rotate n str = (Data.Foldable.foldr (:) [] str') : rotate (pred n) str' where (x :< xs) = viewl str str' = xs |> x tst = do str <- getLine putStrLn (intercalate " " $ rotate (Prelude.length str) (fromList str)) mai...
pbl64k/HackerRank-Contests
2014-06-20-FP/RotateString/rs.accepted.hs
bsd-2-clause
397
0
13
105
184
93
91
13
1
module Eclair.Frontend ( module Eclair.Frontend.Base , module Eclair.Frontend.Itf ) where import Eclair.Frontend.Base import Eclair.Frontend.Itf
amiddelk/eclair
src/Eclair/Frontend.hs
bsd-3-clause
152
0
5
21
34
23
11
5
0
------------------------------------------------------------------------ -- | -- Module : Hyena.Config -- Copyright : (c) Johan Tibell 2008 -- License : BSD3-style (see LICENSE) -- -- Maintainer : johan.tibell@gmail.com -- Stability : experimental -- Portability : portable -- -- This module specifie...
tibbe/hyena
Hyena/Config.hs
bsd-3-clause
7,273
0
12
2,036
1,661
916
745
133
2
{-# LANGUAGE ImplicitParams #-} {-# LANGUAGE NoMonomorphismRestriction #-} -- | This module provides a strategy for certification with \CeTA\. -- All proofs produced should be certifiable. -- -- Example calls (assumes the standard tct-trs executable). -- -- > tct-trs s "withCertification certify" $file -- > ...
ComputationWithBoundedResources/tct-trs
src/Tct/Trs/Strategy/Certify.hs
bsd-3-clause
7,112
0
18
2,115
2,292
1,177
1,115
-1
-1
module Warnings where import qualified Types as T data Warning = Unencapsulated String | Unprotected String | MissingDocstring String | StmtExp T.Exp deriving (Eq, Ord, Show)
bergmark/mmdoc
src/Warnings.hs
bsd-3-clause
218
0
7
69
51
31
20
7
0
module Tone where import qualified Scene import qualified Data.Vect as Vect import Data.Word (Word8) type Illuminance = Float -- |Tone Reproduction functions operate on the buffer of collected radiances type ToneReproduce = [Scene.ColorF] -> [(Word8, Word8, Word8)] -- |Maximum output luminance of target device targ...
notabotanist/fuzzy-octo-adventure
Tone.hs
bsd-3-clause
2,755
6
13
550
705
396
309
38
1
{-# LANGUAGE RecordWildCards #-} module Main where import Synth.SGD import qualified Settings as S import Types.Filter import Types.PrettyFilter import Types.DSPNode import Data.Tree import qualified Data.Map.Strict as M import System.Random ---------- -- -- Test the stochastic gradient descent implementation and...
aedanlombardo/HaskellPS
DSP-PBE/Tests/GradientDescent.hs
bsd-3-clause
1,306
0
12
361
345
181
164
41
3
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} ----------------------------------------------------------------------------- -- | -- Module : Numeric.Signal.Internal -- Copyright : (c) Alexander Vivian Hugh McPhail 2010, 2014, 2015, 2016 -- License : BSD...
amcphail/hsignal
lib/Numeric/Signal/Internal.hs
bsd-3-clause
17,501
0
19
5,007
3,905
1,977
1,928
253
2
module Manager where import Control.Monad.Error import Control.Monad.Reader import qualified System.Directory as Dir import System.FilePath ((</>)) type Manager = ErrorT String (ReaderT Environment IO) run :: Environment -> Manager a -> IO (Either String a) run environment manager = runReaderT (runErrorT m...
rtfeldman/elm-package
src/Manager.hs
bsd-3-clause
819
0
10
164
212
111
101
23
1
import Misc import Formulas import Workflows import UMap import Data.Set (Set,empty,elems,singleton,insert,toList,union,foldl,null) import Data.List -- Two cuncurrent workflows are equal if the lists of sequential workflows are -- just permutations instance Eq ParWf where Par ws1 == Par ws2 = ws1==ws2 --permut xs ys...
Booster2/Booster2
Workflow_Precond/impl_nondisjoint/Precond6.hs
bsd-3-clause
7,517
41
23
2,949
1,997
1,051
946
89
14
{- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section{Tidying up Core} -} {-# LANGUAGE CPP #-} module TidyPgm ( mkBootModDetailsTc, tidyProgram, globaliseAndTidyId ) where #include "HsVersions.h" import TcRnTypes import DynFlags import CoreSyn import CoreUnfold import CoreFVs import CoreT...
urbanslug/ghc
compiler/main/TidyPgm.hs
bsd-3-clause
63,067
4
22
19,184
7,499
4,047
3,452
560
5
{-# LANGUAGE OverloadedStrings #-} import Data.Aeson import Data.Either (fromRight) import qualified Data.HashMap.Strict as HashMap import qualified Data.List.NonEmpty as NonEmpty import Data.Maybe import Data.String.Conv import Data.Text (Text) import qualified Data.Text as Text import qualified Data.Vector as Vector...
lorcanmcdonald/mars
src/Tests/Mars/Main.hs
bsd-3-clause
8,051
0
19
2,420
2,358
1,237
1,121
221
8
{-# LANGUAGE OverloadedStrings #-} module HipBot.Naggy.Session where import Blaze.ByteString.Builder (toLazyByteString) import Control.Lens import Control.Monad import Control.Monad.IO.Class import Control.Monad.Trans import Control.Monad.Trans.Maybe import Data.Bifunctor import qualified Data.ByteString.Lazy as LB i...
purefn/naggy
src/HipBot/Naggy/Session.hs
bsd-3-clause
1,992
0
14
354
669
351
318
-1
-1
module Problem76 where import Data.Array lim :: Int lim = 100 main :: IO () main = print $ partitionsWith [1 .. lim] lim - 1 partitions :: Array (Int, Int) Integer partitions = array ((0, 0), (lim, lim)) [ ((i, j), partitionsWith [1 .. i] j) | j <- [1 .. lim], i <- [1 .. lim] ] partitionsWith :: [Int] -> I...
adityagupta1089/Project-Euler-Haskell
src/problems/Problem76.hs
bsd-3-clause
973
0
14
227
299
167
132
17
1
{-# LANGUAGE ViewPatterns, ScopedTypeVariables #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeFamilies #-} {- Raise an error if you are bracketing an atom, or are enclosed by a list bracket. <TEST> -- expression bracket reduction yes = (f x) x -- @Suggestion f x x no = f (x x) yes = (foo) -- foo yes = (foo ba...
ndmitchell/hlint
src/Hint/Bracket.hs
bsd-3-clause
11,733
0
25
2,785
2,987
1,546
1,441
114
5
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables, ViewPatterns #-} {-# LANGUAGE DeriveGeneric #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module KrakenSpec (main, spec) where import Control.Applicative import Control.Concurrent.MVar import Control.Exception import Control.Mona...
zalora/kraken
test/KrakenSpec.hs
bsd-3-clause
17,751
2
71
5,939
5,080
2,496
2,584
353
1
module HaskellEditor.Gui.Util where import qualified HaskQuery import Control.Concurrent.STM import HaskellEditor.Types import Data.Typeable import Data.Proxy insertNamedWidget :: Typeable a => TVar(Widgets) -> String -> a -> IO () insertNamedWidget widgetTVar name widget = atomically $ do modifyTVar w...
stevechy/haskellEditor
src/HaskellEditor/Gui/Util.hs
bsd-3-clause
1,800
0
19
326
578
285
293
30
1
{-| Module : Network.HTTP.Client.Request.Modifiers Description : Convenient monadic HTTP request modifiers Copyright : (c) 2014 Sean Leather License : BSD3 Maintainer : sean.leather@gmail.com Stability : experimental Each of the functions in this module is a monadic request modifier, using the 'ReqMod' t...
spl/http-client-request-modifiers
lib/Network/HTTP/Client/Request/Modifiers.hs
bsd-3-clause
7,387
0
11
1,302
1,140
640
500
74
1
-- |The "Geometry" module represents the geometry of the game world. -- A real Mars rover would likely use real 3D geometry and trigonometry -- but the game world 'Plateau' is more like a chess board. The implementation -- here models the game world rather than 3D space. module Geometry where -- |A 'RoverPos' is posi...
garethrowlands/marsrover
src/Geometry.hs
bsd-3-clause
2,501
0
8
512
410
241
169
35
1
{-# LANGUAGE FlexibleContexts, GeneralizedNewtypeDeriving #-} ----------------------------------------------------------------------------- -- | -- Module : Xmobar.Parsers -- Copyright : (c) Andrea Rossato -- License : BSD-style (see LICENSE) -- -- Maintainer : Jose A. Ortega Ruiz <jao@gnu.org> -- Stabi...
raboof/xmobar
src/Parsers.hs
bsd-3-clause
7,668
0
21
2,264
2,150
1,101
1,049
131
7
{-# LANGUAGE FlexibleContexts #-} module DimensionalVector ( Scalar , Vector , directionV , mulSV , divVS , magV , normaliseV , normZV , rotateV , rotate90ccw , dotV , addV , mapV , (|+|) , (*|) , (|*) , (|/) , cross , atan2V ) where import qualified Prelude ...
Rotsor/wheeled-vehicle
DimensionalVector.hs
bsd-3-clause
1,971
0
9
533
1,041
555
486
62
1