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 TemplateHaskell #-} module Data.TrieMap.Representation.TH.Utils where import Language.Haskell.TH import Language.Haskell.TH.ExpandSyns decompose :: Type -> (Type, [Type]) decompose (tyfun `AppT` ty) = case decompose tyfun of (tyfun, tys) -> (tyfun, tys ++ [ty]) decompose ty = (ty, []) decompose' :: Typ...
lowasser/TrieMap
Data/TrieMap/Representation/TH/Utils.hs
bsd-3-clause
2,445
6
10
454
1,110
607
503
63
2
{-# OPTIONS_GHC -fno-warn-unused-binds -fno-warn-unused-matches -fno-warn-name-shadowing -fno-warn-missing-signatures #-} {-# LANGUAGE FlexibleInstances, ConstraintKinds, ExistentialQuantification, GADTs, RankNTypes, MultiParamTypeClasses, RankNTypes, UndecidableInstances, FlexibleContexts, TypeSynonymInstances #-} -...
lingxiao/CIS700
src/Morris.hs
bsd-3-clause
3,758
0
13
765
758
412
346
43
2
{-# LANGUAGE RecordWildCards #-} module Main where import Control.Monad (forM_) import Data.Monoid (mconcat) import Development.Shake import Development.Shake.FilePath import System.Console.GetOpt import qualified System.Info (os, arch) import Config import Dirs import GhcDist import HaddockMaster import OS import P...
bgamari/haskell-platform
hptool/src/Main.hs
bsd-3-clause
4,166
5
16
1,328
963
502
461
91
7
{-| Module : System.Process.Utils Description : Convenience functions for calling commands Copyright : (c) Michael Klein, 2016 License : BSD3 Maintainer : lambdamichael(at)gmail.com -} module System.Process.Utils where import System.Process ( readProcessWithExitCode ) import System....
michaeljklein/git-details
src/System/Process/Utils.hs
bsd-3-clause
996
0
6
306
52
39
13
4
0
{- | Provide a class that renders multiple Haskell values in a text form that is accessible by gnuplot. Maybe we add a method for the binary interface to gnuplot later. -} module Graphics.Gnuplot.Value.Tuple ( C(text, columnCount), ColumnCount(ColumnCount), ) where import System.Locale (defaultTimeLocale, ) ...
kubkon/gnuplot
src/Graphics/Gnuplot/Value/Tuple.hs
bsd-3-clause
2,863
0
11
668
868
474
394
63
1
{-# LANGUAGE EmptyDataDecls, DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-} -- | Reactive Demand Programming (RDP) design is for open, scalable, -- distributed systems. Sirea is much more humble: just one Haskell -- process. But it is still useful to model concurrent behaviors in -- Sir...
dmbarbour/Sirea
src/Sirea/Partition.hs
bsd-3-clause
5,809
0
13
1,123
630
379
251
-1
-1
module Gfx.Context ( GfxContext(..) , createGfxContext , empty ) where import Control.Monad.State.Strict ( execStateT ) import Control.Concurrent.STM ( TVar , atomically , readTVarIO ...
rumblesan/proviz
src/Gfx/Context.hs
bsd-3-clause
5,825
0
14
2,542
1,528
796
732
115
1
{-# LANGUAGE Rank2Types,ScopedTypeVariables #-} module Language.Haskell.Exts.SimpleGenerics where import Data.Data import Data.Maybe(fromJust) -- taken from SYB everywhere' :: (forall a. Data a => a -> a) -> (forall a. Data a => a -> a) everywhere' f = gmapT (everywhere' f) . f generic :: forall a b. (D...
shayan-najd/Haskell-Desugar-Generic
Language/Haskell/Exts/SimpleGenerics.hs
bsd-3-clause
1,067
0
12
411
415
218
197
23
2
{-# LANGUAGE PatternSynonyms #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.ARB.TextureRG -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : ...
haskell-opengl/OpenGLRaw
src/Graphics/GL/ARB/TextureRG.hs
bsd-3-clause
1,031
0
5
175
152
99
53
28
0
module Matterhorn.State.Help ( showHelpScreen ) where import Prelude () import Matterhorn.Prelude import Brick.Main ( viewportScroll, vScrollToBeginning ) import Matterhorn.Types showHelpScreen :: HelpTopic -> MH () showHelpScreen topic = do curMode <- use (csCurrent...
matterhorn-chat/matterhorn
src/Matterhorn/State/Help.hs
bsd-3-clause
513
0
15
151
134
69
65
14
2
module Idris.REPLParser (parseCmd, help, allHelp) where import System.FilePath ((</>)) import System.Console.ANSI (Color(..)) import Idris.Colours import Idris.AbsSyntax import Idris.Core.TT import Idris.Help import qualified Idris.Parser as P import Control.Applicative import Control.Monad.State.Strict import Tex...
bkoropoff/Idris-dev
src/Idris/REPLParser.hs
bsd-3-clause
19,466
0
21
5,029
6,192
3,185
3,007
-1
-1
module Bindings.K8055.DigitalIn ( DigitalInput(..), readDigitalChannel, readAllDigital ) where import Data.Word import Foreign.C data DigitalInput = DigitalIn1 | DigitalIn2 | DigitalIn3 | DigitalIn4 | DigitalIn5 | DigitalIn6 | DigitalIn7 | DigitalIn8 digitalInputId :: Num a => DigitalInput ->...
jputcu/bindings-K8055
Bindings/K8055/DigitalIn.hs
bsd-3-clause
1,049
0
10
220
252
134
118
38
8
module Main where import AI.DataLoader import AI.MathTmp import Graphics.Histogram import Control.Monad import Data.List import Data.Monoid import Debug.Trace import System.Directory import System.IO import Text.ParserCombinators.Parsec import qualified Data.Map as Map import qualified Graphics.Gnuplot.Advanced as ...
mikeizbicki/Classification
src/Plots.hs
bsd-3-clause
7,362
0
19
1,784
2,089
1,097
992
151
2
module Game.Monad( AppMonad , AppPeer , AppNetworkBackend , MonadApp ) where import Game.GoreAndAsh import Game.GoreAndAsh.Logging import Game.GoreAndAsh.Network import Game.GoreAndAsh.Network.Backend.TCP import Game.GoreAndAsh.Sync -- | Which network implementation to use type AppNetworkBackend = TCPBack...
Teaspot-Studio/gore-and-ash-demo
src/server/Game/Monad.hs
bsd-3-clause
760
0
9
111
148
89
59
14
0
{-# LANGUAGE ScopedTypeVariables #-} module Codec.String.Base64 ( bytes64 , ibytes64 , fillByte64 , encode64 , decode64 ) where import Prelude hiding ((.), id, (++), length) import Control.Applicative hiding (empty) import Control.Category import Data.Array.IArray import Data.Bits import quali...
bairyn/bitmaps
src/Codec/String/Base64.hs
bsd-3-clause
3,731
0
22
1,656
1,256
684
572
92
3
{-# LANGUAGE CPP #-} import Control.Shell import Data.Bits import System.Info (os) import Control.Monad import System.Environment (getArgs) import System.Exit -- Packages will end up in ghc-$GHC_MAJOR.$GHC_MINOR. If the directory does -- not exist, it is created. If the package already exists in that directory, -- it ...
joelburget/haste-compiler
build-release.hs
bsd-3-clause
5,145
17
18
1,513
1,326
686
640
104
3
module Parser where import TreeSimple import Text.ParserCombinators.Parsec symbol :: Parser Char symbol = oneOf "#!$%&|+-/*:<=>?@^_~" ------------------------------------------------------------------ ----------------------------------------------------------------- doParse :: String -> TreeS doParse x = case (pars...
Benzi-Junior/TreeExample
src/Parser.hs
bsd-3-clause
809
2
11
144
244
118
126
29
2
module Data.Deciparsec.Internal.Types ( ParserT(ParserT), ParserState (ParserState), Input(I), Added(A), More(Complete, Incomplete) , Failure, Success, IResult(..), ParseError(ParseError), Message(Message, UnExpect, Expect), SourcePos(SourcePos) , unI, runParserT_, psPos, psState, errMsgs, spName, spLine, s...
d3tucker/deciparsec
src/Data/Deciparsec/Internal/Types.hs
bsd-3-clause
9,120
19
17
3,026
2,834
1,481
1,353
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UnicodeSyntax #-} {-# LANGUAGE ViewPatterns #-} module Yesod.Squealer.Routes where import Data.Text ...
mgomezch/yesod-squealer
source/Yesod/Squealer/Routes.hs
bsd-3-clause
1,372
0
10
394
190
111
79
25
0
{-# LANGUAGE PackageImports, BangPatterns #-} module Data.Tree23.Tree23 ( Tree, empty, singleton, null, size, insertWith, delete, -- update, member, lookup, mapEntries, mapEntriesValues, mapEntriesKeysMonotonic, minimum, maximum, toList, ) where import Prelude hiding (null, lookup, maximum, m...
griba2001/tree23-map-set
src/Data/Tree23/Tree23.hs
bsd-3-clause
8,635
7
13
2,398
3,317
1,641
1,676
122
6
{-# LANGUAGE PatternGuards #-} -- | A Ninja style environment, equivalent to a non-empty list of mutable hash tables. module Development.Ninja.Env( Env, newEnv, scopeEnv, addEnv, askEnv, fromEnv ) where import qualified Data.HashMap.Strict as Map import Data.Hashable import Data.IORef data Env k v = Env (IO...
ndmitchell/shake
src/Development/Ninja/Env.hs
bsd-3-clause
1,041
0
14
259
479
239
240
23
3
-- Problem 44: Pentagon Numbers -- -- https://projecteuler.net/problem=44 -- -- Pentagonal numbers are generated by the formula, Pn=n(3n−1)/2. The first ten pentagonal numbers are: -- -- 1, 5, 12, 22, 35, 51, 70, 92, 117, 145, ... -- -- It can be seen that P4 + P7 = 22 + 70 = 92 = P8. However, their difference, 70 − 22...
moddy3d/euler
p44/p44.hs
mit
957
1
14
203
261
139
122
10
1
-- -- Chapter 9. -- module C'9 where import Test.QuickCheck import E'9'15 import E'9'14 import E'9'13 import E'9'12 import E'9'11 import E'9'10 import E'9''9 import E'9''8 import E'9''7 import E'9''6 import E'9''5 import E'9''4 import E'9''3 import E'9''2 import E'9''1
pascal-knodel/haskell-craft
_/links/C'9.hs
mit
276
0
4
46
57
39
18
17
0
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveAnyClass #-} -- | -- Copyright : (c) 2011, 2012 Benedikt Schmidt & Simon Meier -- License : GPL v3 (see LIC...
kmilner/tamarin-prover
lib/theory/src/Theory/Model/Fact.hs
gpl-3.0
15,498
0
15
3,886
3,782
1,997
1,785
281
8
--- * -*- outline-regexp:"--- \\*"; -*- --- ** doc -- In Emacs, use TAB on lines beginning with "-- *" to collapse/expand sections. {-| A reader for CSV data, using an extra rules file to help interpret the data. -} -- Lots of haddocks in this file are for non-exported types. -- Here's a command that will render them...
simonmichael/hledger
hledger-lib/Hledger/Read/CsvReader.hs
gpl-3.0
58,282
0
23
13,216
11,858
6,260
5,598
752
10
module LayoutBad6 where x = id (case x of 3 -> 4)
roberth/uu-helium
test/parser/LayoutBad6.hs
gpl-3.0
57
0
9
19
25
14
11
2
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-swf/gen/Network/AWS/SWF/RegisterActivityType.hs
mpl-2.0
12,078
0
12
2,427
1,201
745
456
141
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-rds/gen/Network/AWS/RDS/RemoveSourceIdentifierFromSubscription.hs
mpl-2.0
5,777
0
13
1,026
627
377
250
89
1
{-# OPTIONS_GHC -cpp -fglasgow-exts #-} ------------------------------------------------------------------------------------------- -- | -- Module : Control.Functor.HigherOrder.Composition -- Copyright : 2008 Edward Kmett -- License : BSD -- -- Maintainer : Edward Kmett <ekmett@gmail.com> -- Stability : experimental -...
urska19/MFP---Samodejno-racunanje-dvosmernih-preslikav
Control/Functor/HigherOrder/Composition.hs
apache-2.0
1,754
26
13
326
610
342
268
-1
-1
-- | Web server. module Main where import HL.Dispatch () import HL.Foundation import Control.Concurrent.Chan import Yesod import Yesod.Static -- | Main entry point. main :: IO () main = do s <- static "static" c <- newChan warp 1990 (App s c)
chrisdone/hl
src/Main.hs
bsd-3-clause
259
0
9
58
81
44
37
11
1
default () undef = undef forceNum :: Num a => a -> a forceNum x = x mono x = forceNum x mono' = mono genericLength :: Num a => [b] -> a genericLength = undef f xs = let len = genericLength xs in (len,len)
themattchan/tandoori
input/mono-restrict2.hs
bsd-3-clause
242
3
9
83
110
53
57
10
1
<?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="pl-PL"> <title>Linux WebDrivers</title> <maps> <homeID>top</homeID> <mapref location="m...
thc202/zap-extensions
addOns/webdrivers/webdriverlinux/src/main/javahelp/org/zaproxy/zap/extension/webdriverlinux/resources/help_pl_PL/helpset_pl_PL.hs
apache-2.0
961
89
29
156
389
209
180
-1
-1
{-# LANGUAGE CPP #-} #if !defined(TESTING) && __GLASGOW_HASKELL__ >= 703 {-# LANGUAGE Trustworthy #-} #endif ----------------------------------------------------------------------------- -- | -- Module : Data.IntMap -- Copyright : (c) Daan Leijen 2002 -- (c) Andriy Palamarchuk 2008 -- License ...
technogeeky/d-A
include/containers-0.5.0.0/Data/IntMap.hs
gpl-3.0
3,685
0
9
640
307
204
103
22
1
module Test where import Lib import Distribution.TestSuite tests :: IO [Test] tests = return [Test bar] where bar = TestInstance { run = return $ Finished run , name = "test" , tags = [] , options = [] , setOption = \_ _ -> Right bar } run = if foo then Pass ...
themoritz/cabal
cabal-testsuite/PackageTests/Regression/T4270/Test.hs
bsd-3-clause
344
0
10
119
113
65
48
12
2
{-# LANGUAGE ForeignFunctionInterface, GHCForeignImportPrim, CPP, MagicHash, UnboxedTuples, UnliftedFFITypes, BangPatterns #-} {-# OPTIONS_GHC -XNoImplicitPrelude #-} {-# OPTIONS_HADDOCK hide #-} module GHC.Integer.GMP.Prim ( cmpInteger#, cmpIntegerInt#, plusInteger#, minusInteger#, t...
joelburget/haste-compiler
libraries/integer-gmp/GHC/Integer/GMP/Prim.hs
bsd-3-clause
4,635
0
8
847
759
452
307
-1
-1
{-# LANGUAGE ScopedTypeVariables #-} module Main where import Control.Monad.ST import Data.Primitive main :: IO () main = do let xs :: [Float] = runST $ do barr <- mutableByteArrayFromList [1..fromIntegral n::Float] peekByteArray n barr print xs where n = 13 mutableByteArrayFromList ::...
urbanslug/ghc
testsuite/tests/deriving/should_compile/T8138.hs
bsd-3-clause
1,132
0
16
416
453
223
230
-1
-1
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances #-} -- !!! Functional dependencies -- This broke an early impl of functional dependencies -- (complaining about ambiguity) module ShouldCompile where class Foo r a | r -> a wh...
urbanslug/ghc
testsuite/tests/typecheck/should_compile/tc115.hs
bsd-3-clause
437
0
7
91
104
56
48
11
1
-- !!! Nullary rec-pats for constructors that hasn't got any labelled -- !!! fields is legal Haskell, and requires extra care in the desugarer. module ShouldCompile where data X = X Int [Int] f :: X -> Int f (X _ []) = 0 f X{} = 1
urbanslug/ghc
testsuite/tests/deSugar/should_compile/ds047.hs
bsd-3-clause
238
0
8
55
59
33
26
5
1
module ResetCommand where import Candidate import GitCommand import GitCommandType import GitStatus import Alfred import CommandOption data ResetCommand = ResetCommand instance Candidate ResetCommand where name c = name $commandType c description c = description $commandType c isAvailable c = isAvai...
yamamotoj/alfred-git-workflow
src/ResetCommand.hs
mit
2,438
0
15
565
741
381
360
43
8
-- | -- Module : Graphics.Michelangelo.Shaders -- Description : OpenGL shader utilities -- Copyright : (c) Jonatan H Sundqvist, 2015 -- License : MIT -- Maintainer : Jonatan H Sundqvist -- Stability : experimental|stable -- Portability : POSIX (not sure) -- -- Created July 27 2015 -- TODO | - -- ...
SwiftsNamesake/Michelangelo
src/Graphics/Michelangelo/Shaders.hs
mit
8,106
0
21
1,441
925
524
401
68
7
{-| Module : Web.Facebook.Messenger.Types.Callbacks.PreCheckout Copyright : (c) Felix Paulusma, 2016 License : MIT Maintainer : felix.paulusma@gmail.com Stability : semi-experimental This callback will occur when a user clicks on Pay in the payment dialog, but before the user's card is charged. This allo...
Vlix/facebookmessenger
src/Web/Facebook/Messenger/Types/Callbacks/PreCheckout.hs
mit
2,373
0
13
462
211
128
83
20
0
{-# LANGUAGE TemplateHaskell #-} module Tests.Sodium.Internal where import Tests.Sodium.Common () import Crypto.Sodium.Internal import qualified Crypto.Sodium.SecureMem as SM import Data.ByteString (ByteString) import qualified Data.ByteString as B import D...
dnaq/crypto-sodium
test/Tests/Sodium/Internal.hs
mit
1,283
0
11
262
385
205
180
28
1
module Main where import Paths_hs_nombre_generator (version) import Control.Monad (replicateM) import Data.Char (toLower) import Data.Version (showVersion) import System.Environment import System.Exit import Web.NombreGenerator.Generator.Candidaturas import Web.NombreGenerator.RandomUtil import Web.NombreGenerator.Sc...
alvare/hs-nombre-generator
Web/NombreGenerator.hs
mit
1,993
0
13
407
782
436
346
40
3
{-# LANGUAGE TypeSynonymInstances #-} module Math.Matrix ( Matrix3 , Matrix4 , identity , (*.) ) where import Math.Vector import Data.Vect.Double type Matrix3 = Mat3 type Matrix4 = Mat4 class Identity a where identity :: a instance Identity Matrix3 where identity = Mat3 (Vec3 1 0 0) (Vec3 0 1 0) (Vec3 0 0...
burz/Rayzer
Math/Matrix.hs
mit
438
0
8
101
180
98
82
16
0
{-# LANGUAGE OverloadedStrings #-} module Main where import Control.Concurrent (threadDelay) import Control.Monad (forM_) import qualified Data.ByteString as BS import Data.Default (Default(..)) import Foreign.C.Types import GameCom (step) import Memory (MachineState(..), Color) import PPU (getPixel) import ROM (pars...
rkoeninger/GameCom
src/main/Main.hs
mit
2,186
0
25
666
744
384
360
65
3
{-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE...
quantifiedtran/blue-wire-backend
src/BlueWire/Database/Schema.hs
mit
2,229
0
10
499
207
127
80
29
0
module MPCH.Config where import qualified Network.MPD as MPD data Config = Config { host :: Maybe String, port :: Maybe String, password :: Maybe MPD.Password } deriving Show defaultConfig :: Config defaultConfig = Config { host = Nothing, port = Nothing, password = Nothing } configure :...
mineo/mpch
MPCH/Config.hs
mit
397
0
10
94
126
74
52
14
1
-- | Data.TSTP.Source module module Data.TSTP.Source where import Data.TSTP.GData (GTerm (..)) import Data.TSTP.IntroType (IntroType (..)) import Data.TSTP.Parent (Parent (..)) import Data.TSTP.Rule (Rule (..)) import Data.TSTP.Status (Status (..)) i...
agomezl/tstp2agda
src/Data/TSTP/Source.hs
mit
1,346
0
8
414
270
167
103
24
0
{-# LANGUAGE CPP #-} {-# LANGUAGE TemplateHaskell #-} {- NOTE: Don't modify this file unless you know what you are doing. If you are new to snap, start with Site.hs and Application.hs. This file contains boilerplate needed for dynamic reloading and is not meant for general consumption. Occasionally if ...
epsilonhalbe/rendezvous
src/Main.hs
mit
3,264
0
11
712
302
178
124
27
1
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-} module Models.Channel ( parseChannelsJson, Channel(..) ) where import Data.Text import Data.Text.Encoding import Data.Aeson.Types import Data.Aeson import Data.ByteString.Lazy import Control.Monad as M import Data.Vector as V data Channel = Chann...
simonvandel/tvheadend-frontend
src/Models/Channel.hs
mit
884
0
16
210
263
141
122
27
1
module Carbon.DataStructures.Trees.BinaryHeap.Benchmarks (benchmarks, setup) where import qualified Carbon.DataStructures.Trees.BinaryHeap as Tree import Carbon.DataStructures.Trees.BinaryHeap.Scaffolding import Carbon.Benchmarking import Control.DeepSeq instance NFData (Tree.Tree a) setup = force [get_tree max_siz...
Raekye/Carbon
haskell/testsuite/benchmarks/Carbon/DataStructures/Trees/BinaryHeap/Benchmarks.hs
mit
513
0
13
58
159
92
67
10
1
-- vim: expandtab shiftwidth=4 tabstop=4 : -- Based on <https://gist.github.com/yeban/311016> -- Some potential inspiration for the future: -- <https://github.com/dmxt/Solarized-xmonad-xmobar/blob/master/xmonad.hs> -- <https://www.haskell.org/haskellwiki/Xmonad/General_xmonad.hs_config_tips> import XMonad ...
mgrabovsky/dotfiles
.xmonad/xmonad.hs
cc0-1.0
7,249
0
13
2,249
1,359
809
550
88
3
{-# LANGUAGE RecordWildCards #-} -- | Type checking mode of jb. -- It runs type inference to decide if a term is typably hierarchical. module Type(typeInference, runTypeInference) where import Frontend import Language.PiCalc import Language.PiCalc.Analysis.Hierarchical import Control.Monad import qualified Data.Se...
bordaigorl/jamesbound
src/Type.hs
gpl-2.0
7,062
0
22
2,135
2,048
957
1,091
162
6
{-# LANGUAGE BangPatterns #-} module ProxyClient where import SSHClient import Control.Concurrent.HEP import Data.HProxy.Rules import Data.ByteString.Char8 as C import Control.Monad import Control.Monad.Trans import Text.ParserCombinators.Parsec import Prelude as P data ProxyMessage = ProxyRead ByteString ...
dambaev/hproxy
src/ProxyClient.hs
gpl-2.0
1,856
0
20
616
474
237
237
50
5
{-# OPTIONS -fno-warn-orphans #-} {-# LANGUAGE TemplateHaskell, DeriveDataTypeable, RankNTypes, NoMonomorphismRestriction #-} module Lamdu.Data.Expression.Utils ( makeApply , makePi, makeLambda, makeLam , pureApply , pureHole , pureSet , pureRecord , pureLam , pureGetField , pureLiteralInteger , pur...
MatiasNAmendola/lamdu
Lamdu/Data/Expression/Utils.hs
gpl-3.0
17,954
0
20
3,964
6,116
3,127
2,989
-1
-1
{-# LANGUAGE FlexibleContexts #-} module Slidecoding.Browser ( browse ) where import Slidecoding.Types import Prelude hiding (until) import qualified Language.Haskell.GhcMod as GM (GhcModT, browse) import qualified Language.Haskell.GhcMod.Monad as GMM (runGmOutT, runGhcModT', withGhcModEnv) import ...
ptitfred/slidecoding
src/Slidecoding/Browser.hs
gpl-3.0
3,706
0
17
763
1,295
695
600
73
2
{-# LANGUAGE TupleSections, OverloadedStrings #-} module Handler.Construct where import Import -- This is a handler function for the GET request method on the HomeR -- resource pattern. All of your resource patterns are defined in -- config/routes -- -- The majority of the code you will write in Yesod lives in these ...
ajdunlap/cruzo
Handler/Construct.hs
gpl-3.0
1,252
0
12
319
92
50
42
-1
-1
-- A simple game -- The game is played on a board consisting of a row of places. An empty -- place is indicated by a 0, a place with a piece by a positive integer. The -- allowable moves for a piece of value n are exactly n steps in either direction. -- Operations on the ADT: lift a piece from one place; drop i...
ckaestne/CIDE
CIDE_Language_Haskell/test/fromviral/RowGameLib.hs
gpl-3.0
4,246
0
16
1,430
1,063
585
478
74
5
module ATP.Util.Print.Print ( Print(..) , GenPrint(..) , prettyShow , paren , commas , list , listVert , listHoriz , tuple , tupleVert , tupleHoriz , set , setVert , setHoriz , putStrLn , dot ) where import Prelude hiding (putStrLn) import qualified System.IO.UTF8 as S import qualifi...
andre-artus/handbook-of-practical-logic-and-automated-reasoning-haskell
src/ATP/Util/Print/Print.hs
gpl-3.0
5,332
0
10
1,242
2,458
1,316
1,142
-1
-1
{-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE TemplateHaskell #-} module Selector ( Selector -- * Constructor , makeSelector -- * Lenses , selected , nonSelected -- * Query , hasSelected -- * Operations , select , selectAll , unselectAll ) w...
holmisen/glbrix
src/Selector.hs
gpl-3.0
1,817
0
10
455
596
322
274
50
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.MachineLear...
rueshyna/gogol
gogol-ml/gen/Network/Google/MachineLearning/Types/Product.hs
mpl-2.0
89,847
0
22
19,063
12,368
7,175
5,193
1,465
1
-- symbolic calculator -- from Bartosz Milewski's Basics of Haskell tutorial -- https://www.schoolofhaskell.com/school/starting-with-haskell/basics-of-haskell import Control.Monad (mapM_) import Control.Monad.State import Data.Char import Data.List (dropWhileEnd) import qualified Data.Map as Map import System.IO (hFlu...
cbare/Etudes
haskell/calc.hs
apache-2.0
6,611
0
19
2,150
2,301
1,149
1,152
-1
-1
module Lichen.Config where import Control.Monad.Reader import Control.Monad.Except import Lichen.Error type Configured c = ReaderT c Erring runConfigured :: Configured c () -> c -> IO () runConfigured m c = do result <- runExceptT $ runReaderT m c case result of Left e -> printError e; Right _ -> re...
Submitty/AnalysisTools
src/Lichen/Config.hs
bsd-3-clause
328
0
11
71
120
61
59
9
2
{-# LANGUAGE FlexibleContexts #-} module QModels where import Test.Tasty (TestTree, testGroup) import Test.Tasty.HUnit import PCA.QModels import PCA.Distribution import Numeric.LinearAlgebra.Data (fromRows, toRows, size, (!), konst, Matrix, Vector, fromList) import qualified Numeric.LinearAlgebra.HMatrix as H ...
DbIHbKA/vbpca
test/QModels.hs
bsd-3-clause
5,225
0
21
2,123
1,751
898
853
145
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE JavaScriptFFI, GHCForeignImportPrim #-} ----------------------------------------------------------------------------- -- | -- Module : Main -- Copyright : Copyright (C) 2015 Artem M. Chirkin <chirkin@arch.ethz.ch> -...
achirkin/fastvec
src/Main.hs
bsd-3-clause
5,125
9
16
1,342
1,792
854
938
59
1
module Biolab.Analysis.Utils ( absoluteToRelativeTime, trim, grEstimationParameters, exponentialApproximation, exponentialDerivative, exponentialFit, ) where import Data.Time (UTCTime, NominalDiffTime, diffUTCTime) import Statistics.Types (Sample(..)) import Statistics.LinearRegression (non...
uriba/biolab-analysis
Biolab/Analysis/Utils.hs
bsd-3-clause
1,949
0
18
440
695
381
314
32
2
import Control.Concurrent (myThreadId) import System.IO (stdout, hSetBuffering, BufferMode(LineBuffering)) import System.Random (randomIO) import Streamly import Streamly.Prelude (drain, nil, yieldM) main :: IO () main = drain $ do yieldM $ hSetBuffering stdout LineBuffering x <- loop "A " 2 y <- loop "B "...
harendra-kumar/asyncly
test/nested-loops.hs
bsd-3-clause
769
0
16
224
260
135
125
19
2
import qualified Prelude import Feldspar import Language.Embedded.Imperative import Feldspar.Compiler.ToMutable prog :: Program (RefCMD Data :+: ControlCMD Data) (Data Int32) prog = do ir <- initRef (0 :: Data Int32) ar <- initRef (1 :: Data Int32) xr <- initRef (6 :: Data Int32) setRef xr 67 ...
emwap/feldspar-compiler-shim
test/ToMutable.hs
bsd-3-clause
702
0
13
201
320
152
168
-1
-1
module MAC where import CLaSH.Prelude ma acc (x, y) = acc + x * y macT acc (x,y) = (acc', o) where acc' = ma acc(x,y) o = acc --macT acc inp = (ma acc inp, acc) mac = mealy macT 0 topEntity :: Signal (Signed 9, Signed 9) -> Signal (Signed 9) topEntity = mac testInput :: Signal (Signed 9,Signed 9) test...
trxeste/wrk
haskell/cl3sh/mac.hs
bsd-3-clause
531
0
11
106
267
147
120
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} {- | This module implements KOI8-R encoding which covers the russian and bulgarian alphabet. See <http://en.wikipedia.org/wiki/KOI8-R> for more information. -} module Data.Encoding.KOI8R (KOI8R(..)) where import Control.OldException (throwDyn) import Data.Array.Unboxed import...
abuiles/turbinado-blog
tmp/dependencies/encoding-0.4.1/Data/Encoding/KOI8R.hs
bsd-3-clause
2,545
6
11
250
429
229
200
52
2
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE DataKinds #-} module CANOpen.Tower.Types where import Ivory.Language import Ivory.Serialize import Ivory.Tower newtype DictError = DictError { unDictError :: Uint8 ...
distrap/ivory-tower-canopen
ivory-tower-canopen-core/src/CANOpen/Tower/Types.hs
bsd-3-clause
2,468
0
12
460
558
290
268
62
1
module VisualBrowseTree where import Control.Concurrent import Control.Concurrent.STM import Control.Monad import Data.Maybe import Data.Tree import Data.Tree.Zipper import qualified Data.Foldable as Foldable import qualified Data.Traversable as T import Graphics.UI.Gtk import Graphics.UI.Gtk.WebKit.Download import ...
Tener/spike
src/VisualBrowseTree.hs
bsd-3-clause
5,083
0
23
1,347
1,274
640
634
108
3
{-# LANGUAGE OverloadedStrings #-} module Lib ( someFunc ) where import Data.JSString () import GHCJS.Types foreign import javascript unsafe "window.alert($1)" js_alert :: JSString -> IO () someFunc :: IO () someFunc = js_alert "Hello from GHCJS!"
shulhi/newvdom
src/Lib.hs
bsd-3-clause
258
4
6
46
65
36
29
8
1
module PrimFunction (primitiveFunctions) where import Control.Monad.Except import Data.Array.IArray ((!), bounds) import Data.Char (toLower) import Data.Foldable (foldrM) import Definition import qualified LispVector as V import Variable (runEvaled) import Unpacker ------- Primitive Function Mapping Tuples ------- ...
comraq/scheme-interpreter
src/PrimFunction.hs
bsd-3-clause
11,434
0
15
3,360
3,743
1,980
1,763
240
6
{-# LANGUAGE DeriveDataTypeable, CPP #-} {-# OPTIONS_GHC -w -fno-cse #-} module CabalBounds.Args ( Args(..) , get , defaultDrop , defaultUpdate , defaultDump , defaultLibs , defaultFormat ) where import System.Console.CmdArgs hiding (ignore) import qualified System.Console.CmdArgs as CmdArgs i...
dan-t/cabal-bounds
lib/CabalBounds/Args.hs
bsd-3-clause
7,994
0
12
3,034
1,605
911
694
163
1
module Main where import VisPar import Control.DeepSeq fib :: Int -> Par Int fib n | n < 2 = return 1 | otherwise = do leftVar <- spawnNamed ("fib " ++ show (n - 1)) $ fib (n - 1) rightVar <- spawnNamed ("fib " ++ show (n - 2)) $ fib (n - 2) left <- get leftVar ...
MaximilianAlgehed/VisPar
examples/Fib.hs
bsd-3-clause
897
0
15
311
403
189
214
25
1
module Examples.Test.Benchmark(main) where import Development.Shake import Examples.Util import Data.List import Development.Shake.FilePath -- | Given a breadth and depth come up with a set of build files main = shaken (\_ _ -> return ()) $ \args obj -> do let get ty = head $ [read $ drop (length ty + 1) a | a ...
nh2/shake
Examples/Test/Benchmark.hs
bsd-3-clause
735
0
20
209
292
149
143
15
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} -- | -- Module: $HEADER$ -- Description: TODO -...
FPBrno/dht-dks
src/Data/DHT/DKS/Type/Message/NewSuccessorAck.hs
bsd-3-clause
1,024
0
9
167
175
113
62
29
0
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-} module Data.Yahoo where import Network.Wreq import qualified Network.HTTP.Client as HC import Control.Lens import Data.Text import qualified Data.Text as T import qualified Data.ByteString.Lazy as BL import qualified Data.ByteString.Char8 as C8 import D...
tjroth/stock-quotes
src/Data/Yahoo.hs
bsd-3-clause
7,132
0
28
2,223
997
529
468
99
2
-------------------------------------------------------------------------------- module Hakyll.Web.Template.Context ( Context (..) , mapContext , field , constField , functionField , defaultContext , bodyField , metadataField , urlField , pathField , titleField , dateFie...
bergmark/hakyll
src/Hakyll/Web/Template/Context.hs
bsd-3-clause
8,287
0
13
1,979
1,399
764
635
122
2
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TupleSections #-} -- | module Main where import Control.Concurrent (threadDelay) import Contro...
eryx67/haskell-libtorrent
examples/SimpleClient.hs
bsd-3-clause
2,714
0
24
855
798
399
399
77
2
module Main ( main ) where ------------------------------------------------------------------------------- import qualified Data.ByteString as BS import Test.QuickCheck.Instances () import Test.Tasty import Test.Tasty.QuickCheck -----------------------------------------...
MichaelXavier/lzf-bytestring
test/Main.hs
bsd-3-clause
1,078
0
15
205
198
107
91
19
1
{-# LANGUAGE TypeFamilies, TemplateHaskell #-} module Control.Monad.Voids where import Control.Monad (void) import Language.Haskell.TH mkFmap :: Int -> ExpQ mkFmap 0 = varE 'id mkFmap 1 = varE 'fmap mkFmap n = uInfixE (varE 'fmap) (varE '(.)) (mkFmap $ n - 1) mkVoid :: Int -> ExpQ mkVoid i = mkFmap i `appE` (appE (v...
seagull-kamome/Voids
Control/Monad/Voids.hs
bsd-3-clause
2,343
0
18
641
1,414
714
700
43
1
#!/usr/bin/runhaskell module Main where import Data.List import Distribution.Simple import Distribution.Simple.LocalBuildInfo import Distribution.Simple.PackageIndex import Distribution.Simple.Setup import Distribution.Simple.Utils (rawSystemExit) import qualified Distribution.InstalledPackageInfo as I import Distrib...
travitch/hsqml
Setup.hs
bsd-3-clause
7,046
0
20
1,458
2,231
1,141
1,090
162
3
module Uni where import {-# SOURCE #-} EqUni () import {-# SOURCE #-} OrdUni () data Uni = Uni
phischu/fragnix
tests/quick/ImplicitInstances/Uni.hs
bsd-3-clause
96
0
5
20
25
17
8
4
0
-- | Exports simple compilers to just copy files -- {-# LANGUAGE GeneralizedNewtypeDeriving, DeriveDataTypeable #-} module Hakyll.Core.Writable.CopyFile ( CopyFile (..) , copyFileCompiler ) where import Control.Arrow ((>>^)) import System.Directory (copyFile) import Data.Typeable (Typeable) import Data.Bi...
sol/hakyll
src/Hakyll/Core/Writable/CopyFile.hs
bsd-3-clause
830
0
8
133
179
108
71
-1
-1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TupleSections #-} module Network.Wai.MakeAssets ( serveAssets, Options(..), -- * re-exports Default(..), ) where import Control.Concurrent import Control.Exception import Control.Monad import Data.Default import D...
soenkehahn/wai-make-assets
src/Network/Wai/MakeAssets.hs
bsd-3-clause
3,287
0
19
778
725
385
340
69
3
{-# OPTIONS_GHC -w #-} module VSim.VIR.AST ( parseFiles , parseFile ) where import Control.Applicative import Control.Monad import Control.Monad.Reader import Control.Monad.Error import Data.IORef import Data.IORefEx import Data.List import Data.Ord import Data.Maybe import qualified Con...
ierton/vsim
src/VSim/VIR/AST.hs
bsd-3-clause
229,882
7,940
135
40,200
67,425
37,175
30,250
6,818
130
{-# LANGUAGE OverloadedStrings #-} module JUnit.Parser where import Control.Applicative import Control.Monad import Data.Functor import Data.List import qualified Data.Text as T import Data.Time.Clock import Prelude hiding (readFile) import Text.XML import Text.XML.Cursor import System.FilePath -- * Basic p...
wayofthepie/junit-parser
src/JUnit/Parser.hs
bsd-3-clause
1,138
0
11
288
284
158
126
34
1
{-# LANGUAGE PolyKinds, UndecidableInstances #-} #if __GLASGOW_HASKELL__ < 710 {-# LANGUAGE OverlappingInstances #-} #endif #if __GLASGOW_HASKELL__ >= 800 {-# LANGUAGE UndecidableSuperClasses #-} #endif {-# OPTIONS_GHC -fno-warn-orphans -fno-warn-deprecations #-} -- | Constraints for indexed datatypes. -- -- This modul...
phadej/generics-sop
src/Generics/SOP/Constraint.hs
bsd-3-clause
3,991
1
12
812
683
421
262
-1
-1
{-# LANGUAGE ScopedTypeVariables #-} import Control.Applicative import Control.Monad import Control.Concurrent import System.IO import System.Environment import Network main :: IO () main = do (pn :: Int) : _ <- mapM readIO =<< getArgs let port = PortNumber $ fromIntegral pn socket <- listenOn port forever $ do ...
YoshikuniJujo/tighttp
examples/checkRequest.hs
bsd-3-clause
693
0
15
152
299
146
153
26
2
module Abyme.Direction where import Linear data Direction = Up | Down | LEft | RIght deriving (Eq, Ord, Show) directionOpposite :: Direction -> Direction directionOpposite Up = Down directionOpposite Down = Up directionOpposite LEft = RIght directionOpposite RIght = LEft directionToVector :: Num a => Direction ->...
mvr/abyme
haskell-model/src/Abyme/Direction.hs
bsd-3-clause
464
0
7
84
162
84
78
14
1
{-# LANGUAGE FlexibleContexts #-} -- | @futhark wasm-multicore@ module Futhark.CLI.MulticoreWASM (main) where import Futhark.Actions (compileMulticoreToWASMAction) import Futhark.Compiler.CLI import Futhark.Passes (multicorePipeline) -- | Run @futhark c@ main :: String -> [String] -> IO () main = compilerMain () ...
diku-dk/futhark
src/Futhark/CLI/MulticoreWASM.hs
isc
576
0
9
88
116
65
51
14
1
import Data.Char (digitToInt) main :: IO () main = do numbers <- putStr "How many happy numbers to find? " >> readLn :: IO Int print $ happy numbers happy :: Int -> [Integer] happy = (`take` (filter isHappy [1..])) where isHappy n | n == 4 = False | n == 1 = True | otherwise = isHappy $ redu...
smac89/UVA_OJ
fun-projects/Numbers/happynumbers.hs
mit
397
1
13
110
171
87
84
11
1
-- Copyright (c) Microsoft. All rights reserved. -- Licensed under the MIT license. See LICENSE file in the project root for full license information. {-# LANGUAGE QuasiQuotes, OverloadedStrings, RecordWildCards #-} module Language.Bond.Codegen.Cs.Types_cs ( types_cs , FieldMapping(..) , StructMapping(..)...
chwarr/bond
compiler/src/Language/Bond/Codegen/Cs/Types_cs.hs
mit
7,589
0
15
2,089
1,160
688
472
101
17
{-| This module exports the underlying Attoparsec row parser. This is helpful if you want to do some ad-hoc CSV string parsing. -} module Data.CSV.Conduit.Parser.ByteString ( parseCSV , parseRow , row , csv ) where -----------------------------------------------------------------------------...
mohsen3/csv-conduit
src/Data/CSV/Conduit/Parser/ByteString.hs
bsd-3-clause
2,882
0
14
691
776
400
376
62
4
----------------------------------------------------------------------------- -- | -- Module : Data.Generics.Twins -- Copyright : (c) The University of Glasgow, CWI 2001--2004 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : libraries@haskell.org -- Stability : experim...
alekar/hugs
packages/base/Data/Generics/Twins.hs
bsd-3-clause
7,105
22
16
1,789
1,888
1,023
865
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-rds/gen/Network/AWS/RDS/ModifyEventSubscription.hs
mpl-2.0
6,504
0
10
1,274
722
439
283
81
1
{-# LANGUAGE LambdaCase #-} module HN.SplExport (convertToSpl, convertExpr, convertDef) where import Data.Functor.Foldable import HN.Intermediate import SPL.Visualise (showAsSource) import SPL.Types import Utils (joinStr) convertToSpl = (\x -> show x ++ "\n" ++ joinStr "\n" (map showAsSource x)) . map convertDef c...
kayuri/HNC
HN/SplExport.hs
lgpl-3.0
983
2
11
180
358
182
176
27
4
{-# LANGUAGE OverloadedStrings #-} {- Copyright 2017 The CodeWorld Authors. All Rights Reserved. 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...
three/codeworld
funblocks-client/src/Blocks/Types.hs
apache-2.0
18,939
0
13
4,939
4,154
2,266
1,888
326
3