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 TypeOperators #-} module Demo where import Control.Applicative ((<$>)) import Data.Word import Language.Embedded.Imperative import Language.Embedded.Backend.C import Language.Embedded.CExp -- | Custom instruction type with: references, control structures and file I/O type CMD = RefCMD :+:...
kmate/imperative-edsl
examples/Demo.hs
bsd-3-clause
1,036
0
13
245
279
143
136
26
1
module Distribution.Client.Dependency.Modular.Flag where import Data.Map as M import Prelude hiding (pi) import Distribution.PackageDescription hiding (Flag) -- from Cabal import Distribution.Client.Dependency.Modular.Package import Distribution.Client.Types (OptionalStanza(..)) -- | Flag name. Consists of a packag...
jwiegley/ghc-release
libraries/Cabal/cabal-install/Distribution/Client/Dependency/Modular/Flag.hs
gpl-3.0
1,946
0
9
394
678
361
317
41
1
{- | Module : $Header$ Description : This module is for selecting the favoured EP representation Copyright : (c) Ewaryst Schulz, DFKI Bremen 2010 License : GPLv2 or higher, see LICENSE.txt Maintainer : ewaryst.schulz@dfki.de Stability : experimental Portability : portable This module re-exports o...
mariefarrell/Hets
CSL/ExtendedParameter.hs
gpl-2.0
533
0
4
92
21
15
6
2
0
import Distribution.Simple main = defaultMain {- Inferring the package version from git. Posted by https://github.com/hvr - - https://gist.github.com/656738 import Control.Exception import Control.Monad import Data.Maybe import Data.Version import Distribution.PackageDescription (PackageDescription(..), HookedBuild...
rsasse/tamarin-prover
Setup.hs
gpl-3.0
3,059
0
4
703
12
7
5
2
1
-- C->Haskell Compiler: pretty printing of C abstract syntax -- -- Author : Manuel M T Chakravarty -- Created: 25 August 1 -- -- Version $Revision: 1.3 $ from $Date: 2005/06/22 16:01:21 $ -- -- Copyright (c) [2001..2004] Manuel M T Chakravarty -- -- This file is free software; you can redistribute it and/or modif...
k0001/gtk2hs
tools/c2hs/c/CPretty.hs
gpl-3.0
4,172
0
16
889
1,016
521
495
66
1
{-+ PFE command line parsing utilities -} module PfeParse(module PfeParse,arg,(<@),( #@ ),many) where import Data.Char(isUpper) import Control.Monad(when) import Data.Maybe(isJust) import HsName(ModuleName(..),sameModuleName,parseModuleName,isMainModule) import TypedIds(NameSpace(..)) import PFE0(getCurrentModuleGrap...
kmate/HaRe
old/tools/pfe/PfeParse.hs
bsd-3-clause
3,636
0
12
854
1,048
555
493
-1
-1
module Stockfighter ( module Stockfighter.Client , module Stockfighter.Types ) where import Stockfighter.Client import Stockfighter.Types
cnr/stockfighter-hs
src/Stockfighter.hs
mit
146
0
5
22
28
18
10
5
0
{- Requirements: youtube-dl must be installed Run this program from the directory where you want to download all the videos. Pass in the csv file containing all the video ids. This will download all the videos sequentially, skipping over videos that have already been downloaded. -} module Main where import Text.CSV im...
rzil/honours
DeepLearning/DownloadVideos.hs
mit
1,528
0
20
253
443
237
206
32
3
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ExtendedDefaultRules #-} module Web.Kirstie.Hooks.RelatedPosts (relatedPosts) where import Control.Exception import Control.Monad import Control.Monad.Error import Data.List (sort, sortBy) import Data.Ord (comparing) imp...
hekt/blog-system
src/Web/Kirstie/Hooks/RelatedPosts.hs
mit
3,590
0
16
858
1,481
792
689
75
2
-- Nth Root of a Number Redux -- http://www.codewars.com/kata/552679ea44a9e400b600124f/ module Codewars.Kata.NthRoot where import Prelude hiding ((**)) root :: Double -> Double -> Double root x n = exp $ log x / n
gafiatulin/codewars
src/6 kyu/NthRoot.hs
mit
216
0
7
35
54
32
22
4
1
{-# LANGUAGE CPP #-} module GHCJS.DOM.AudioListener ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.AudioListener #else #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) import GHCJS.DOM.JSFFI.Gener...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/AudioListener.hs
mit
352
0
5
33
33
26
7
4
0
{-# LANGUAGE CPP #-} module GHCJS.DOM.WebKitTransitionEvent ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.WebKitTransitionEvent #else #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) import GHCJS...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/WebKitTransitionEvent.hs
mit
376
0
5
33
33
26
7
4
0
{-# LANGUAGE BangPatterns, Rank2Types, TypeSynonymInstances, TemplateHaskell #-} module Motherboard.NES ( Mirroring(..), System(..), State(..), HardwareState(..), SoftwareState(..), MonadicState(..), runMonadicState, runCPU, runPPU, powerOnSoftwareState, cycle, getAtCP...
IreneKnapp/legal-emulator
BackEnd/Motherboard/NES.hs
mit
33,227
38
20
11,212
6,334
3,253
3,081
747
9
module Harmonic where harmonic :: (Fractional a, Enum a) => Int -> a harmonic n = foldl (+) 0 $ take n $ foldr (\denominator acc -> (1/denominator):acc) [] [1..] -- runHarmonic :: Fractional a => Int -> [a] -- runHarmonic n = take n sumHarmonic -- sumHarmonic :: Fractional a => a -> a -- sumHarmonic 1 = 1 -- sumHar...
raventid/coursera_learning
haskell/will_kurt/q9.3_harmonic.hs
mit
354
0
11
72
92
52
40
3
1
{-# htermination floor :: RealFrac a => a -> Int #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_floor__1.hs
mit
54
0
2
12
3
2
1
1
0
{-# LANGUAGE CPP #-} module Data.Aeson.Config.KeyMap (module KeyMap) where #if MIN_VERSION_aeson(2,0,0) import Data.Aeson.KeyMap as KeyMap #else import Data.HashMap.Strict as KeyMap #endif
sol/hpack
src/Data/Aeson/Config/KeyMap.hs
mit
210
0
4
42
26
20
6
3
0
module Test.Data.Metafield where import Test.QuickCheck import Test.Tasty.HUnit import Text.RawString.QQ import Data.Either -- /admin/customers/342305289/metafields.json metafields :: String metafields = [r| { "metafields":[ { "created_at":"2014-12-15T21:00:27-05:00", "description":n...
aaronlevin/haskell-shopify
test/Data/Metafield.hs
mit
1,356
0
4
364
59
41
18
-1
-1
import Data.List (tails) combinations :: Int -> [a] -> [([a], [a])] combinations 0 xs = [([], xs)] combinations _ [] = error "not enough elements" combinations n xs@(x:xs') = if length xs == n then [(xs, [])] else [(x:ys, rest) | (ys, rest) <- combinations (n - 1) xs'] ++ [(ys', x:rest') | ...
zeyuanxy/haskell-playground
ninety-nine-haskell-problems/vol3/27.hs
mit
623
0
12
142
371
207
164
13
2
module Instances.Classes ( druid, primalPredator ) where import Character.Types ( Player(..), wearingHeavyArmor, ClassSpec(..), Defense(..), Class(..), newClass) druid :: ClassSpec -> Class druid = newClass "Druid" [(Ref, 1), (Will, 1)] (12 + 9) 5 primalPredator :: ClassSpec primalPre...
quintenpalmer/dungeons
server/src/Instances/Classes.hs
mit
615
0
14
132
186
110
76
19
2
module Cryptography.SymmetricCryptography.Macro where import Types import Macro.MetaMacro import Macro.Tuple import Functions.Application.Macro import Macro.Sets.Macro -- * Concatenation of messages (++) :: Note -> Note -> Note (++) = binop $ commS " " <> "|" <> com...
NorfairKing/the-notes
src/Cryptography/SymmetricCryptography/Macro.hs
gpl-2.0
1,380
0
8
346
406
231
175
44
1
{-# LANGUAGE CPP, PackageImports #-} #if __GLASGOW_HASKELL__ >= 701 {-# LANGUAGE Safe #-} #endif {- | The module "Foreign.Marshal.Array" provides operations for marshalling Haskell lists into monolithic arrays and vice versa. Most functions come in two flavours: one for arrays terminated by a special termination elem...
jwiegley/ghc-release
libraries/haskell2010/Foreign/Marshal/Array.hs
gpl-3.0
2,990
0
9
734
184
133
51
27
1
{- # Hassoc Author: Bob Desaunois Description: 1. Reads file 2. Splits content into words 3. generates PHP Associative Array 4. writes the array to file -} module Hassoc ( run ) where import System.IO import Data.List ----------------------------------------------------------- -- Constants ------------------...
bobdesaunois/hassoc
Hassoc.hs
gpl-3.0
1,622
0
14
330
370
196
174
30
2
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeOperators #-} -- | -- Copyright : (c) 2010-2012 Benedikt Schmidt & Simon Meier -- License : GPL v3 (...
tamarin-prover/tamarin-prover
lib/theory/src/Theory/Model/Signature.hs
gpl-3.0
5,601
0
11
1,069
709
399
310
70
1
{-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveAnyClass #-} -- | -- Copyright : (c) 2010-2012 Benedikt Schmidt & Simon Meier -- License : GPL v3 (see LICENSE) -- -- Maintainer : Simon Meier <iridcode@gmail.com> -- Portability : GHC only -- -- Common types for our c...
rsasse/tamarin-prover
lib/theory/src/Theory/Constraint/Solver/Heuristics.hs
gpl-3.0
5,019
0
15
1,381
867
486
381
89
11
-- This module defines a Tree datatype and instance for the Show and the Edit type classes. module TreeManipLib (Tree(Tip, (:+:)), treeSize, treeSubst, treeFlip, treeFlattens) where { data Tree a = Tip a | Tree a :+: Tree a; instance (Show a) => Show (Tree a) where { shows tr s = ...
ckaestne/CIDE
CIDE_Language_Haskell/test/fromviral/TreeManipLib.hs
gpl-3.0
4,240
0
17
1,626
1,466
789
677
90
4
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.LatencyTest.Types -- Copyright : (c) 2015-2016 Brendan...
rueshyna/gogol
gogol-latencytest/gen/Network/Google/LatencyTest/Types.hs
mpl-2.0
1,998
0
7
464
184
128
56
46
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-ec2/gen/Network/AWS/EC2/AuthorizeSecurityGroupIngress.hs
mpl-2.0
8,775
0
10
1,997
998
603
395
104
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Settings/Watch.hs
mpl-2.0
4,539
0
18
1,067
592
349
243
86
1
{- Habit of Fate, a game to incentivize habit formation. Copyright (C) 2019 Gregory Crosswhite This program is free software: you can redistribute it and/or modify it under version 3 of the terms of the GNU Affero General Public License. This program is distributed in the hope that it will be usef...
gcross/habit-of-fate
sources/library/HabitOfFate/Quests.hs
agpl-3.0
1,652
0
8
268
184
117
67
24
1
module NetAux where import Graphics.UI.WX import Control.Concurrent import NetData import WindowContext version = "HCPN NetEdit v0.1" -- auxiliary functions -- {{{ scaleVec s v = vec (myround $ (fromIntegral $ vecX v) * f) (myround $ (fromIntegral $ vecY v) * f) where ...
haroldcarr/learn-haskell-coq-ml-etc
haskell/playpen/hcpn/src/NetAux.hs
unlicense
5,313
0
13
1,232
2,650
1,396
1,254
119
2
#!/usr/bin/env stack -- stack --resolver lts-3.15 --install-ghc runghc --package turtle {-# LANGUAGE OverloadedStrings #-} import Turtle currentPath :: (MonadIO io) => io Text currentPath = do dir <- pwd return (format fp dir) main = do a <- currentPath print a
NeQuissimus/HaskellShell
printpwd.hs
apache-2.0
279
0
9
58
68
34
34
9
1
module GuiTest where import Graphics.UI.Gtk import Data.IORef gui :: IO () gui = do initGUI ioref <- newIORef 0 window <- windowNew button <- buttonNew set window [ containerBorderWidth := 10, containerChild := button ] set button [ buttonLabel := "Bu...
alexandersgreen/alex-haskell
GuiTest/GuiTest.hs
apache-2.0
753
0
16
260
225
108
117
19
1
{-# LANGUAGE OverloadedStrings #-} import Control.Applicative import Data.Attoparsec import qualified Data.Attoparsec.ByteString.Char8 as AC import qualified Data.ByteString as B import qualified Data.ByteString.Char8 as C import Data.List import Data.Monoid import S...
wavewave/misc-utils
oldcode/exe/simplereplace.hs
bsd-2-clause
1,062
0
21
295
347
180
167
28
3
module Turnpike.Error where data T = T deriving (Eq, Ord, Show)
massysett/turnpike
library/lib/Turnpike/Error.hs
bsd-3-clause
67
0
6
14
28
16
12
3
0
-- | -- Module: Control.Wire.TimedMap -- Copyright: (c) 2012 Ertugrul Soeylemez -- License: BSD3 -- Maintainer: Ertugrul Soeylemez <es@ertes.de> -- -- Timed maps for efficient cleanups in the context wires. module Control.Wire.TimedMap ( -- * Timed maps TimedMap, -- * Queries findWithDefa...
MaxDaten/netwire
Control/Wire/TimedMap.hs
bsd-3-clause
3,120
0
21
1,066
1,072
554
518
-1
-1
---------------------------------------------------------------------------- -- | -- Module : DART.Examples.Testing.RecurrentSMT -- Copyright : (c) Carlos López-Camey, University of Freiburg -- License : BSD-3 -- -- Maintainer : c.lopez@kmels.net -- Stability : stable -- -- -- Useful definitions to t...
kmels/dart-haskell
examples/testing/RecurrentSMT.hs
bsd-3-clause
1,250
0
13
312
239
138
101
15
4
{-# LANGUAGE OverloadedStrings #-} module Main (main) where import Data.ByteString.Lazy (ByteString) import Data.ByteString.Lazy.Internal (unpackChars) import ReadXLSX import System.Directory import Test.Tasty (defaultMain, testGroup) import Tes...
stla/jsonxlsx
test/Main.hs
bsd-3-clause
1,923
0
11
446
438
229
209
45
1
{-# LANGUAGE GADTs, ScopedTypeVariables, Rank2Types #-} import Data.Aeson import Data.ByteString.Lazy (ByteString) import Data.Set (Set, toList) import Data.Text (Text) import Database.Riak.Messages (Key(..), BucketName(..)) infixr 9 $> -- toJSON (Finalize t) = toJSON t -- toJSON (a :> (Finalize b)) = toJSON $ [to...
iand675/hiker
Database/Riak/MapReduce.hs
bsd-3-clause
6,132
16
11
1,682
2,142
1,127
1,015
105
1
-------------------------------------------------------------------- -- | -- Module : Text.RSS.Syntax -- Copyright : (c) Galois, Inc. 2008, -- (c) Sigbjorn Finne 2009- -- License : BSD3 -- -- Maintainer: Sigbjorn Finne <sof@forkIO.com> -- Stability : provisional -- -- The basic syntax for putting toget...
danfran/feed
src/Text/RSS/Syntax.hs
bsd-3-clause
8,123
0
10
2,634
1,559
952
607
223
1
{-# LANGUAGE RankNTypes #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} module Data.Xml.Parser where import Control.Applicative import Control.Lens(Optic, Optic', Choice, prism, set, over, (^?)) import Data.Bifunctor(Bifunctor(bimap)) import Data.Bool(bool) import Data.Digit(Digit, digit...
tonymorris/exml
src/Data/Xml/Parser.hs
bsd-3-clause
6,520
0
18
2,067
2,490
1,283
1,207
253
6
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE FlexibleContexts #-} module Scheduler.Types ( JobStatus (..) , Job-- (..) , newJob , JobQueue , jobName , jobStatus , jobVal , jobId , qJobs , qStartTim...
limaner2002/EPC-tools
scheduler-ui/src/Scheduler/Types.hs
bsd-3-clause
2,053
0
11
391
651
351
300
76
1
{-# LANGUAGE CPP, MagicHash, UnboxedTuples #-} {-# OPTIONS_GHC -O -funbox-strict-fields #-} -- We always optimise this, otherwise performance of a non-optimised -- compiler is severely affected -- -- (c) The University of Glasgow 2002-2006 -- -- Binary I/O library, with special tweaks for GHC -- -- Based on the nhc98 ...
spacekitteh/smcghc
compiler/utils/Binary.hs
bsd-3-clause
27,832
0
19
8,926
8,979
4,378
4,601
644
2
module Yesod.ReCAPTCHA ( YesodReCAPTCHA(..) , recaptchaAForm , recaptchaMForm , recaptchaOptions , RecaptchaOptions(..) ) where import Control.Applicative import Data.Typeable (Typeable) import Yesod.Core (whamlet) import qualified Control.Exception.Lifted as E import qualified Control.Monad.Tr...
prowdsponsor/yesod-recaptcha
src/Yesod/ReCAPTCHA.hs
bsd-3-clause
10,804
0
22
3,085
1,715
952
763
-1
-1
{-# language QuasiQuotes #-} {-# language TemplateHaskell #-} module OpenCV.Internal.Core.Types.Point.TH ( mkPointType ) where import "base" Data.List ( intercalate ) import "base" Data.Monoid ( (<>) ) import "base" Foreign.Marshal.Alloc ( alloca ) import "base" Foreign.Storable ( peek ) import "base" System.IO.U...
Cortlandd/haskell-opencv
src/OpenCV/Internal/Core/Types/Point/TH.hs
bsd-3-clause
6,560
0
23
2,785
1,388
774
614
-1
-1
-- xmobar config used by Cedric Fung on 15" rMBP -- Origin: Vic Fryzel (http://github.com/vicfryzel/xmonad-config) -- Modifier: Cedric Fung (http://github.com/vec.io/.linux/xmonad) Config { font = "xft:WenQuanYi Micro Hei Mono:size=7:antialias=true", bgColor = "#000000", fgColor = "#ffffff", position =...
vecio/.linux
xmonad/xmobar.hs
bsd-3-clause
1,332
0
10
262
335
208
127
-1
-1
-- | Follow-up from meetings with Chung-cheih shan and Co., where we -- discussed how to do a search over splitting strategy. module GenNeighborhood where -- IR datatype from last meeting. -- | A program is a flat list of variable bindings. type MidIR = [([Var], AExp)] data AExp = V Var | Map Exp Var |...
iu-parfunc/AutoObsidian
interface_brainstorming/01_early_sketch/GenNeighborhood.hs
bsd-3-clause
2,016
0
13
761
808
455
353
47
4
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE TypeFamilies #-} ...
iand675/hs-kafka
src/Network/Kafka/Primitive/OffsetCommit.hs
bsd-3-clause
9,205
0
12
1,801
2,216
1,121
1,095
270
0
{-# LANGUAGE MultiParamTypeClasses, DeriveDataTypeable #-} module Reactor.Task ( Task , run , spawn , io ) where import Control.Applicative import Control.Monad import Control.Exception import Control.Monad.Reader.Class import Control.Monad.Error.Class import Control.Monad.IO.Class import Data.Array.IO impor...
ekmett/reactor
Reactor/Task.hs
bsd-3-clause
2,556
0
14
615
1,083
571
512
73
1
module AERN2.Poly.Power.RootsInt ( initialBernsteinCoefs , bernsteinCoefs , signVars , reflect , contract , translate , transform , findRoots --, reduce , Terms ) where import AERN2.Poly.Power.RootsIntVector
michalkonecny/aern2
aern2-fun-univariate/src/AERN2/Poly/Power/RootsInt.hs
bsd-3-clause
231
0
4
49
45
31
14
12
0
{-# LANGUAGE CPP #-} #ifdef STRICT import Data.Map.Strict as Data.Map #else import Data.Map.Lazy as Data.Map #endif import Data.Monoid import Data.Maybe hiding (mapMaybe) import qualified Data.Maybe as Maybe (mapMaybe) import Data.Ord import Data.Function import Prelude hiding (lookup, null, map, filter, foldr, foldl...
ekmett/containers
tests/map-properties.hs
bsd-3-clause
50,903
580
20
12,086
21,456
12,018
9,438
910
7
{-# LANGUAGE CPP,TemplateHaskell,DeriveDataTypeable #-} module Data.Encoding.ISO88595 (ISO88595(..)) where import Data.Array ((!),Array) import Data.Word (Word8) import Data.Map (Map,lookup,member) import Data.Encoding.Base import Prelude hiding (lookup) import Control.OldException (throwDyn) import Data.Typeable da...
abuiles/turbinado-blog
tmp/dependencies/encoding-0.4.1/Data/Encoding/ISO88595.hs
bsd-3-clause
804
2
14
108
250
140
110
21
1
module Test where import WCC.Utils --(fileToMatrix) import WCC.Parse --(parseFile) import Png(png) import WCC.Types import WCC import Control.Applicative ((<$>)) import qualified Data.ByteString.Lazy as B import System.Process(system) import Control.Monad(when) import System.Exit(ExitCode (ExitFailure),exitWith) import...
runebak/wcc
Source/Garbage/Test.hs
bsd-3-clause
3,008
0
16
945
713
367
346
54
2
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} -- | Handles template instantiation and project descriptors. module Yate.Template(doTemplate, readDescription, readJSONDescription, ProjectDescription) where import Control.Applicative ((<|>)) import Control....
abailly/yate
src/Yate/Template.hs
bsd-3-clause
7,660
0
21
1,734
1,464
808
656
88
3
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveFunctor #-} module TcCanonical( canonicalize, unifyDerived, makeSuperClasses, maybeSym, StopOrContinue(..), stopWith, continueWith, solveCallStack -- For TcSimplify ) where #include "HsVersions.h" import GhcPrelude import Constraint import Predic...
sdiehl/ghc
compiler/typecheck/TcCanonical.hs
bsd-3-clause
103,692
192
24
29,470
12,412
6,722
5,690
-1
-1
{-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE TypeFamilies #-} -- | Richmen part of LRC DB. module Pos.DB.Lrc.RichmenBase ( -- * Generalization RichmenComponent (..) -- * Getters , getRichmen -- * Operations , putRichmen ) where import ...
input-output-hk/pos-haskell-prototype
db/src/Pos/DB/Lrc/RichmenBase.hs
mit
1,438
0
10
307
274
159
115
28
1
{-- snippet all --} import qualified Data.Map as Map -- Functions to generate a Map that represents an association list -- as a map al = [(1, "one"), (2, "two"), (3, "three"), (4, "four")] {- | Create a map representation of 'al' by converting the association - list using Map.fromList -} mapFromAL = Map.fromLis...
binesiyu/ifl
examples/ch13/buildmap.hs
mit
665
4
10
149
170
90
80
11
1
{-# LANGUAGE PackageImports #-} import "MyBlog" Application (develMain) import Prelude (IO) main :: IO () main = develMain
MaxGabriel/YesodScreencast
app/devel.hs
cc0-1.0
124
0
7
19
39
21
18
5
1
-- (c) The FFI task force, 2001 -- -- Provides fixed sized, signed integral types module Int ( Int8, Int16, Int32, Int64 ) where -- Constraints applying to all of the following types: -- -- * For any types, all arithmetic is performed modulo 2^n, where n is the -- number of bit width of the type minus one (for th...
mimi1vx/gtk2hs
tools/c2hs/doc/c2hs/lib/Int.hs
gpl-3.0
1,673
10
13
418
436
247
189
-1
-1
module Ex14 where fac n = if n == 0 then 1 else n * ( fac (n==1))
roberth/uu-helium
test/typeerrors/Edinburgh/Ex14.hs
gpl-3.0
67
0
10
19
41
23
18
2
2
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecordWildCards #-} -- | -- Module : Network.AWS.Env -- Copyright : (c) 2013-2015 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail...
olorin/amazonka
amazonka/src/Network/AWS/Env.hs
mpl-2.0
6,806
0
13
1,781
1,224
686
538
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- ...
fmapfmapfmap/amazonka
amazonka-ml/gen/Network/AWS/MachineLearning/DescribeDataSources.hs
mpl-2.0
10,112
0
14
2,332
1,625
972
653
172
1
{-| Author : Luc Taesch 2003 Portability : portable ? (tested on XP) Illustrate more controls from wxHaskell, Hacked from Controls.hs ( Daan Leijen 2003) namely bitmapButtons, righ click menus, vertical labels on notebooks, usage of tooltips -} module Main where import Graphics.UI.WX im...
ekmett/wxHaskell
samples/contrib/NotebookRight.hs
lgpl-2.1
2,239
0
20
870
520
253
267
40
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} module Blackbox.Types where import Control.Lens import Snap.Snaplet import Snap.Snaplet.Heist import Black...
snapframework/snap-templates
test/suite/Blackbox/Types.hs
bsd-3-clause
714
0
11
116
139
80
59
22
0
{-# LANGUAGE CPP, DeriveDataTypeable #-} {-# OPTIONS -Wall #-} -- | An 'Annotation' that sets the execution priority of the -- statements. Statements with 'Ballon's will be allocated -- as fast as possible, and statements with negative ballons, -- or @Stone@s, will be allocated as later as possible. module Language....
nushio3/Paraiso
Language/Paraiso/Annotation/Balloon.hs
bsd-3-clause
541
0
6
96
85
54
31
10
0
{- | Module : Control.Monad.Cont Copyright : (c) The University of Glasgow 2001, (c) Jeff Newbern 2003-2007, (c) Andriy Palamarchuk 2007 License : BSD-style (see the file LICENSE) Maintainer : libraries@haskell.org Stability : experimental Portability : portable [Comp...
ekmett/mtl
Control/Monad/Cont.hs
bsd-3-clause
5,231
0
5
1,029
105
76
29
21
0
-- -*- mode: haskell -*- -- -- $Id$ import Challenger import SAT.SAT student = Aufgabe { problem = SAT , instanz = [ (Pos "x", Pos "y", Pos "z") , (Neg "x", Pos "x", Pos "y") ] , beweis = listToFM [("x", True),("y", False),("z", False)] }
Erdwolf/autotool-bonn
src/SAT/doc/Aufgabe.hs
gpl-2.0
277
4
9
84
112
66
46
7
1
{-# LANGUAGE DeriveFunctor #-} module Parser.AST where data Const = ConstString String | ConstInt Int -- | ConstReal Double -- | ConstChar Char -- | ConstBool Bool deriving Eq data LetIn a = Let (Definition a) (LetIn a) | In (Expression a) deriving (Eq, Show, Functor) makeLet :: Expression a -> [Definit...
kayuri/HNC
Parser/AST.hs
lgpl-3.0
910
14
14
209
370
192
178
27
1
{-# LANGUAGE BangPatterns, CPP, DeriveFunctor #-} -- | This module allows for streaming decoding of CSV data. This is -- useful if you need to parse large amounts of input in constant -- space. The API also allows you to ignore type conversion errors on -- a per-record basis. module Data.Csv.Streaming ( -- * U...
plow-technologies/cassava
Data/Csv/Streaming.hs
bsd-3-clause
6,429
0
13
1,554
1,435
790
645
80
7
module BuildDistr where import System.Directory ( doesFileExist, doesDirectoryExist, removeFile , getCurrentDirectory,setCurrentDirectory , getDirectoryContents, createDirectoryIfMissing ) import System.Environment (getArgs) import System.Process (system) import Data.Ti...
cartazio/omega
util/BuildDistr.hs
bsd-3-clause
6,421
0
15
1,576
1,930
1,075
855
143
2
{- | Module : Neovim.Plugin.IPC Description : Communication between Haskell processes/threads Copyright : (c) Sebastian Witte License : Apache-2.0 Maintainer : woozletoff@gmail.com Stability : experimental This module reexports publicly available means to communicate between different plugins (or ...
saep/nvim-hs
library/Neovim/Plugin/IPC.hs
apache-2.0
507
0
5
103
28
20
8
4
0
{-# LANGUAGE NoImplicitPrelude #-} module ReadmeExample where import Numeric.Units.Dimensional.Prelude import Numeric.Units.Dimensional.NonSI (mile) leg :: Length Double leg = 1 *~ mile -- *~ combines a raw number and a unit to form a quantity speeds :: [Velocity Double] speeds = [60, 50, 40, 30] *~~ (kilo meter / ...
bjornbm/dimensional-dk
examples/ReadmeExample.hs
bsd-3-clause
1,373
0
10
281
240
131
109
20
1
module MediaWiki.API.Query.DeletedRevisions.Import where import MediaWiki.API.Types import MediaWiki.API.Utils import MediaWiki.API.Query.DeletedRevisions import Text.XML.Light.Types import Text.XML.Light.Proc ( strContent ) import Control.Monad import Data.Maybe stringXml :: String -> Either (String,[{-Error msg...
HyperGainZ/neobot
mediawiki/MediaWiki/API/Query/DeletedRevisions/Import.hs
bsd-3-clause
1,627
0
13
408
574
291
283
44
2
module IO ( Handle, HandlePosn, IOMode(ReadMode,WriteMode,AppendMode,ReadWriteMode), BufferMode(NoBuffering,LineBuffering,BlockBuffering), SeekMode(AbsoluteSeek,RelativeSeek,SeekFromEnd), stdin, stdout, stderr, openFile, hClose, hFileSize, hIsEOF, isEOF, hSetBuffering, hGetBuffering, hFlush,...
m-alvarez/jhc
compat/haskell98/IO.hs
mit
2,203
0
10
507
495
290
205
45
2
module Syntax where type Name = String data Expr = Lam Name Expr | App Expr Expr | Var Name | Lit Lit | Op Binop Expr Expr deriving (Eq,Show) data Lit = LInt Int | LBool Bool deriving (Show, Eq, Ord) data Binop = Add | Sub | Mul | Eql deriving (Eq, Ord, Show)
FranklinChen/write-you-a-haskell
chapter9/happy/Syntax.hs
mit
284
0
6
80
118
68
50
15
0
{-# LANGUAGE OverloadedStrings #-} module Util.Blaze (toStylesheet, toScript, toLink, mdToHTML) where import Text.Blaze ((!)) import qualified Text.Blaze.Html5 as H import qualified Text.Blaze.Html5.Attributes as A import Text.Markdown (markdown, def) import Data.Text.Lazy (Text) toStyle...
Ian-Stewart-Binks/courseography
hs/Util/Blaze.hs
gpl-3.0
874
0
10
224
248
138
110
22
1
module HAD.Y2014.M03.D25.Exercise ( Board , board , getList ) where import Data.List (groupBy) import Test.QuickCheck -- Preamble -- $setup -- >>> import Control.Applicative ((<$>), (<*>)) -- >>> import Data.List (group) -- A board is a "square list of list" -- The "square" form, is ensure by the constructo...
1HaskellADay/1HAD
exercises/HAD/Y2014/M03/D25/Exercise.hs
mit
975
0
10
196
187
112
75
12
1
module Jhc.Numeric where import Jhc.IO import Jhc.Num import Jhc.Type.Basic import Jhc.Order import Jhc.Type.Float import Jhc.Class.Real infixr 8 ^, ^^ {-# SPECIALIZE gcd :: Int -> Int -> Int #-} {-# SPECIALIZE gcd :: Integer -> Integer -> Integer #-} gcd :: (Integral a) => a -> a -> a gcd 0 0 ...
m-alvarez/jhc
lib/jhc/Jhc/Numeric.hs
mit
1,414
0
12
586
496
263
233
34
2
module A2 where import D2 sumSq xs ys = (sum (map sq xs)) + (sumSquares xs) main = sumSq [1 .. 4]
kmate/HaRe
old/testing/rmOneParameter/A2_AstOut.hs
bsd-3-clause
101
0
9
25
55
30
25
4
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module AppCache where import Control.Monad (when) import Control.Monad.Trans.Writer import Data.Hashable (hashWithSalt) import Data.List (intercalate) import qualifie...
ygale/yesod
demo/appcache/AppCache.hs
mit
2,038
0
13
637
570
302
268
50
2
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE TupleSections #-} module Main where import Data.Ix (range) import Data.List (iterate') import Data.Map.Strict (Map) import qualified Data.Map.Strict as M import Data.Maybe (mapMaybe) i...
genos/online_problems
advent_of_code_2018/day18/src/Main.hs
mit
1,967
0
18
635
914
471
443
58
4
module Feature.OptionsSpec where import Network.Wai (Application) import Network.Wai.Test (SResponse (..)) import Network.HTTP.Types import Test.Hspec import Test.Hspec.Wai import Protolude import SpecHelper spec :: SpecWith ((), Application) spec = describe "Allow header" $ do context "a table" $ do it ...
steve-chavez/postgrest
test/Feature/OptionsSpec.hs
mit
2,889
0
19
708
563
264
299
59
1
module BACnet ( module BACnet.Reader, module BACnet.Writer, ) where import BACnet.Reader import BACnet.Writer
michaelgwelch/bacnet
src/BACnet.hs
mit
119
0
5
22
29
19
10
6
0
{-# LANGUAGE TypeOperators #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE ConstraintKinds #-} module Protop.Core.Compositions ( (:.)(..) , (:.|)(..) , (:|.)(..) , ASS(..) ) where import Data.Proxy (Proxy(..)) import Protop.Core...
brunjlar/protop
src/Protop/Core/Compositions.hs
mit
2,415
0
12
712
1,173
621
552
57
0
{-| Module: Flaw.Visual.Geometry Description: Geometry. License: MIT -} {-# LANGUAGE DeriveGeneric, FlexibleContexts #-} module Flaw.Visual.Geometry ( Geometry(..) , PackedGeometry(..) , packGeometry , packIndexedGeometry , loadPackedGeometry , emitGeometryAsset , loadGeometryAsset , indexGeometryVert...
quyse/flaw
flaw-visual/Flaw/Visual/Geometry.hs
mit
5,819
0
22
1,209
1,602
840
762
146
6
-- | -- Module: Data.Vector.Extended -- Copyright: (c) 2016 Jared Tobin -- License: MIT -- -- Maintainer: Jared Tobin <jared@jtobin.ca> -- Stability: unstable -- Portability: ghc module Data.Vector.Extended ( ensemble , particle ) where import qualified Data.Vector as V (fromList, Vector) import qualified Dat...
jtobin/flat-mcmc
lib/Data/Vector/Extended.hs
mit
749
0
9
121
123
79
44
9
1
{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-orphans #-} module Hydrogen.Parsing ( module Text.Parsec.Combinator , module Text.Parsec.Prim , module Text.Parsec.Pos , Parser , ParseError , SomethingBad , Tokens , runTokenParser , mkError , sourceToken , manyBetween , (>+>) , (<+<) , ...
hydrogen-tools/hydrogen-parsing
src/Hydrogen/Parsing.hs
mit
6,798
0
16
1,923
2,506
1,309
1,197
-1
-1
{-# htermination filterM :: (a -> Maybe Bool) -> [a] -> Maybe [a] #-} import Monad
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Monad_filterM_3.hs
mit
83
0
3
16
5
3
2
1
0
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-} import Text.Printf import Data.List import Control.Arrow import Data.Function import Control.Monad.State import Control.Applicative import Control.Monad.Primitive import Data.BigBunnyAndDeer.DeerText import Data.BigBunnyAndDeer.DeerInfo import Data.BigBunnyAndDee...
Javran/BigBunnyAndDeer
src/Main.hs
mit
2,716
0
15
634
577
306
271
57
1
{-# htermination isLatin1 :: Char -> Bool #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_isLatin1_1.hs
mit
46
0
2
8
3
2
1
1
0
import Data.List.Split example1 = splitOn "." "foo.bar.baz" -- ["foo","bar","baz"] example2 = chunksOf 10 "To be or not to be that is the question." -- ["To be or n","ot to be t","hat is the"," question."]
riwsky/wiwinwlh
src/split.hs
mit
208
0
5
36
29
16
13
3
1
{- Author: Jeff Newbern Maintainer: Jeff Newbern <jnewbern@nomaware.com> Time-stamp: <Mon Nov 17 20:48:07 2003> License: GPL -} {- DESCRIPTION Exercise 2 - Combining Monadic Values Write functions parent and grandparent with signature Sheep -> Maybe Sheep. They should return one sheep selected from a...
maurotrb/hs-exercises
AllAboutMonads/examples/exercise2.hs
mit
2,237
10
11
605
507
256
251
32
1
{-# LANGUAGE OverloadedStrings #-} module Foundation where import Database.Persist.Sql import Import.NoFoundation import Text.Hamlet (hamletFile) import Yesod.Auth.Email import Yesod.Auth.Message (AuthMessage (InvalidLogin)) import qualified Yesod.Core.Unsafe as Unsafe import Yesod.Core.Types ...
swamp-agr/carbuyer-advisor
Foundation.hs
mit
21,051
0
46
6,024
3,587
1,848
1,739
-1
-1
{-# LANGUAGE DeriveDataTypeable, MultiParamTypeClasses #-} module NginxLint.Data where import Data.Data (Data, Typeable) import Data.Generics.Str (listStr, strList, Str(Zero)) import Data.Generics.Uniplate.Operations (Biplate, biplate, Uniplate, uniplate) import qualified Text.ParserCombinators.Parsec as P type Iden...
temoto/nginx-lint
NginxLint/Data.hs
mit
3,009
0
11
749
1,093
576
517
63
1
-- -- The first known prime found to exceed one million digits was discovered in -- 1999, and is a Mersenne prime of the form 2^6972593−1; it contains exactly -- 2,098,960 digits. Subsequently other Mersenne primes, of the form 2^p−1, -- have been found which contain more digits. -- -- However, in 2004 there was found ...
stu-smith/project-euler-haskell
Euler-097.hs
mit
525
0
10
93
42
28
14
1
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ask-skill-skillpackage.html module Stratosphere.ResourceProperties.ASKSkillSkillPackage where import Stratos...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/ASKSkillSkillPackage.hs
mit
3,443
0
13
363
532
302
230
45
1
module Types where import qualified Data.Text as T import qualified Data.Dates as D import Data.Monoid import Data.Monoid.Statistics.Numeric type Symbol = String data Query = Query { count :: Int , results :: [Quote] } deriving Show data HistoricalData = HistoricalData { symbol :: Symbol , quotes...
Dawil/SimplePortfolioOptimizer
src/Types.hs
mit
1,258
0
9
289
390
229
161
41
1
module Logic.PropositionalLogic.TruthTables where import Prelude import Data.List (nub, sortBy) import Data.Ord (comparing) import Logic.PropositionalLogic.Macro import Logic.PropositionalLogic.Sentence import ...
NorfairKing/the-notes
src/Logic/PropositionalLogic/TruthTables.hs
gpl-2.0
2,437
1
14
712
772
396
376
47
4
----------------------------------------------------------------------------- -- | -- Module : Numeric.Transform.Fourier.DFT -- Copyright : (c) Matthew Donadio 2003 -- License : GPL -- -- Maintainer : m.p.donadio@ieee.org -- Stability : experimental -- Portability : portable -- -- Not so naive imple...
tolysz/dsp
Numeric/Transform/Fourier/DFT.hs
gpl-2.0
2,085
0
16
444
468
255
213
18
3
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE OverloadedLabels #-} module GUI.DialogManager.Build ( buildDialogManager , configureDialogManager ) where import Data.Maybe(fromJust) import Data.Text(Text) import qualified Data.Text as T import GI.Gtk hiding (MessageDialog) import GUI.BuildMonad import GUI.CanBe...
jvilar/hrows
lib/GUI/DialogManager/Build.hs
gpl-2.0
2,560
0
12
413
488
264
224
54
1
{-# LANGUAGE StandaloneDeriving #-} module Annfail06 where -- Testing that we don't accept Typeable or Data instances defined in the same module import Annfail06_Help import Data.Data import Data.Typeable deriving instance Typeable InstancesInWrongModule instance Data InstancesInWrongModule where gfoldl = unde...
leroux/testsuite
tests/annotations/should_fail/annfail06.hs
gpl-3.0
498
0
5
81
63
38
25
14
1