code
stringlengths
5
1.03M
repo_name
stringlengths
5
90
path
stringlengths
4
158
license
stringclasses
15 values
size
int64
5
1.03M
n_ast_errors
int64
0
53.9k
ast_max_depth
int64
2
4.17k
n_whitespaces
int64
0
365k
n_ast_nodes
int64
3
317k
n_ast_terminals
int64
1
171k
n_ast_nonterminals
int64
1
146k
loc
int64
-1
37.3k
cycloplexity
int64
-1
1.31k
{-# LANGUAGE ForeignFunctionInterface #-} {-# LANGUAGE JavaScriptFFI #-} {-# LANGUAGE UnliftedFFITypes #-} {-# LANGUAGE GHCForeignImportPrim #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE UnboxedTuples #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE EmptyDataDecls #-} {- | Dynamically export Haskell values to...
ghcjs/ghcjs-base
GHCJS/Foreign/Export.hs
mit
2,683
14
14
534
503
263
240
47
2
module Kantour.TH where import Language.Haskell.TH import Data.Maybe genSubcommands :: Q Exp genSubcommands = do (Just subcmdTypeName) <- lookupTypeName "Subcommand" ClassI _ ins <- reify subcmdTypeName (Just proxyTypeName) <- lookupTypeName "Proxy" (Just proxyValName) <- lookupValueName "Proxy" (...
Javran/tuppence
src/Kantour/TH.hs
mit
803
0
14
209
272
133
139
20
2
module HotDB.Core.Transformation ( transform , transformDirected , Side(..) ) where import Prelude hiding (Left, Right) import Control.Monad import Data.Int (Int64) import qualified Data.List as L import qualified Data.Text as T import Text.Read (readMaybe) import HotDB.Core.Operation import qualified HotDB.Core.Pa...
jjwchoy/hotdb
src/HotDB/Core/Transformation.hs
mit
5,573
0
17
1,425
2,441
1,193
1,248
132
7
{-# LANGUAGE NamedFieldPuns #-} module Plotserver.Api ( plotUrl, plotCat, plotUpdate, plotDelete ) where import Network.Curl import Control.Applicative ((<$>)) import Plotserver.Types ------ API ------ plotUrl :: PlotConfig -> String -> String plotUrl (PlotConfig {server}) dataset = server ++ "/" ++ dataset pl...
dtorok/plotserver-hsapi
Plotserver/Api.hs
mit
2,254
20
12
391
688
354
334
43
2
module HSudoku where import Data.List import Data.Ord (comparing) import Data.List.Split (chunksOf) import Data.Array.IArray import Data.Either (rights) import Data.Maybe (isJust, fromJust, isNothing) import Data.Function (on) import qualified Data.Set as S import Control.Monad (foldM) data Letter = A | ...
Kirez/hsudoku
src/HSudoku.hs
mit
12,553
0
18
4,274
4,465
2,379
2,086
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-inputtransformer.html module Stratosphere.ResourceProperties.EventsRuleInputTransformer where im...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/EventsRuleInputTransformer.hs
mit
2,093
0
13
210
253
145
108
28
1
-- $ ghc -o hello hello.hs && ./hello main = putStrLn "Hello, World!"
jwhitfieldseed/sandbox
haskell/hello.hs
mit
70
0
5
13
10
5
5
1
1
-- This file is based on: -- -- "The SMT-LIB Standard, Version 2.0" -- by Clark Barrett Aaron Stump Cesare Tinelli -- Release: December 21, 2010 -- Appendix C -- -- URL: -- http://goedel.cs.uiowa.edu/smtlib/papers/smt-lib-reference-v2.0-r10.12.21.pdf {-# LANGUAGE OverloadedStrings, Safe, DeriveDataTypeable #-} module ...
yav/smtLib
src/SMTLib2/AST.hs
mit
3,989
0
12
1,023
1,099
623
476
97
1
module Main where import Control.Monad.State.Strict import qualified Data.IntMap.Strict as IM import qualified Data.Map.Strict as M import Data.Maybe (fromMaybe, fromJust) import Data.Char (isLetter) import Parser main :: IO () main = do p <- readProgram "./prg.txt" putStrLn $ "part 1: " ++ (show $ part1 p) t...
CarstenKoenig/AdventOfCode2016
Day25/Main.hs
mit
3,866
0
14
873
1,552
799
753
112
2
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeSynonymInstances #-} module Main (main) where import qualified SDL import qualified SDL.Image import qualified Common as C import Control.Monad (unless) import Control.Monad.IO.Class (Mo...
palf/haskellSDL2Examples
examples/lesson14/src/Lesson14.hs
gpl-2.0
2,330
0
17
569
947
497
450
64
1
module Network.Gitit.Plugins.IncludeAsCodeBlock (plugin) where {- This plugin allows you to include any code file inside the current code block. ~~~ {.csv include-code="my-file.csv"} This will be replaced by the content of the csv file. ~~~ -} import Network.Gitit.Interface -- from the utf...
jraygauthier/jrg-gitit-plugins
src/Network/Gitit/Plugins/IncludeAsCodeBlock.hs
gpl-2.0
2,029
0
18
486
492
261
231
35
1
-- Copyright Β© 2015 Mykola Orliuk <virkony@gmail.com> -- Distributed under the terms of the GNU General Public License v2 {-# LANGUAGE UnicodeSyntax #-} {-# LANGUAGE FlexibleInstances #-} module ExRender.Base ( module ExRender.Base , module Text.PrettyPrint ) where import Text.PrettyPrint -- | Wrap widt...
ony/exherbo-cabal
src/ExRender/Base.hs
gpl-2.0
2,524
0
11
620
738
374
364
47
3
{-# LANGUAGE FlexibleContexts #-} -- | -- This module contains only function to run 'SpacewalkRPC' code. -- Bindings can be found in @Spacewalk.Api.*@ modules. -- As of now they are incomplete, however contributors are welcome. -- -- If there is unimplemented method, you can use @Spacewalk.ApiInternal@. -- -- Spacewalk...
xkollar/spacewalk-api-hs
src/Spacewalk/Api.hs
gpl-3.0
1,562
0
10
345
241
144
97
22
1
module Utilities.Login.Internal.Cookies where import qualified Data.Text as T import Data.Time.Clock import Web.Cookie import Web.Scotty.Cookie import Web.Scotty.Trans setSimpleCookieExpr :: (Monad m, ScottyError e) => T.Text -> T.Text ...
ProLambda/Times
Utilities/Login/Internal/Cookies.hs
gpl-3.0
500
0
10
190
121
69
52
13
1
module Frame.Internal.Padding where import qualified Control.Monad.Except as Except import qualified Data.Binary.Get as Get import qualified Data.Binary.Put as Put import qualified Data.Bits as Bits import Control.Monad.Except(ExceptT) import Control.Monad.Trans.Class(lift) import Data.Binary.Get(Get) import Data.Bin...
authchir/SoSe17-FFP-haskell-http2-server
src/Frame/Internal/Padding.hs
gpl-3.0
1,423
0
12
223
441
243
198
-1
-1
{-# LANGUAGE ViewPatterns #-} module Language.Mulang.Analyzer.EdlQueryCompiler( compileTopQuery) where import Data.Char (toUpper) import Data.Count (encode) import Data.Function.Extra (orElse, andAlso, never) import Language.Mulang import Language.Mulang.Consult (Consult) import Language.Mulang.Counter (plus) impo...
mumuki/mulang
src/Language/Mulang/Analyzer/EdlQueryCompiler.hs
gpl-3.0
14,973
0
11
4,588
3,879
1,914
1,965
205
87
module Mescaline.Sampler.MIDI ( module System.MIDI , findSources , findSource ) where import Control.Exception (PatternMatchFail(..), catch, evaluate) import Control.Monad (filterM) import Prelude hiding (catch) import System.MIDI findSources :: (String -> String -> String -> Bool) -> IO [Source] findSources ...
kaoskorobase/mescaline
tools/sampler/Mescaline/Sampler/MIDI.hs
gpl-3.0
750
0
13
203
280
146
134
21
2
{-# LANGUAGE NoImplicitPrelude, OverloadedStrings #-} module Lamdu.GUI.WidgetIds ( module Lamdu.GUI.WidgetIds , module Lamdu.GUI.WidgetIdIRef ) where import Control.Lens.Operators import Data.ByteString.Char8 (ByteString) import Data.UUID.Types (UUID) import qualified Data.UUI...
da-x/lamdu
Lamdu/GUI/WidgetIds.hs
gpl-3.0
1,702
0
8
310
447
267
180
46
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-language/gen/Network/Google/Resource/Language/Documents/AnalyzeEntities.hs
mpl-2.0
5,155
0
16
1,139
710
416
294
105
1
module Data.GI.GIR.Arg ( Arg(..) , Direction(..) , Scope(..) , parseArg , parseTransfer ) where import Data.Monoid ((<>)) import Data.Text (Text) import Data.GI.GIR.BasicTypes (Transfer(..), Type) import Data.GI.GIR.Parser import Data.GI.GIR.Type (parseType) data Direction = DirectionIn ...
hamishmack/haskell-gi
lib/Data/GI/GIR/Arg.hs
lgpl-2.1
2,660
0
11
781
628
345
283
-1
-1
{-# LANGUAGE OverloadedStrings #-} import qualified Data.ByteString.Lazy as BSL import Data.ByteString.Lazy.UTF8 (toString) import qualified Data.HashMap.Strict as HMS import Data.IORef (atomicModifyIORef, modifyIORef', newIORef,...
waldheinz/h-fcp
hspider/Main.hs
lgpl-3.0
3,567
0
41
1,606
883
447
436
77
8
module Main where import qualified Data.ByteString.Lazy as B import Text.VCard.Format.Directory import System.IO import System.Environment import System.Exit printUsage = putStrLn "vcard2vcard [FILE]" >> exitFailure main = do args <- getArgs (filename, handle) <- case args of [file] -> openFile fil...
mboes/vCard
t/Main.hs
lgpl-3.0
540
0
14
112
185
98
87
16
3
-- Haskell session 5 of block 3 import FP_Core import FPPrac.Trees --Exercise 2 codeGenerator :: Expr -> [Instr] codeGenerator expr = codeGenerator' expr ++ [EndProg] codeGenerator' (Const n) = [PushConst n] codeGenerator' (BinExpr op left right) = codeGenerator' left ++ codeGenerator' right ++ [Calc op] --Exercise 3...
Pieterjaninfo/PP
FP/block3s5.hs
unlicense
2,466
0
15
507
1,235
621
614
37
1
-- Copyright 2011 The Text.XHtml Authors. -- -- 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 ...
robinbb/hs-text-xhtml
Text/XHtml/Debug.hs
apache-2.0
4,390
0
15
1,461
960
531
429
69
5
import Text.CSV import Data.List import Text.Nagato.NagatoIO as NagatoIO import Text.Nagato.Models as Models import Text.Nagato.MeCabTools as MeCabTools import qualified Text.Nagato.Classify as NC import qualified Text.Nagato.Train as Train import qualified Text.Nagato.Train_complement as Train_compl main = do class...
haru2036/nagato
samples/tester_manual.hs
apache-2.0
870
0
11
121
212
107
105
23
1
{-# LANGUAGE TupleSections #-} {-# LANGUAGE DeriveDataTypeable #-} module Language.Nano.CmdLine (getOpts) where import Language.Nano.Types (Config (..)) import System.Console.CmdArgs --------------------------------------------------------------------------------- -- | Par...
UCSD-PL/nano-js
Language/Nano/CmdLine.hs
bsd-3-clause
1,787
0
11
612
307
162
145
39
1
module Data.RecordAccess ( set, update, Ref, ref, (.) ) where import Prelude hiding ((.)) import qualified Prelude data FRef s a = FRef { get :: s -> a , set :: a -> s -> s } update :: FRef s a -> (a -> a) -> (s -> s) update ref f s = set ref (f (get ref s)) s compose :: FRef b c...
petermarks/record-access
src/Data/RecordAccess.hs
bsd-3-clause
659
0
11
236
334
184
150
26
1
{-# LANGUAGE LambdaCase #-} module GLObjects where import Codec.Picture import Control.Arrow import Control.Monad import Control.Monad.Trans.State.Strict (State, runState, gets, modify) import Data.Foldable import Data.Functor.Contravariant import Data.Functor.Contravariant.Divisible import Data.Maybe (catMaybes) imp...
ocharles/SSAO-example
src/GLObjects.hs
bsd-3-clause
19,273
0
27
8,355
4,283
2,141
2,142
470
13
{-# LANGUAGE DeriveDataTypeable, DeriveGeneric #-} module Github.Data.Definitions where import Control.DeepSeq (NFData) import Data.Time import Data.Data import GHC.Generics (Generic) import qualified Control.Exception as E import qualified Data.Map as M -- | The options for querying commits. data CommitQueryOption ...
adarqui/github
Github/Data/Definitions.hs
bsd-3-clause
22,677
0
10
4,048
5,441
3,142
2,299
626
0
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} module Util.ToJSON where import VCS.Multirec import Language.Clojure.Lang import Language.Clojure.PrettyPrint (ppConstr) import Language.Clojure.ToJSON import Language.Common imp...
nazrhom/vcs-clojure
src/Util/ToJSON.hs
bsd-3-clause
4,718
0
16
1,674
1,808
933
875
109
1
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE GADTs #-} -- | Make changes to project or global configuration. module Stack.ConfigCmd (ConfigCmdSet(..) ,configCmdSetPa...
AndreasPK/stack
src/Stack/ConfigCmd.hs
bsd-3-clause
6,253
0
20
1,744
1,178
613
565
139
4
{-# LANGUAGE TemplateHaskell #-} module System.Monitoring.GC ( updateStats , rtsStats ) where import Control.Monad import Data.Aeson import Data.Aeson.TH import GHC.Stats import Foreign.Ptr import Foreign.Concurrent import System.Mem.Weak import System.Monitoring onNextGC :: IO () -> IO () onNex...
pxqr/monitoring
src/System/Monitoring/GC.hs
bsd-3-clause
2,109
0
9
461
265
134
131
26
1
{-# LANGUAGE OverloadedStrings #-} module Playground24 where import System.Environment import qualified Data.ByteString as B import qualified Data.ByteString.Char8 as BC import System.Random import Control.Monad -- import qualified Data.Text.Encoding as E -- E.encodeUtf8 :: T.Text -> BC.ByteString -- E.decodeUtf8 :: ...
stefanocerruti/haskell-primer-alpha
src/Playground24.hs
bsd-3-clause
2,425
0
11
569
620
324
296
49
1
{-# LANGUAGE OverloadedStrings #-} -- ----------------------------------------------------------------------------- -- | -- Module : Ircfs.Process -- Copyright : (c) Andreas-Christoph Bernstein 2011 -- License : BSD3-style (see LICENSE) -- -- Maintainer : andreas.bernstein@googlemail.com -- Stability ...
bernstein/ircfs
Ircfs/Process.hs
bsd-3-clause
4,192
0
17
1,040
1,582
819
763
74
6
{-| Module : Werewolf.Command.Status Description : Handler for the status subcommand. Copyright : (c) Henry J. Wylde, 2016 License : BSD3 Maintainer : public@hjwylde.com Handler for the status subcommand. -} module Werewolf.Command.Status ( -- * Handle handle, ) where import Control.Monad.Except...
hjwylde/werewolf
app/Werewolf/Command/Status.hs
bsd-3-clause
1,052
0
12
212
235
127
108
21
2
module LSC2008.TestListSet1 where import LazySmallCheck import Benchmarks.ListSet import System.Environment bench d = depthCheck (read d) prop_insertSet
UoYCS-plasma/LazySmallCheck2012
suite/performance/LSC2008/TestListSet1.hs
bsd-3-clause
156
0
7
19
38
21
17
5
1
-- | TRS to C compilation. module C.Compiler ( compile , Word (..) ) where import Control.Monad hiding (join) import qualified Data.List as List import qualified Data.Map as Map import Data.Maybe import System.Exit import System.IO import TRS.Checker import TRS.Types import Utils -- | The Configuration of the...
tomahawkins/trs
attic/C/Compiler.hs
bsd-3-clause
15,320
0
28
4,418
4,519
2,384
2,135
385
15
module Lang.Util.EitherT where import Control.Applicative import Control.Monad import Control.Monad.IO.Class import Control.Monad.Trans.Class import Data.Text (Text) newtype EitherT e m a = EitherT { runEitherT :: m (Either e a) } class EitherTErr e where textError :: Text -> e instance (Functor m) => Functor ...
Alasdair/Mella
Lang/Util/EitherT.hs
bsd-3-clause
991
0
13
234
425
225
200
25
1
-- ------------------------------------------------------ -- -- Copyright Β© 2012 AlephCloud Systems, Inc. -- ------------------------------------------------------ -- -- | GET GetChange -- -- Returns the current status of change batch request. -- -- <http://docs.amazonwebservices.com/Route53/latest/APIReference/AP...
memcachier/aws-route53
Aws/Route53/Commands/GetChange.hs
bsd-3-clause
1,582
0
11
366
257
142
115
-1
-1
{-# LANGUAGE CPP #-} module Tinc.GhcPkgSpec (spec) where import Helper import Tinc.GhcPkg import Tinc.Package globalPackages :: [String] globalPackages = [ "array" , "base" , "binary" , "bin-package-db" , "bytestring" , "Cabal" , "containers" , "deepseq" , "directory...
beni55/tinc
test/Tinc/GhcPkgSpec.hs
bsd-3-clause
873
0
14
224
178
108
70
42
1
{-# LANGUAGE TemplateHaskell #-} module Cloud.AWS.EC2.Types.ConversionTask ( ConversionTask(..) , ConversionTaskState(..) , DiskImage(..) , DiskImageDescription(..) , DiskImageVolumeDescription(..) , ImportInstanceTaskDetailItem(..) , ImportInstanceTaskDetails(..) , ImportVolumeRequestI...
worksap-ate/aws-sdk
Cloud/AWS/EC2/Types/ConversionTask.hs
bsd-3-clause
3,947
0
9
659
721
436
285
88
0
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE PackageImports #-} module Snap.Internal.Http.Parser.Benchmark ( benchmarks ) where import Control.Monad import Criterion.Main hiding (run) import qualified Data.ByteString as S im...
afcowie/new-snap-server
benchmark/Snap/Internal/Http/Parser/Benchmark.hs
bsd-3-clause
786
0
10
207
165
96
69
20
1
{-# LANGUAGE TemplateHaskell, GeneralizedNewtypeDeriving, FlexibleInstances, MultiParamTypeClasses #-} module Ling.Term.Checker where import Ling.Abs (Name) import Ling.Utils import Ling.Print import Ling.Proto import Ling.Norm import Ling.Subst import Ling.Equiv import Ling.ErrM import qualified Data.Ma...
jyp/ling
Ling/Term/Checker.hs
bsd-3-clause
5,990
0
19
1,503
2,294
1,139
1,155
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ViewPatterns #-} -- | This module communicates and manages the state of clients -- connected to the server. module Hulk.Client where import Hulk.Auth import Hulk.Types import Control.Monad.RWS h...
chrisdone/hulk
src/Hulk/Client.hs
bsd-3-clause
29,110
0
21
7,315
8,226
4,084
4,142
620
10
{-# LANGUAGE ScopedTypeVariables #-} module Main where import Solver import Performer import Parser import Types import Control.Concurrent import Control.Monad import Control.Exception import System.Timeout performOperations :: [Operation] -> IO () performOperations [] = return () performOperations (Move _ PHua:ops) ...
Frefreak/solitaire-solver
app/Main.hs
bsd-3-clause
2,410
0
13
681
634
313
321
62
3
module Lib ( getData ) where import Data.RDF parse :: String -> IO (Either ParseFailure HashMapS) parse = parseURL (TurtleParser Nothing Nothing) getData :: IO HashMapS getData = do r <- parse "http://wikidata.dbpedia.org/downloads/sample/wikidatawiki-20150330-raw-reified.ttl" return $ fromEither r
seantalts/hasktrip
src/Lib.hs
bsd-3-clause
319
0
8
56
83
42
41
9
1
-- | Types used in LRC. module Pos.Chain.Lrc.Types ( RichmenSet , RichmenStakes , FullRichmenData ) where import Universum import Pos.Core.Common (Coin, StakeholderId) -- | Hashset of richmen (i. e. stakeholders whose stake is greater -- than some threshold). type Ric...
input-output-hk/pos-haskell-prototype
chain/src/Pos/Chain/Lrc/Types.hs
mit
580
0
5
132
74
49
25
9
0
{-# LANGUAGE MultiParamTypeClasses #-} module Vim.Netbeans ( Netbeans , runNetbeans , runForkedNetbeans , NetbeansCallbacks(..) , P.Event(..) , P.BufId , P.Color(..) , P.AnnoTypeNum , P.AnnoNum , nextEvent , tryNextEvent -- commands , addAnno , close , create , defineAnnoType , editFile , endAtomic , guard , initDone ...
ababkin/railoscopy
src/Vim/Netbeans.hs
mit
24,879
0
22
7,509
5,022
2,494
2,528
440
3
{-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-orphans #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Test.AWS.Gen.CloudFront -- Copyright : (c) 2013-2015 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Bren...
fmapfmapfmap/amazonka
amazonka-cloudfront/test/Test/AWS/Gen/CloudFront.hs
mpl-2.0
15,148
0
7
2,399
1,264
746
518
219
1
{-# LANGUAGE NoMonomorphismRestriction, FlexibleInstances #-} module PTS.Syntax.Pretty ( Pretty (pretty) , singleLine , multiLine , showCtx , prettyAlgebra , showAssertion , showPretty ) where import Control.Arrow (first) import Data.List (intersperse, intercalate) import Data.Set (Set) import qualifi...
Toxaris/pts
src-lib/PTS/Syntax/Pretty.hs
bsd-3-clause
5,632
0
18
1,270
2,515
1,298
1,217
143
3
{-# LANGUAGE DataKinds, DeriveDataTypeable, GeneralizedNewtypeDeriving, MultiParamTypeClasses, OverloadedStrings, TemplateHaskell, TypeFamilies, TypeOperators #-} module TutorialUsers where import Control.Monad (liftM, mzero) import Data.Readable (Readable(fromText)) import Data.Typeable impor...
codygman/Frames
demo/TutorialUsers.hs
bsd-3-clause
2,808
0
9
584
639
345
294
54
0
{-# LANGUAGE RankNTypes, FunctionalDependencies, PartialTypeSignatures, OverloadedStrings, ScopedTypeVariables, TemplateHaskell #-} module SecondTransfer.TLS.CoreServer ( -- * Simpler interfaces -- These function...
shimmercat/second-transfer
hs-src/SecondTransfer/TLS/CoreServer.hs
bsd-3-clause
28,164
0
33
11,440
3,632
1,881
1,751
-1
-1
module SourceTarball where import Control.Monad (forM_) import Development.Shake import Development.Shake.FilePath import Config import Dirs import LocalCommand import Paths import PlatformDB import Templates import Types import Utils sourceTarballRules :: FilePath -> Rules () sourceTarballRules srcTarFile = do ...
erantapaa/haskell-platform
hptool/src/SourceTarball.hs
bsd-3-clause
2,835
0
16
788
700
352
348
79
1
{-# LANGUAGE OverloadedStrings #-} -------------------------------------------------------------------------------- -- | -- Module : System.Taffybar.Widget.CommandRunner -- Copyright : (c) Arseniy Seroka -- License : BSD3-style (see LICENSE) -- -- Maintainer : Arseniy Seroka <ars.seroka@gmail.com> -- Stabil...
teleshoes/taffybar
src/System/Taffybar/Widget/CommandRunner.hs
bsd-3-clause
1,825
0
11
332
257
150
107
24
1
----------------------------------------------------------------------------- -- | -- Module : Distribution.Client.Dependency.TopDown.Types -- Copyright : (c) Duncan Coutts 2008 -- License : BSD-like -- -- Maintainer : cabal-devel@haskell.org -- Stability : provisional -- Portability : portable -- -...
DavidAlphaFox/ghc
libraries/Cabal/cabal-install/Distribution/Client/Dependency/TopDown/Types.hs
bsd-3-clause
3,075
0
8
607
428
246
182
55
0
module SimplerNotation () where {-@ myDiv :: x:Int -> y:{Int | y != 0} -> {v:Int | v = x / y} @-} myDiv :: Int -> Int -> Int myDiv = div
mightymoose/liquidhaskell
tests/pos/SimplerNotation.hs
bsd-3-clause
138
0
6
34
26
16
10
3
1
import Control.Monad (forM_) main :: IO () main = forM_ [0..0xffff] $ \i -> do putStrLn $ ".section s" ++ show i ++ ",\"\",@progbits" putStrLn $ ".asciz \"Section " ++ show i ++ "\"" putStrLn ""
ezyang/ghc
testsuite/tests/driver/recomp015/Generate.hs
bsd-3-clause
205
0
11
46
85
41
44
6
1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Language.PureScript.CodeGen.Lua.Monad where import Control.Applicative import Control.Monad.State.Strict import Language.PureScript.Names import Language.PureScript.Environment import Language.PureScript.Lua.Options data CGState = CGState { cgOpts :: Optio...
osa1/psc-lua
src/Language/PureScript/CodeGen/Lua/Monad.hs
mit
689
0
11
145
190
110
80
21
1
-- Alternativ 2 -- Sett inn for n og lΓΈs for m f m = 2 * (3240/m) + 2*m - 4 == 230 main = let [n, m] = map round $ filter f [1..3240] in putStrLn $ show n ++ " " ++ show m
MAPSuio/spring-challenge16
puzzle_dimension/larstvei2.hs
mit
181
0
11
55
96
48
48
3
1
module Arm.Internal.Type ( wordToSRType, wordToRegister, instructionSignedExtendBits, instructionArrayBits, instructionFlag, parseRegister, decodeImmediateShift, parseCondAt, decodeRegisterList, wordToEndianState, undefinedInstruction, InstructionStreamState(..), ArmRegister(..), ...
mathk/arm-isa
Arm/Internal/Type.hs
mit
17,931
0
16
5,912
4,289
2,337
1,952
374
16
module P003 (main, solveBasic) where {- The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143 ? -} import qualified Common as C input :: Integer input = 600851475143 main :: IO () main = C.time "P003(Basic): " $ solveBasic input -- η΄ ε› ζ•°εˆ†θ§£γ—γ¦γ‚„γ‚‹ -- η΅ε±€γ“γ‚ŒγŒδΈ€η•ͺι€Ÿγ‹γ£γŸ s...
yyotti/euler_haskell
src/P003.hs
mit
440
0
7
77
85
49
36
9
1
divideByTen :: (Floating a) => a -> a divideByTen = (/10) isUpperAlphaNum :: Char -> Bool isUpperAlphaNum :: (`elem` ['A'..'Z'])
v0lkan/learning-haskell
sections.hs
mit
130
2
6
21
56
32
24
-1
-1
-- https://www.reddit.com/r/dailyprogrammer/comments/pii6j/difficult_challenge_1/ module Main where import System.IO data Bounds = Bounds { lower :: Int , upper :: Int } updateBounds :: Ordering -> Int -> Bounds -> Maybe Bounds updateBounds ord k bnd = case ord of LT -> Just $ bnd { upper ...
gallais/dailyprogrammer
difficult/001/Main.hs
mit
1,287
0
14
343
451
224
227
40
4
module Actions where import Direction import Data.Char import Data.List data Action = Move Direction | Inventory | Pickup String | Drop String | Use String | Quit deriving (Eq, Show) -- I need to create an association list of [ terms ] - builder type AdvancedList = [([String], String -> Action)] advanced :: Advance...
disquieting-silence/adventure
src/Actions.hs
mit
1,178
0
19
237
435
234
201
28
1
module DictCC.Output ( printResults ) where import Prelude hiding (length, maximum, replicate) import Data.Int import qualified Data.List as List import Data.Text.Lazy import Data.Text.Format as F import DictCC.DictCC type Header = Text type ColumnWidth = Int64 type HeaderDescription = (Header, ColumnWidth)...
matt-snider/dict.cc
src/DictCC/Output.hs
mit
2,105
0
13
598
627
334
293
45
2
-- Ball Upwards -- http://www.codewars.com/kata/566be96bb3174e155300001b/ module Codewars.G964.Ball where maxBall :: Int -> Int maxBall v0 = round $ (10.0 * fromIntegral v0)/(3.6 * 9.81)
gafiatulin/codewars
src/7 kyu/Ball.hs
mit
189
0
9
26
51
29
22
3
1
{-# LANGUAGE FlexibleInstances, GeneralizedNewtypeDeriving, MultiParamTypeClasses, DeriveFunctor, DeriveGeneric, ViewPatterns #-} module Rubik.Cube.Moves.Internal where import Rubik.Cube.Coord import Rubik.Cube.Cubie.Internal import Rubik.Misc import Control.DeepSeq import Control.Monad.Loops ( iterateUntil ) imp...
Lysxia/twentyseven
src/Rubik/Cube/Moves/Internal.hs
mit
8,061
0
17
2,065
2,894
1,665
1,229
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TypeFamilies #-} module Handler.Result where import Foundation import Yesod.Core import Yesod.Persist import Yesod.Auth getResultR :: ResultId -> Handler Html getResultR x = do maid <- maybeAuthId (Result a b c d _) <- runD...
petermcneil/yesod-calculator
Handler/Result.hs
mit
1,968
0
10
717
108
56
52
16
1
-- let's have a little file for taking the KJV and making a little bible verse generator import Data.Map (Map) import qualified Data.Map as M import Data.Maybe import Control.Monad.Random import Data.Char import Data.List import Control.Monad import BibleRot type Table = Map [String] [(String, Rational)] -- invarian...
clarissalittler/nanogenmo-2015
markov.hs
mit
2,986
0
14
793
947
496
451
46
3
module ParametrizedTypes where import Data.List (intercalate) import qualified Data.Map as Map import Data.Maybe (isNothing) data Triple a = Triple a a a deriving Show first :: Triple a -> a first (Triple x _ _) = x second :: Triple a -> a second (Triple _ x _) = x third :: Triple a -> a third (Triple _ _ x) = x ...
raventid/coursera_learning
haskell/will_kurt/18_parametrized_types_worksheet.hs
mit
4,998
0
11
992
1,346
738
608
84
1
{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} module Widgets.Setting where import Control.Applicative import Control.Monad import Control.Monad.IO.Class (liftI...
osener/markup.rocks
src/Widgets/Setting.hs
mit
5,329
7
22
1,931
1,222
638
584
-1
-1
{-# LANGUAGE RecordWildCards #-} module GradientAscentSpec ( main , spec ) where import Ch05LogisticRegression.GradientAscent import DataFiles import qualified Data.Vector.Unboxed as VU import MLUtil import MLUtil.Test import System.Random import ...
rcook/mlutil
ch05-logistic-regression/spec/GradientAscentSpec.hs
mit
2,495
0
24
797
783
402
381
51
1
module Examples.ExampleSpec where import qualified Examples.Reader as Rd import qualified Examples.Exception as Exc import qualified Examples.Writer as Wrt import qualified Examples.Search as Srch import qualified Examples.Combined as Cmb import Test.Hspec import Test.QuickCheck import Data.Either (isLeft, isRight) ...
edofic/effect-handlers
test/Examples/ExampleSpec.hs
mit
1,769
0
21
485
521
269
252
46
3
-- multi return values vals :: () -> (Int, Int) vals () = (3, 7) main = do let (a, b) = vals () print a print b let (_, c) = vals () print c
solvery/lang-features
haskell/function_2.hs
gpl-2.0
164
0
11
59
100
49
51
8
1
-- grid is a game written in Haskell -- Copyright (C) 2018 karamellpelle@hotmail.com -- -- This file is part of grid. -- -- grid is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, either version 3 of the Lice...
karamellpelle/grid
source/Game/LevelPuzzle/LevelPuzzleWorld/Wall.hs
gpl-3.0
1,130
0
9
263
131
83
48
24
1
module LinguisticVariables.AccelLinguisticVariables where import Domains.Domain import Domains.DomainElement import Domains.SimpleDomain import FuzzySets.CalculatedFuzzySet import FuzzySets.FuzzySet import FuzzySets.FuzzySetHelper acceleration :: ADomain acc...
mrlovre/super-memory
Pro3/src/LinguisticVariables/AccelLinguisticVariables.hs
gpl-3.0
1,501
0
10
210
319
171
148
31
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleContexts #-} module WJR.ParamDefs ( ParamField(..), FieldType(..), paramDefs ) where import WJR.GeneticCodes import Data.Text (Text) import qualified Data.Text as T import Data.String data FieldType = TextField | CheckBoxField ...
drpowell/Prokka-web
WJR/ParamDefs.hs
gpl-3.0
2,283
0
15
649
596
326
270
41
1
-- | MΓ³dulo para la lista de iconViews de predicados. module Sat.GUI.PredicateList where import Graphics.UI.Gtk hiding (eventButton, eventSent,get) import Control.Monad import Control.Monad.Trans.RWS (ask) import Control.Lens import Sat.GUI.GState import Sat.GUI.IconTable import Sat.Core type MakeIcon = Predicat...
manugunther/sat
Sat/GUI/PredicateList.hs
gpl-3.0
1,327
0
12
363
371
192
179
29
1
-- Author: Matthew Wraith module Teapot where import Graphics.Rendering.OpenGL import Graphics.UI.GLUT import qualified Data.Vector as V import Control.Monad -- Data structure for holding the model -- We have vertex, normal, and texture data data Model = Model { vertices :: !(V.Vector (Vertex3 GLdouble)) ,...
WraithM/HTeapots
src/Teapot.hs
gpl-3.0
1,994
0
14
530
749
410
339
51
2
{- teafree, a Haskell utility for tea addicts Copyright (C) 2013 Fabien Dubosson <fabien.dubosson@gmail.com> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of t...
StreakyCobra/teafree
src/Teafree/Core/Monad.hs
gpl-3.0
1,586
0
9
332
233
130
103
25
1
{-# LANGUAGE OverloadedStrings #-} ------------------------------------------------------------------------------- -- | -- Module : OpenSandbox.Protocol.Handle.Handshaking -- Copyright : (c) 2016 Michael Carpenter -- License : GPL3 -- Maintainer : Michael Carpenter <oldmanmike.dev@gmail.com> -- Stabilit...
oldmanmike/opensandbox
src/OpenSandbox/Protocol/Handle/Handshaking.hs
gpl-3.0
3,286
0
22
740
836
430
406
68
8
module Hinance.User.Tag where data Tag = TagAsset | TagExpense | TagIncome | TagDiscount | TagShipping | TagTax | TagOther deriving (Read, Show, Enum, Bounded, Eq, Ord)
hinance/hinance
src/default/user_tag.hs
gpl-3.0
173
0
6
30
59
35
24
4
0
module Builtin.String where import String as S import AST import Object import Eval import Context import Err import Builtin.Utils import qualified Data.Map as M import qualified Data.Text.Lazy as T import Control.Monad.Except import Data.Monoid stringClass = buildClassEx "String" bootstrap bootClass bootstrap = M.f...
antarestrader/sapphire
Builtin/String.hs
gpl-3.0
1,608
0
14
348
701
365
336
50
3
module Main where p1 = "([{" p2 = "}])" main = do x <- getLine print $ f [] x f [] [] = True f [] (a:as) = if elem a p1 then f [a] as else False f (a:as) (b:bs) | elem b p1 = f (b:a:as) bs | check_pair a b = f as bs | otherwise = False f _ [] = False check_pair '(' b = b == ')' check_pair '[' b = b ...
cwlmyjm/haskell
Learning/parentheses.hs
mpl-2.0
354
2
9
107
230
114
116
15
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/Addresses/Get.hs
mpl-2.0
3,492
0
16
850
466
278
188
76
1
-- "Dao/Count.hs" newtype wrapping the 'Data.Int.Int64' data type but -- instantiating 'Data.Monoid.Monoid' with integer addition. -- -- Copyright (C) 2008-2015 Ramin Honary. -- -- Dao is free software: you can redistribute it and/or modify it under the -- terms of the GNU General Public License as published by the ...
printedheart/Dao
src/Dao/Count.hs
agpl-3.0
2,943
0
11
592
727
387
340
36
0
module Schizo.Expression where import Data.Map as Map data SchExp = Symbol String | Operator String | List [SchExp] | Tuple [SchExp] | Sequence [SchExp] | Application (SchExp, [SchExp]) | Int64 Int ...
eloraiby/SchizoHS
src/Schizo/Expression.hs
agpl-3.0
1,800
0
11
754
484
258
226
48
4
{-# language ViewPatterns, ScopedTypeVariables #-} module Base.Score ( Scores, HighScoreFile(..), Record(..), saveScore, getScores, setScores, getHighScores, mkScoreString, showScore, timeFormat, batteryFormat, sumOfEpisodeBatteries, ) where import Data.Map as Map (...
nikki-and-the-robots/nikki
src/Base/Score.hs
lgpl-3.0
6,942
0
17
1,731
1,719
874
845
160
9
module External.A262343 (a262343) where a262343 :: Integral a => a -> a a262343 n | m == 0 = div n 2 - 1 | m == 1 = 3 * n - 6 | m == 2 = 3 * div n 2 - 3 | m == 3 = n - 2 | m == 4 = 3 * div n 2 - 3 | m == 5 = 3 * n - 6 where m = mod n 6
peterokagey/haskellOEIS
src/External/A262343.hs
apache-2.0
279
0
8
125
177
85
92
10
1
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TupleSections #-} -- |Various join strategies. The basic joins are of the 'summaryJoin' family. -- These can be augmented with the @overwriteWith*@ difference handlers. mod...
jtapolczai/FileSync
System/IO/FileSync/JoinStrategies.hs
apache-2.0
11,684
0
22
2,641
2,349
1,234
1,115
177
4
{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module Phaedrus.Types ( Phaedrus(..) , runPhaedrus , PhaedrusOpts(..) , Division(....
erochest/phaedrus
Phaedrus/Types.hs
apache-2.0
3,847
0
12
1,365
922
538
384
188
1
-- -- Copyright (c) 2013, Carl Joachim Svenn -- 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 notice...
karamellpelle/MEnv
source/GUI/GUIState.hs
bsd-2-clause
2,885
0
9
737
234
157
77
64
0
{-# LANGUAGE TemplateHaskell, OverloadedStrings, ScopedTypeVariables, TypeOperators #-} module Handler.Root where -- friends import Foundation -- | Root page redirects immediately to effects list page. -- getHomeR :: Handler RepHtml getHomeR = redirect RedirectSeeOther ListEffectsR -- | 'About' page. -- getAboutR ...
sseefried/funky-foto
Handler/Root.hs
bsd-2-clause
399
0
9
55
60
34
26
7
1
module Text.Twine.Parser.Types where import Data.ByteString.Char8 (ByteString) type Key = ByteString type Name = ByteString type Template = [TemplateCode] data Expr = Func Name [Expr] | Var Name | StringLiteral ByteString | NumberLiteral Integer | Accessor Expr Expr deriving (Show,Read,Eq) ...
jamessanders/twine
src/Text/Twine/Parser/Types.hs
bsd-2-clause
534
0
7
122
161
97
64
21
0
{- | Module : Codec.Goat.TimeFrame Description : Top-level header for time compression Copyright : (c) Daniel Lovasko, 2016-2017 License : BSD3 Maintainer : Daniel Lovasko <daniel.lovasko@gmail.com> Stability : stable Portability : portable -} module Codec.Goat.TimeFrame ( TimeFrame(..) , timeDecode , t...
lovasko/goat
src/Codec/Goat/TimeFrame.hs
bsd-2-clause
443
0
5
66
44
31
13
7
0
module HSync.Client.Download where import Network import HSync.Client.Import hiding (newManager) import HSync.Client.Actions import HSync.Client.Foundation import System.Environment main = runMain $ do b <- login liftIO $ print b -- storeDirectory (Path ["foo"]) tr <- getCurrentRealm (Path []) lif...
noinia/hsync-client
src/HSync/Client/Download.hs
bsd-3-clause
365
0
12
69
108
57
51
12
1
-- | Contains implementation of complete binary tree. -- Declares the tree type as instance of type classes -- Functor, Foldable, Traversable. module Struct.Internal.CompleteBinaryTree where import Prelude hiding (foldr) import Control.Applicative import Data.Monoid import Data.Foldable import Data.Traversable da...
roman-kashitsyn/pfds
src/Struct/Internal/CompleteBinaryTree.hs
bsd-3-clause
862
0
9
195
350
185
165
19
1
import System.Environment (getArgs) import Data.List (sort, transpose) import Data.List.Split (splitOn) unflatten :: Int -> [Int] -> [[Int]] unflatten _ [] = [] unflatten x ys = take x ys : unflatten x (drop x ys) sudosqus :: Int -> [Int] -> Bool sudosqus 4 ys = sudorows 4 (take 2 ys ++ take 2 (drop 4 ys)) su...
nikai3d/ce-challenges
moderate/sudoku.hs
bsd-3-clause
1,416
0
20
472
698
344
354
29
1
module Framework where import Framework.Api
ojw/admin-and-dev
src/Framework.hs
bsd-3-clause
46
0
4
7
9
6
3
2
0
module A where import qualified B exportedString :: String exportedString = "another string" aString :: String aString = B.exportedString
23Skidoo/ghc-parmake
tests/data/executable-mutrec/A.hs
bsd-3-clause
148
0
5
29
30
19
11
6
1