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 SpacialGameMsg.RunSGMsg where import SpacialGameMsg.SGModelMsg import qualified PureAgents2DDiscrete as Front import qualified Graphics.Gloss as GLO import Graphics.Gloss.Interface.IO.Simulate import qualified PureAgentsPar as PA import System.Random import Data.Maybe import Data.List winSize = (1000, 1000) ...
thalerjonathan/phd
public/ArtIterating/code/haskell/PureAgentsPar/src/SpacialGameMsg/RunSGMsg.hs
gpl-3.0
4,559
0
12
1,703
1,195
629
566
87
1
module Helium.StaticAnalysis.Messages.Information where import Top.Types import Helium.Main.CompileUtils import Helium.Parser.OperatorTable import Helium.StaticAnalysis.Messages.Messages hiding (Constructor) import Helium.Syntax.UHA_Syntax hiding (Fixity) import Helium.Syntax.UHA_Utils import Helium.Syntax.UHA_Range i...
roberth/uu-helium
src/Helium/StaticAnalysis/Messages/Information.hs
gpl-3.0
6,163
0
23
2,068
1,837
919
918
121
7
{-# LANGUAGE TemplateHaskell, GeneralizedNewtypeDeriving, TupleSections #-} module Lamdu.GUI.IOTrans ( IOTrans(..), ioTrans, trans, liftTrans, liftIO, liftIOT, liftTIO ) where import qualified Control.Lens as Lens import Data.Functor.Compose (Compose(..)) import Revision.Deltum.Transaction...
lamdu/lamdu
src/Lamdu/GUI/IOTrans.hs
gpl-3.0
1,544
0
14
379
501
269
232
-1
-1
import Control.Arrow ((&&&)) import Test.Hspec (Spec, describe, it, shouldBe, shouldNotBe) import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith) import qualified Data.Vector as Vector (fromList) import Matrix ( Matrix , cols , column , flatten , fromList , fromString , reshape ...
daewon/til
exercism/haskell/matrix/test/Tests.hs
mpl-2.0
2,760
0
14
805
898
475
423
64
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-admin-directory/gen/Network/Google/Resource/Directory/OrgUnits/Insert.hs
mpl-2.0
5,167
0
20
1,252
794
463
331
116
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-adexchangebuyer2/gen/Network/Google/Resource/AdExchangeBuyer2/Accounts/Creatives/Watch.hs
mpl-2.0
6,043
0
19
1,387
865
505
360
127
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE TypeOperators #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-duplicate-exports #-} -- | -- Module : Network.Google.Tracing -- Copyright : (c) 2015-2016 Brendan Hay -- License : Mozilla Publ...
brendanhay/gogol
gogol-tracing/gen/Network/Google/Tracing.hs
mpl-2.0
4,519
0
7
1,164
523
378
145
133
0
{-# LANGUAGE CPP #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE OverloadedStrings #-} -- | 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 overridin...
tehgeekmeister/apters-web
config/Settings.hs
agpl-3.0
5,799
0
12
1,024
641
386
255
65
2
zItazySunefp twgq nlyo lwojjoBiecao = let mhIarjyai = ukwAausnfcn $ XojlsTOSR.vuwOvuvdAZUOJaa $ XojlsTOSR.vkesForanLiufjeDI $ XojlsTOSR.vkesForanLiufjeDI $ XojlsTOSR.popjAyijoWarueeP $ XojlsTOSR.jpwuPmafuDqlbkt nlyo $ XojlsTOSR.jpwuPmafuDqlbkt xxnesw...
lspitzner/brittany
data/Test345.hs
agpl-3.0
540
0
18
143
115
55
60
13
1
-- yammat - Yet Another MateMAT -- Copyright (C) 2015 Amedeo Molnár -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Affero General Public License as published -- by the Free Software Foundation, either version 3 of the License, or -- (at your option) an...
Mic92/yammat
Handler/Buy.hs
agpl-3.0
4,826
0
30
1,468
1,162
557
605
-1
-1
module Lupo.Backends.View ( makeViewFactory ) where import Lupo.Application import qualified Lupo.Backends.View.Views as V import Lupo.View makeViewFactory :: ViewFactory LupoHandler makeViewFactory = ViewFactory { _singleDayView = V.singleDayView , _multiDaysView = V.multiDaysView , _monthView = V.monthVie...
keitax/lupo
src/Lupo/Backends/View.hs
lgpl-3.0
585
0
7
91
127
80
47
17
1
module Main where import qualified Data.ByteString.Lazy.Char8 as BL import System.Environment (getArgs) import Data.Aeson (decode, Value) import Data.Aeson.Encode.Pretty (encodePretty) import Data.Aeson.Query printJson j = BL.putStrLn $ encodePretty j main = do arg <- fmap head getArgs case parseFilter arg ...
jaimeMF/aeson-query
aeson-query.hs
unlicense
493
0
14
124
155
81
74
14
2
-- | -- Module : DMSS.Crypto -- License : Public Domain -- -- Maintainer : daveparrish@tutanota.com -- Stability : experimental -- Portability : untested -- -- Dead Man Switch System crypto functions -- --{-# LANGUAGE PartialTypeSignatures #-} {-# LANGUAGE DataKinds #-} module DMSS.Crypto where import DM...
dmp1ce/DMSS
src-lib/DMSS/Crypto.hs
unlicense
3,448
0
17
1,021
809
433
376
59
3
{-# LANGUAGE UnicodeSyntax, CPP #-} module Swift where import Data.List (intercalate) import Data.Maybe (fromMaybe) import Static import Language hiding (generate) import Util swift ∷ Bool → Typename → Typename → Language swift overload transport interface = Language generate wrapEnts (intDefs transport interface) ...
cfr/burningbar
src/Swift.hs
unlicense
5,983
0
25
1,863
1,906
955
951
86
9
{-# LANGUAGE PackageImports , MultiWayIf #-} module Main where import Data.List ( isPrefixOf , delete ) import Data.Char ( isUpper , toUpper , toLower ) import Text.PrettyPrint ( Doc , empty , render , char , text , nest , (<+>) , ($+$) ) import qualified Data.Map as M im...
SKA-ScienceDataProcessor/RC
MS2/lib/OskarCfg/generator/OskarCfgGenerator.hs
apache-2.0
3,859
0
16
818
1,363
691
672
94
3
<?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="ru-RU"> <title>HTTPS Info Add-on</title> <maps> <homeID>httpsinfo</homeID> <mapref loca...
secdec/zap-extensions
addOns/httpsInfo/src/main/javahelp/org/zaproxy/zap/extension/httpsinfo/resources/help_ru_RU/helpset_ru_RU.hs
apache-2.0
968
77
67
157
413
209
204
-1
-1
import Data.Char main = do contents <- getContents putStr $ map toUpper contents
EricYT/Haskell
src/chapter-9-1.hs
apache-2.0
90
0
8
22
30
14
16
4
1
-- Reverse Sequence main = do c <- getContents let i = (lines c)!!0 o = reverse i putStrLn o
a143753/AOJ
0006.hs
apache-2.0
106
0
12
33
47
22
25
5
1
module JDBC.Types.Ref ( getBaseTypeNameRef, getObjectRef, getObjectRef2, setObjectRef) where import Java import JDBC.Types foreign import java unsafe "@interface getBaseTypeName" getBaseTypeNameRef :: Java Ref JString foreign import java unsafe "@interface getObject" getObjectRef :: Java Ref Object fo...
Jyothsnasrinivas/eta-jdbc
src/JDBC/Types/Ref.hs
apache-2.0
682
12
10
110
191
103
88
-1
-1
{-# LANGUAGE OverloadedStrings #-} -- | CouchDB document attachments. -- -- /Note about attachment paths:/ Attachments may have embedded @\/@ -- characters that are sent unescaped to CouchDB. You can use this to -- provide a subtree of attachments under a document. A DocID must have -- any @\/@ escap...
akaspin/couchdb-conduit
src/Database/CouchDB/Conduit/Attachment.hs
bsd-2-clause
3,506
0
13
944
683
381
302
67
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/Game/Data/Shape.hs
bsd-2-clause
1,953
0
12
446
195
116
79
24
1
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QStyleOptionGraphicsItem.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:35 Warning : this file is machine gen...
keera-studios/hsQt
Qtc/Enums/Gui/QStyleOptionGraphicsItem.hs
bsd-2-clause
4,829
0
18
921
1,080
532
548
90
1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE BangPatterns #-} module Network.HTTPMock.Interactions (getResponse) where import ClassyPrelude import Control.Lens import Debug.Trace (traceShow) import Data.NonEmpty ((!:)) import qualified Data.NonEmpty as NE import Network.HTTPMock....
MichaelXavier/HTTPMock
src/Network/HTTPMock/Interactions.hs
bsd-2-clause
2,592
0
13
451
432
250
182
-1
-1
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-} module DecisionProcedure.Opra8 ( module DecisionProcedure.Opra ) where -- standard modules -- local modules import Basics import Calculus.Opra8 import DecisionProcedure import DecisionProcedure.AlgebraicClosure --import DecisionProcedure.AlgebraicGeome...
spatial-reasoning/zeno
src/DecisionProcedure/Opra8.hs
bsd-2-clause
1,016
0
11
211
162
89
73
21
0
module Main where import StringMatching import System.Environment import System.Exit import Data.RString.RString main :: IO () main = do args <- getArgs case args of (i:j:fname:target:_) -> do input <- fromString <$> readFile fname let parfactor = (read i :: ...
nikivazou/verified_string_matching
src/Main.hs
bsd-3-clause
990
0
16
424
189
96
93
18
3
module System.Build.Access.Public where class Public r where setPublic :: r -> r unsetPublic :: r -> r
tonymorris/lastik
System/Build/Access/Public.hs
bsd-3-clause
128
0
7
42
35
20
15
8
0
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE FlexibleInstances #-} module Network.Libtorrent.FileStorage.FileSlice (FileSlice(..) , getFileIndex ...
eryx67/haskell-libtorrent
src/Network/Libtorrent/FileStorage/FileSlice.hs
bsd-3-clause
1,986
0
9
543
415
237
178
44
1
import System.Random import Control.Concurrent import System.ProgressBar import System.IO ( hSetBuffering, BufferMode(NoBuffering), stdout ) main = do hSetBuffering stdout NoBuffering c <- randomRIO ('a','z') putStrLn "\n+---------+---------+---------+---------+---------+---------+---------+---------+---------...
j4/baccalaureat
baccalaureat.hs
bsd-3-clause
955
0
13
183
240
114
126
21
1
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} {- | Module : Data.Conduit.Network.Stream Copyright : Nils Schweinsberg License : BSD-style Maintainer : Nils Schweinsberg <mail@nils.cc> Stability : experimental Easy to use network streaming with conduits. This library p...
mcmaniac/conduit-network-stream
src/Data/Conduit/Network/Stream.hs
bsd-3-clause
7,561
0
14
1,483
1,223
652
571
94
3
{-# LANGUAGE ScopedTypeVariables #-} module Astro.Time.AtSpec where import Data.List (sort) import Test.Hspec import Test.QuickCheck (property, (==>)) import Numeric.Units.Dimensional.Prelude import qualified Prelude import Astro.Time import Astro.Time.At import TestInstances main = hspec spec spec = do spec_al...
bjornbm/astro
test/Astro/Time/AtSpec.hs
bsd-3-clause
2,069
0
25
542
879
465
414
44
2
{-# LANGUAGE OverloadedStrings, QuasiQuotes, ViewPatterns #-} module Grin.PrimOpsPrelude where import Grin.Grin import Grin.TH {- These predefined primitive operations are optional. This is a utility module for front-ends and the grin CLI use `grin --no-prelude` to exclude these predefined primitive operations ...
andorp/grin
grin/src/Grin/PrimOpsPrelude.hs
bsd-3-clause
3,429
0
6
818
58
36
22
8
1
module Week6 where fib :: Integer -> Integer fib 0 = 0 fib 1 = 1 fib n = fib (n-1) + fib(n-2) fibs1 :: [Integer] fibs1 = map fib [0,1..] {- take 5 element of fibsl fibsl = fib 4 + fib 3 = fib 3 + fib 2 + fib 2 + fib 1 = fib 2 + fib 1 + fib 1 + fib 0 + fib 1 + fib 0 + fib1 -} data Stream a = Co...
zach007/cis194
src/Week6.hs
bsd-3-clause
824
1
9
220
347
178
169
20
1
{-# LANGUAGE OverloadedStrings #-} module Stashh.Repos.Model where import Stashh.Table import Stashh.Model.Type import qualified Stashh.AnsiColor as C import Data.Maybe import Control.Applicative import qualified Data.Vector as V import Data.Aeson ---------------------------------------------- -- Repos data ReposR...
yuroyoro/stashh
src/Stashh/Repos/Model.hs
bsd-3-clause
2,460
0
23
1,008
589
319
270
64
0
{-# LANGUAGE TupleSections #-} module Handler.Resource where import Import import Model.List import Model.Resource import Model.User (thisUserHasAuthorityOverDB) import View.Browse import View.Resource import qualified Data.Set as S getResourc...
mitchellwrosen/dohaskell
src/Handler/Resource.hs
bsd-3-clause
7,372
0
23
2,795
1,473
731
742
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ViewPatterns #-} import qualified Data.ByteString.Lazy.Char8 as L8 import Network.HTTP.Types (status200) import Network.Wai ...
tolysz/Diag
Main.hs
bsd-3-clause
1,754
0
12
524
334
182
152
43
1
module Jade.Decode.Coord where import Jade.Decode.Types transformX rot x y = case fromEnum rot of 0 -> x 1 -> -y 2 -> -x 3 -> y 4 -> -x 5 -> -y 6 -> x 7 -> y transformY rot x y = case fromEnum rot of 1 -> x 7 -> x 2 -> -y 6 -> -y 3 -> -x 5 -> -x 0 -> ...
drhodes/jade2hdl
jade-decode/src/Jade/Decode/Coord.hs
bsd-3-clause
2,239
0
11
722
1,060
581
479
67
8
{-# LANGUAGE CPP #-} {-# LANGUAGE GADTSyntax, ExistentialQuantification, RankNTypes, ScopedTypeVariables #-} {-# LANGUAGE OverloadedStrings #-} module Notate.Interpret where import Control.Concurrent import Control.DeepSeq import Control.Monad import Control.Monad.Catch import Control.Exception (AsyncExcep...
ejconlon/notate
src/Notate/Interpret.hs
bsd-3-clause
5,743
0
19
1,560
1,440
724
716
-1
-1
module Type ( typeEqual , typeOf , typeOfPattern , simplifyType ) where import Base import Context import Data.List (find) import qualified Data.HashSet as S typeMap :: (Int -> TermType) -> TermType -> TermType typeMap onvar ty = go ty where go TypeBool = TypeBool go TypeNat...
foreverbell/unlimited-plt-toys
tapl/fullsimple/Type.hs
bsd-3-clause
6,158
0
15
1,575
2,104
1,067
1,037
129
19
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.Raw.ARB.PointSprite -- Copyright : (c) Sven Panne 2015 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : portable -- ...
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/ARB/PointSprite.hs
bsd-3-clause
668
0
4
81
40
33
7
4
0
module Chapter12 where import Data.Maybe notThe :: String -> Maybe String notThe x | x == "the" = Nothing | otherwise = Just x replaceThe :: String -> String replaceThe x = case words x of (h : t) -> (fromMaybe "a" . notThe) h ++ (replaceThe . unwords) t [] -> [] vowel...
taojang/haskell-programming-book-exercise
src/ch12/Chapter12.hs
bsd-3-clause
2,395
0
14
764
992
507
485
72
3
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE OverlappingInstances #-} module CrispMain ( main ) where import Parser import Emit import Options import Syntax import System.Console.Haskeline import System.Environment (getArgs) import qualified LLVM.General.AST as AST import Data.Functor (void) import Data.Maybe ...
talw/crisp-compiler
src/CrispMain.hs
bsd-3-clause
2,191
0
17
428
669
355
314
69
2
{-# LANGUAGE TypeOperators #-} module Evaluator.Syntax where import Evaluator.Deeds import Core.FreeVars import Core.Renaming import Core.Size import Core.Syntax import Core.Tag import Renaming import Utilities import qualified Data.Map as M type Anned = Tagged :.: Sized :.: FVed type AnnedTerm = Anned (TermF Ann...
batterseapower/chsc
Evaluator/Syntax.hs
bsd-3-clause
7,346
0
17
1,482
2,237
1,169
1,068
135
4
{-# LANGUAGE NoImplicitPrelude #-} module Utils where import Data.Natural import Prelude (Bool, Int, Maybe (..), Show, String, id, ($), (&&), (+), (-), (.), (<), (<=), (>), (>=)) import Types -- Helpers needed to dealing with the View/Natural encoding...
mbbx6spp/animated-fiesta
src/Utils.hs
bsd-3-clause
1,893
0
9
468
414
256
158
22
1
module Control.Yield.Flat where import Control.Monad (liftM) data Producing o i m r = Yield o (i -> Producing o i m r) | M (m (Producing o i m r)) | R r newtype Consuming r m i o = Consuming { provide :: i -> Producing o i m r } data ProducerState o i m r = Produced o (Consuming r m i o) | Done r fro...
DanBurton/yield
Control/Yield/Flat.hs
bsd-3-clause
666
0
11
176
355
186
169
19
2
module Ttlv.Validator.Types ( string , stringEq , tStruct , tEnum , tByteString , tString , tBigInt , tInt ...
nymacro/hs-kmip
src/Ttlv/Validator/Types.hs
bsd-3-clause
2,469
0
12
843
735
376
359
66
3
-- | -- Module: Pin -- Copyright: (c) 2012 Mark Hibberd -- License: BSD3 -- Maintainer: Mark Hibberd <mark@hibberd.id.au> -- Portability: portable -- -- Library for pin.net.au HTTP Api -- module Network.Api.Pin (module X) where import Network.Api.Pin.Core as X import Network.Api.Pin.Data as X import Networ...
markhibberd/pin
src/Network/Api/Pin.hs
bsd-3-clause
344
0
4
60
49
39
10
4
0
{-# LANGUAGE OverloadedStrings, TypeFamilies, TupleSections, FlexibleContexts, PackageImports #-} module Server (xmpp, SHandle(..)) where import Control.Arrow import Control.Monad import "monads-tf" Control.Monad.State import Control.Concurrent (forkIO) import Data.Maybe import Data.Pipe import Data.HandleLike impor...
YoshikuniJujo/forest
subprojects/xmpipe/Server.hs
bsd-3-clause
8,944
198
14
1,548
3,983
2,123
1,860
241
2
-- | Infinite supplies of unique values. module Control.Monad.Supply.Class ( MonadSupply , fresh ) where class MonadSupply a m | m -> a where fresh :: m a
iron-codegen/iron
library/Control/Monad/Supply/Class.hs
bsd-3-clause
164
0
7
37
42
25
17
-1
-1
{-# LANGUAGE CPP, GeneralizedNewtypeDeriving, DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses, FunctionalDependencies, TypeSynonymInstances, RankNTypes #-} module System.File.Tree ( -- *Directory tree structure FSTree(..), mkFSTree, FSForest -- *Generic...
kallisti-dev/filesystem-trees
src/System/File/Tree.hs
bsd-3-clause
16,588
0
20
4,248
3,672
2,020
1,652
240
3
{- Glossary: a simple glossary generator for Barrelfish Copyright (c) 2010, ETH Zurich. All rights reserved. This file is distributed under the terms in the attached LICENSE file. If you do not find this file, copies can be found by writing to: ETH Zurich D-INFK, Universitaetstrasse 6, CH-8092 Zurich. At...
BarrelfishOS/barrelfish
doc/001-glossary/Main.hs
mit
24,650
0
13
8,200
1,095
565
530
140
1
-- The University of New Mexico's Haskell Image Processing Library -- Copyright (C) 2013 Joseph Collard -- -- 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...
jcollard/unm-hip
Data/Image/IO.hs
gpl-3.0
3,852
0
13
896
1,034
570
464
50
2
-- | Support for running propellor, as built outside a docker container, -- inside the container. -- -- Note: This is currently Debian specific, due to glibcLibs. module Propellor.Property.Docker.Shim (setup, cleanEnv, file) where import Propellor import Utility.LinuxMkLibs import Utility.SafeCommand import Utility.P...
abailly/propellor-test2
src/Propellor/Property/Docker/Shim.hs
bsd-2-clause
1,922
17
18
340
581
295
286
44
1
module Main where ------------------------------------------------------------------------ -- Imports ------------------------------------------------------------------------ import Prelude hiding (head, take, drop, takeWhile, dropWhile, break, span, length, map) import Data.Monoid (Monoid (..)) import qualified Data...
tanimoto/iteratee
tests/checks.hs
bsd-3-clause
2,638
0
11
466
890
468
422
66
1
{-# LANGUAGE FlexibleContexts #-} ----------------------------------------------------------------------------- -- | -- Module : Diagrams.TwoD.Layout.CirclePacking -- Copyright : (c) 2012 Joachim Breitner -- License : BSD-style (see LICENSE) -- Maintainer : mail@joachim-breitner.de -- -- A method for l...
kuribas/diagrams-contrib
src/Diagrams/TwoD/Layout/CirclePacking.hs
bsd-3-clause
4,305
0
18
923
737
413
324
31
2
{- ProcessRing benchmarks. To run the benchmarks, select a value for the ring size (sz) and the number of times to send a message around the ring -} import Control.Monad import Control.Distributed.Process hiding (catch) import Control.Distributed.Process.Node import Control.Exception (catch, SomeException) import Net...
hackern/network-transport-ivc
benchmarks/ProcessRing.hs
mit
3,841
97
14
1,083
1,225
656
569
-1
-1
module Sortier.Programm.Merge_Insertion where import Sortier.Programm.Type import Autolib.TES.Identifier type Stack = [ Identifier ] sort :: [ Stack ] -> [ Statement ] sort xs | length xs < 2 = [] sort xs = let ( ps, rest ) = pairs xs mkpairs = do [ y, x ] <- ps return $ If_Great...
florianpilz/autotool
src/Sortier/Programm/Merge_Insertion.hs
gpl-2.0
1,187
2
15
471
508
262
246
-1
-1
----------------------------------------------------------------------------------------- {-| Module : HaskellNames Copyright : (c) Daan Leijen 2003 License : BSD-style Maintainer : wxhaskell-devel@lists.sourceforge.net Stability : provisional Portability : portable ...
sherwoodwang/wxHaskell
wxdirect/src/HaskellNames.hs
lgpl-2.1
5,733
0
15
1,617
1,245
639
606
123
5
{-@ LIQUID "--no-termination" @-} module RedBlackTree where import Language.Haskell.Liquid.Prelude data RBTree a = Leaf | Node Color a !(RBTree a) !(RBTree a) deriving (Show) data Color = B -- ^ Black | R -- ^ Red deriving (Eq,Show) ----------------------------...
ssaavedra/liquidhaskell
tests/pos/RBTree-col-height.hs
bsd-3-clause
8,121
0
17
2,609
2,029
1,031
998
77
7
{-# LANGUAGE OverloadedStrings #-} import Text.LaTeX import Text.LaTeX.Packages.Inputenc import Text.LaTeX.Packages.AMSMath import Data.Ratio import Data.Matrix main :: IO () main = renderFile "texy.tex" example example :: LaTeX example = thePreamble <> document theBody thePreamble :: LaTeX thePreamble = doc...
dmcclean/HaTeX
Examples/texy.hs
bsd-3-clause
932
16
10
173
328
168
160
27
1
import StackTest import System.Directory main :: IO () main = do copyFile "orig-stack.yaml" "stack.yaml" stack ["--resolver", "lts-9.14", "solver", "--update-config"] stack ["build"]
anton-dessiatov/stack
test/integration/tests/3533-extra-deps-solver/Main.hs
bsd-3-clause
196
0
8
34
59
30
29
7
1
{-# LANGUAGE CPP, NondecreasingIndentation #-} {-# OPTIONS -fno-warn-incomplete-patterns -optc-DNON_POSIX_SOURCE #-} ----------------------------------------------------------------------------- -- -- GHC Driver program -- -- (c) The University of Glasgow 2005 -- -------------------------------------------------------...
green-haskell/ghc
ghc/Main.hs
bsd-3-clause
34,698
0
27
9,671
7,097
3,666
3,431
542
15
module Options.Verbosity where import Types verbosityOptions :: [Flag] verbosityOptions = [ flag { flagName = "-v" , flagDescription = "verbose mode (equivalent to ``-v3``)" , flagType = DynamicFlag } , flag { flagName = "-v⟨n⟩" , flagDescription = "set verbosity level" ...
snoyberg/ghc
utils/mkUserGuidePart/Options/Verbosity.hs
bsd-3-clause
2,677
0
8
816
339
219
120
57
1
{-# LANGUAGE CPP #-} module RegAlloc.Linear.FreeRegs ( FR(..), maxSpillSlots ) #include "HsVersions.h" where import GhcPrelude import Reg import RegClass import DynFlags import Panic import Platform -- ----------------------------------------------------------------------------- -- The free register set ...
ezyang/ghc
compiler/nativeGen/RegAlloc/Linear/FreeRegs.hs
bsd-3-clause
3,055
0
10
742
551
312
239
58
13
module Heredoc (str) where import Language.Haskell.TH import Language.Haskell.TH.Quote str = QuasiQuoter { quoteExp = stringE, -- From https://hackage.haskell.org/package/authoring-0.3.3.1/docs/src/Text-Authoring-TH.html quotePat = error "Authoring QuasiQuotes are only for expression context", quoteT...
blast-hardcheese/cryptopals
src/Heredoc.hs
mit
469
0
7
73
63
39
24
8
1
import Data.List import Data.Ord import Diagrams.Prelude import Diagrams.Backend.SVG.CmdLine import Viz.Catalan import Bijections import Catalan import ChordDiagrams import Viz.List main = do putStr "(n, isConnected): " (n,b) <- getLine >>= return . read let invs = filter (if b then isConnectedInv else isIndec...
noamz/linlam-gos
src/Viz/VizChordDiagramsByTerminals.hs
mit
846
0
21
186
362
185
177
19
2
{-# LANGUAGE OverloadedStrings, TemplateHaskell, DeriveGeneric, ScopedTypeVariables, FlexibleInstances #-} module Toaster.Http (module X, toastermain) where import Toaster.Http.Prelude as X import Toaster.Http.Message as X import Web.Scotty import Control.Lens import Database.PostgreSQL.Simple import Data.Pool im...
nhibberd/toaster
src/Toaster/Http.hs
mit
1,305
0
17
334
464
222
242
39
1
module Collab.Parse ( parseMessage ) where import Data.Text (Text) import qualified Data.Text as T -- | Returns a tuple with three texts: (event, sender, data) -- -- > parseMessage "code{}" -- > ==> ("code", "", "{}") -- > parseMessage "members" -- > ==> ("members", "", "") -- > parsemessage "code@sender{}" -- > ...
dennis84/collab-haskell
src/Collab/Parse.hs
mit
724
0
9
154
200
116
84
12
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ViewPatterns #-} module Unison.Codebase.Editor.Git where import Unison.Prelude import qualified Control.Exception import Control.Monad.Except (MonadError, throwError) import qualified Data.Text as Text import Shellmet (($?), ($^), ($|)) import System.FilePath ((</>)) i...
unisonweb/platform
parser-typechecker/src/Unison/Codebase/Editor/Git.hs
mit
5,744
0
19
1,177
1,623
846
777
-1
-1
-------------------------------------------------------------------------- -- Copyright (c) 2007-2010, ETH Zurich. -- All rights reserved. -- -- This file is distributed under the terms in the attached LICENSE file. -- If you do not find this file, copies can be found by writing to: -- ETH Zurich D-INFK, Haldeneggsteig...
utsav2601/cmpe295A
hake/K1om.hs
mit
7,351
8
17
3,075
925
532
393
125
1
{-# OPTIONS_GHC -w #-} module Latte.Lang.Print where -- pretty-printer generated by the BNF converter import Latte.Lang.Abs import Data.Char -- the top-level printing method printTree :: Print a => a -> String printTree = render . prt 0 type Doc = [ShowS] -> [ShowS] doc :: ShowS -> Doc doc = (:) render :: Doc ->...
mpsk2/LatteCompiler
src/Latte/Lang/Print.hs
mit
7,153
0
16
1,756
3,891
1,911
1,980
141
12
{-# LANGUAGE OverloadedStrings #-} import Web.Scotty main :: IO () main = scotty 3000 $ do get "/:word" $ do beam <- param "word" html $ mconcat ["<h1>Scotty, ", beam, " me up!</h1>"]
gdevanla/helloscotty
Main.hs
mit
196
0
13
45
68
33
35
7
1
module Hpcb.Data.Graphic ( Graphic(..) ) where import Hpcb.SExpr import Hpcb.Data.Action import Hpcb.Data.Base import Hpcb.Data.Layer import Hpcb.Data.Effects -- | Graphic elements that are not inside footprints. data Graphic = GrLine (V2 Float) (V2 Float) Float Layer Float -- ^ start, end, angle, layer, width ...
iemxblog/hpcb
src/Hpcb/Data/Graphic.hs
mit
2,005
0
10
526
862
435
427
49
0
{-# OPTIONS_GHC -fno-warn-orphans #-} module Graphics.Urho3D.Scene.Scene( Scene , sceneContext , SharedScene ) where import qualified Language.C.Inline as C import qualified Language.C.Inline.Cpp as C import Graphics.Urho3D.Scene.Internal.Scene import Graphics.Urho3D.Scene.Node import Graphics.Urho3D.Conta...
Teaspot-Studio/Urho3D-Haskell
src/Graphics/Urho3D/Scene/Scene.hs
mit
1,367
0
14
179
344
199
145
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-workspaces-workspace-workspaceproperties.html module Stratosphere.ResourceProperties.WorkSpacesWorkspaceWorks...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/WorkSpacesWorkspaceWorkspaceProperties.hs
mit
4,686
0
12
350
538
305
233
42
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} ------------------------------------------------------------------------------ -- | This module defines our application's state type and an alias for its -- handler monad. module ...
marksauter/reactd3
server/Application.hs
mit
806
0
9
92
80
50
30
14
0
module NgLint.Messages where import Control.Arrow ((>>>)) import NgLint.Parser import NgLint.Position import Text.Parsec.Pos (SourcePos) data ErrorCode = NG001 | NG002 | NG003 | NG004 | NG005 deriving (Eq) data LintMessage = LintMessage SourcePos ErrorCode deriving (Eq) instance Show LintMessage where show (Lin...
federicobond/nglint
src/NgLint/Messages.hs
mit
1,085
0
9
201
283
150
133
22
1
module Handler.Search where import Import getSearchR :: Handler Html getSearchR = do search <- fromMaybe "" <$> lookupGetParam "search" defaultLayout $ do setTitle $ toHtml $ "Search: " ++ search $(widgetFile "search")
fpco/schoolofhaskell.com
src/Handler/Search.hs
mit
245
0
12
58
71
34
37
8
1
var food = query_inventory("food"); var tools = query_inventory("tools"); var has_food = food >= 1; var has_tools = tools >= 1; if(has_food){ if(has_tools){ //produce 2 wood, consume 1 food, break tools with 10% chance produce(agent,"wood",2); consume(agent,"food",1); consume(agent,"tools",1,0.1); }else{ ...
larsiusprime/bazaarBot
examples/doran_and_parberry/Assets/scripts/woodcutter.hs
mit
549
29
9
85
275
165
110
-1
-1
module BadIntel.Config.Config ( MonadConfig , Config (..) , pickName ) where import Control.Monad.State import BadIntel.Types.Common import BadIntel.Random.Names type MonadConfig a = StateT Config a data Config = Config { _ukNameCollection :: NameCollection , _ruNameCollection :: NameCollection...
Raveline/BadIntel
lib/BadIntel/Config/Config.hs
gpl-2.0
1,107
0
10
277
283
149
134
24
1
{-| Implementation of the generic daemon functionality. -} {- Copyright (C) 2011, 2012 Google Inc. 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 2 of the License, or (at your opti...
narurien/ganeti-ceph
src/Ganeti/Daemon.hs
gpl-2.0
14,817
0
16
3,429
3,142
1,633
1,509
304
4
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} -- | This is the main module of Yi, called with configuration from the user. -- Here we mainly process command line arguments. module Yi.Main ( -- * Static main ...
yi-editor/yi
yi-dynamic-configuration/src/Yi/Main.hs
gpl-2.0
7,256
0
21
1,912
1,866
999
867
130
16
{- | Module : $Header$ Description : parser for CASL architectural specifications Copyright : (c) Maciek Makowski, Warsaw University 2003-2004, C. Maeder License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provisional Portability : non-portable (via imports)...
nevrenato/HetsAlloy
Syntax/Parse_AS_Architecture.hs
gpl-2.0
9,435
0
16
2,038
2,378
1,165
1,213
170
2
{-# LANGUAGE OverlappingInstances, TemplateHaskell, DeriveDataTypeable #-} module Prolog.Programming.Data where import Autolib.ToDoc (ToDoc(..), vcat, text, nest) import Autolib.Reader import Autolib.Size import Data.Typeable import Language.Prolog (term, Term) import Text.Parsec import Control.Applicative ((<$>),(...
Erdwolf/autotool-bonn
src/Prolog/Programming/Data.hs
gpl-2.0
973
0
10
178
348
188
160
23
0
module Direction where data Direction = NORTH | WEST | SOUTH | EAST deriving (Show,Read)
FiskerLars/2048.hs
Direction.hs
gpl-2.0
150
0
6
76
31
19
12
6
0
{-# LANGUAGE Arrows #-} module SD ( runSD ) where import FRP.Yampa runSD :: Double -> Double -> Double -> Double -> Double -> Time -> DTime -> [(Double, Double, Double)] runSD populationSize infectedCount contactRate infectivity illne...
thalerjonathan/phd
coding/papers/pfe/testing/src/SD.hs
gpl-3.0
1,235
1
19
433
420
235
185
39
1
{-# LANGUAGE OverloadedStrings #-} module Database.Hedsql.Tests.PrettyPrint ( tests ) where -------------------------------------------------------------------------------- -- IMPORTS -------------------------------------------------------------------------------- import Database.Hedsql.Examples.Cr...
momomimachli/Hedsql-tests
src/Database/Hedsql/Tests/PrettyPrint.hs
gpl-3.0
11,864
0
10
3,924
1,163
643
520
218
1
-- split a list to two with sizes n p17 :: [a] -> Int -> ([a],[a]) p17 (x:xs) n | n > 0 = let (f,l) = p17 xs (n-1) in (x:f,l) p17 xs _ = ([],xs)
yalpul/CENG242
H99/11-20/p17.hs
gpl-3.0
172
0
12
64
115
62
53
5
1
module HW01.Hanoi where import qualified Data.Map as HM import qualified Data.Maybe as M --import qualified Debug.Trace as D {- Zadání: To move n discs (stacked in increasing size) from peg a to peg b using peg c as temporary storage, 1. move n-1 discs from a to c using b as a temporary storage 2. move the top disc f...
martinvlk/cis194-homeworks
src/HW01/Hanoi.hs
gpl-3.0
6,548
0
16
1,861
797
436
361
37
1
{-# LANGUAGE ScopedTypeVariables #-} import Control.Concurrent import Data.ByteString hiding (pack) import Data.ByteString.Char8 import Data.ByteString.Internal import Debug.Trace import Foreign.C.Error import System.Directory import System.Environment import System.Fuse import System.IO import System.Posix.Files impo...
nilcons/PrefetchFS
misc/IdentityFS.hs
gpl-3.0
3,266
0
17
790
893
457
436
75
1
module Main where import System.Random import Data.Text.Encoding main::IO() main = do putStrLn "您好" gen <- newStdGen print $ mod (fst (random gen :: (Int,StdGen))) 150
Trickness/pl_learning
Haskell/random.hs
unlicense
194
4
10
40
76
40
36
8
1
module Lib where import Control.Monad (join, void) import Data.Functor (($>)) import Data.Either.Validation {- Phil Freeman https://twitter.com/paf31/status/1108518386877628416 My new favorite Haskell trick is using Compose (Validation e) IO to implement poor-man's transactions. It's Applicative for free, and you ca...
haroldcarr/learn-haskell-coq-ml-etc
haskell/playpen/2019-03-daniel-brice-compose-validation-io/src/Lib.hs
unlicense
4,613
0
14
990
1,008
519
489
79
2
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} ------------------------------------------------------------------------------ -- | This module defines our application's state type and an alias for its -- handler monad. module Application where ----------------...
alexandrelucchesi/pfec
facade-server/src/Application.hs
apache-2.0
823
0
9
139
84
52
32
13
0
-- Copyright 2015 Peter Harpending -- -- 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 agre...
pharpend/editor-open
tests/test_yaml_file_conduit.hs
apache-2.0
1,581
0
14
323
211
130
81
18
1
{-| Module: HaskHOL.Haskell.Plugin Copyright: (c) The University of Kansas 2013 LICENSE: BSD3 Maintainer: ecaustin@ittc.ku.edu Stability: unstable Portability: unknown -} module HaskHOL.Haskell.Plugin ( plugin ) where import Control.Monad.State import HERMIT.Context (LocalPathH) import HE...
ecaustin/haskhol-haskell
src/HaskHOL/Haskell/Plugin.hs
bsd-2-clause
7,207
0
23
2,685
2,038
1,010
1,028
140
4
-- WARNING: This file is generated by tasty-integrate -- Changes made will (probably) not be saved, see documentation. {-# OPTIONS_GHC -fno-warn-missing-signatures #-} module Main where import qualified Data.QcIntegrated (prop_toPartition, prop_fromPartition, prop_fromTestpath_isomorphism) import qualifi...
jfeltz/tasty-integrate
test-suites/Suite.hs
bsd-2-clause
1,000
0
12
221
132
76
56
22
1
module Main ( main ) where import IS import Stat import Data.Char import System.Environment import Text.Printf import Text.Read import Control.Applicative main = do args <- getArgs case args of [zn, bl] -> process passedByPtsAcc "all" zn bl [rep, opt, zn, bl] -> case opt of ...
vlstill/isstat
src/Main.hs
bsd-2-clause
1,245
0
15
436
416
222
194
27
8
module Database.SqlServer.Definition.Entity ( Entity, toDoc, name, renderName ) where import Database.SqlServer.Definition.Identifier import Text.PrettyPrint class Entity a where toDoc :: a -> Doc name :: a -> RegularIdentifier renderName :: a -> Doc renderNa...
SuperDrew/sql-server-gen
src/Database/SqlServer/Definition/Entity.hs
bsd-2-clause
360
0
7
102
79
47
32
13
0
{-# LANGUAGE OverloadedStrings, DeriveGeneric, FlexibleInstances, RecordWildCards #-} import System.Environment import ZTail import Abstract.Wrapper import Abstract.Queue.Enq import Control.Monad import Data.Aeson import Data.Maybe import Data.Int import qualified Data.ByteString as BS import qualified Data.ByteStri...
adarqui/Ztail-Tools
tools/ztail-enqueue.hs
bsd-3-clause
1,886
0
13
337
586
313
273
47
2
module Control.Agent.FreeSpec (main, spec) where import Test.Hspec main :: IO () main = hspec spec spec :: Spec spec = do describe "someFunction" $ do it "should work fine" $ do True `shouldBe` True
fizruk/free-agent
test/Control/Agent/FreeSpec.hs
bsd-3-clause
214
0
13
49
77
41
36
9
1
{-# LANGUAGE ImplicitParams, FlexibleContexts, TupleSections #-} module Frontend.StatementOps(mapStat, mapStatM, statMapExpr, statMapTSpec, statLabels, statCallees, statSubprocessRec, ...
termite2/tsl
Frontend/StatementOps.hs
bsd-3-clause
12,997
0
15
4,239
5,334
2,673
2,661
187
2