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
import Catan import Test.QuickCheck prop_moveRobber :: [Hex] -> Hex -> Property prop_moveRobber h targetHex = True ==> h == moveRobber (moveRobber h targetHex) oldRobberHex where oldRobberHex = head $ filter robber h main :: IO () main = quickCheck prop_moveRobber
oldmanmike/catan
test/Spec.hs
bsd-3-clause
274
0
8
49
90
46
44
8
1
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ViewPatterns #-} module Dhall.Test.Util ( code , codeWith , equivalent , load , loadRelativeTo , loadWith , normalize' , normalizeWith' , assertNormalizesTo ...
Gabriel439/Haskell-Dhall-Library
dhall/tests/Dhall/Test/Util.hs
bsd-3-clause
11,138
0
20
2,820
2,315
1,230
1,085
217
5
{-| Module : Control.Freedom.Construction Description : Construction of (E)DSLs from small parts. Copyright : (c) Alexander Vieth, 2015 Licence : BSD3 Maintainer : aovieth@gmail.com Stability : experimental Portability : non-portable (GHC only) This module provides infrastructure for building free struct...
avieth/freedom
Control/Freedom/Construction.hs
bsd-3-clause
8,778
0
14
2,426
3,184
1,791
1,393
-1
-1
{-# LANGUAGE CPP #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TupleSections ...
rrnewton/stack
src/Stack/Build.hs
bsd-3-clause
8,368
0
16
2,429
1,644
880
764
142
3
module Main where import Sound.Wav import System.Environment main = do args <- getArgs case args of [] -> putStrLn "You need to provide a file for this to work." (x:_) -> decodeWaveFileOrFail x >>= writeWaveFile writeWaveFile :: Either a WaveFile -> IO () writeWaveFile (Left _) = print "Could not ...
CIFASIS/wavy
src/Identity.hs
bsd-3-clause
529
0
11
107
121
61
60
11
2
{-# LANGUAGE OverloadedStrings #-} module Init.Examples (init) where import qualified Data.ByteString.Lazy.Char8 as BS import qualified Data.Maybe as Maybe import Prelude hiding (init) import System.Directory (copyFile, getDirectoryContents) import System.FilePath ((</>), (<.>), splitExtension) import Text.Blaze.Html ...
elm-guides/elm-lang.org
src/backend/Init/Examples.hs
bsd-3-clause
4,169
0
20
1,076
1,266
643
623
114
2
-- | Module used for CSS compression. The compression is currently in a simple -- state, but would typically reduce the number of bytes by about 25%. -- module Hakyll.Web.CompressCss ( compressCssCompiler , compressCss ) where import Data.Char (isSpace) import Data.List (isPrefixOf) import Control.Arrow ((...
sol/hakyll
src/Hakyll/Web/CompressCss.hs
bsd-3-clause
1,538
0
10
347
345
183
162
29
1
module Chapter8 where sumUpTo :: (Eq a, Num a) => a -> a sumUpTo 1 = 1 sumUpTo x = x + sumUpTo (x - 1) mult :: (Integral a) => a -> a -> a mult x 1 = x mult x y = x + mult x (y - 1) mc91 :: (Num a, Ord a) => a -> a mc91 x | x > 100 = x - 10 | otherwise = mc91 $ mc91 x
taojang/haskell-programming-book-exercise
src/ch08/Chapter8.hs
bsd-3-clause
279
0
8
89
178
91
87
11
1
{- This module provides type inference for the base syntax. Here, you will find only the knot-tying top-level definitions. -} module TiBase(Typing,Scheme{-,GetSigs(..),DeclInfo(..)-}) where import Syntax hiding (extend) import SubstituteBase() import NameMapsBase() -- instance AccNames i (HsDeclI i) import TI --import ...
forste/haReFork
tools/base/TI/TiBase.hs
bsd-3-clause
3,205
0
12
668
978
513
465
-1
-1
#!/usr/bin/env stack -- stack --resolver lts-9.1 script module Main where main :: IO () main = do putStrLn "hello world!"
Flaeme/adventofcode
template.hs
bsd-3-clause
127
0
7
25
27
15
12
4
1
{-# LANGUAGE OverloadedStrings #-} module Parser.TechFile where import Data.ByteString.Char8 hiding (map) import Data.Attoparsec.ByteString.Char8 import Parser.Base import Data.Scientific (Scientific) -- ---- data Model = Model ByteString ByteString [Parameter] deriving (Show) modelName :: Model -> ByteString mo...
timerg/parser
src/Parser/TechFile.hs
bsd-3-clause
2,335
0
17
620
692
339
353
71
1
execConcrete :: Call -> StateSpace C_Delta C_AAM execConcrete = exec C_Delta C_AAM
davdar/quals
writeup-old/sections/03AAMByExample/04RecoveringConcrete/02Exec.hs
bsd-3-clause
83
0
6
12
25
12
13
2
1
module Benchmarks.Day06 (benchmarks) where import Criterion (Benchmark, bench, nf) import Day06 import Text.Heredoc benchmarks :: [Benchmark] benchmarks = [ bench "countLightsAfterCommands" $ nf countLightsAfterCommands input , bench "measureBrightnessAfterCommands" $ nf measureBrightnessAfterCommands...
patrickherrmann/advent
bench/Benchmarks/Day06.hs
bsd-3-clause
367
0
7
56
85
50
35
-1
-1
{-# LANGUAGE MultiParamTypeClasses #-} module Category where import qualified Horn as H import Term data Sort = O | H deriving (Show, Eq) data Fun = Id | Dot | Dom | Cod | Excl | PaOb | PaHom | Proj1 | Proj2 | Top deriving (Show, Eq) instance Signature Sort Fun where dom Id = [O] dom Dot = [H, ...
esengie/algebraic-checker
test/Category.hs
bsd-3-clause
6,156
0
16
1,595
3,461
1,720
1,741
126
1
; ; HSP help manager—p HELPƒ\[ƒXƒtƒ@ƒCƒ‹ ; (æ“ª‚ªu;v‚̍s‚̓Rƒƒ“ƒg‚Æ‚µ‚ďˆ—‚³‚ê‚Ü‚·) ; %type “à‘ –½—ß %ver 3.4 %note ver3.4•W€–½—ß %date 2009/08/01 %author onitama %url http://hsp.tv/ %port Win Let %index mci MCI‚ɃRƒ}ƒ“ƒh‚ð‘—‚é %group ƒ}ƒ‹ƒ`ƒƒfƒBƒA§Œä–½—ß %prm "strings" "strin...
zakki/openhsp
package/hsphelp/i_mmedia.hs
bsd-3-clause
5,369
2,548
10
553
5,458
2,954
2,504
-1
-1
{-# LANGUAGE NoImplicitPrelude #-} module Protocol.ROC.PointTypes.PointType81 where import Data.Binary.Get (getByteString,getWord16le,Get) import Data.ByteString (ByteString) import Data.Word (Word16) import Prelude (($), return, Eq, ...
plow-technologies/roc-translator
src/Protocol/ROC/PointTypes/PointType81.hs
bsd-3-clause
4,805
0
9
2,621
419
235
184
83
1
{-# LANGUAGE EmptyDataDecls, TypeSynonymInstances #-} {-# OPTIONS_GHC -fcontext-stack42 #-} module Games.Chaos2010.Database.Next_wizard where import Games.Chaos2010.Database.Fields import Games.Chaos2010.Database.Fields import Games.Chaos2010.Database.Fields import Games.Chaos2010.Database.Fields import Database.Ha...
JakeWheat/Chaos-2010
Games/Chaos2010/Database/Next_wizard.hs
bsd-3-clause
570
0
15
76
125
73
52
14
1
module AAPL.Options ( module AAPL.Options ) where import Valuation price :: Double price = 128 strike :: Double strike = 15.48 expiry :: Double expiry = 3.7 sigma :: Double sigma = 0.3 rate :: Double rate = 0.0247 n :: Double n = 1.1 shares :: Double shares = 5336.17 optionValue :: Double optionValue =...
sboehler/haskell-valuation
src/AAPL/Options.hs
bsd-3-clause
801
0
18
217
254
138
116
29
2
{-# LANGUAGE DeriveDataTypeable, TypeFamilies, TemplateHaskell #-} -- |Utilities for saving and loading shoppinglists module Data.ShoppingList.Persist ( saveList , loadList ) where import Data.ShoppingList import Data.Text.Lazy (Text) import Control.Exception.Base (bracket) import System.IO (openTempFile, hClose...
MasseR/Shopping-list
Data/ShoppingList/Persist.hs
bsd-3-clause
937
0
9
127
274
157
117
25
1
-- * Implements translation between abstract and structured argumentation models. -- | In the sense of IR theory, it would be more suitable that we take the abstract -- model to retrieve informations, though, its algebra is weak for semantic analisys -- so we implement translation between abstract and structured mo...
shingoOKAWA/hsarg-haskell
src/DSL/Translated/Api.hs
bsd-3-clause
2,178
0
15
552
532
298
234
27
1
{-# LANGUAGE RankNTypes #-} {-# LANGUAGE OverloadedStrings #-} module DigitalOcean.SSHKey ( SSHKey(..), listAllKeys ) where import Control.Applicative () import Control.Monad (liftM, mzero) import Control.Monad.IO.Class import Data.Aeson ((.:), FromJSON(..), Value(..), decode) import D...
satokazuma/digitalocean-kzs
src/DigitalOcean/SSHKey.hs
mit
1,456
0
11
325
384
222
162
33
2
module XML.GGXReader ( readGrammar , readGGName , readName , readNames , readTypeGraph , readRules , readGraphs , readSequences , readSequencesWithObjectFlow , instantiateRule , instantiateSpan , minimalSafetyNacsWithLog , showMinimalSafetyNacsLog ) where import Data.Function ...
rodrigo-machado/verigraph
src/library/XML/GGXReader.hs
gpl-3.0
11,254
0
18
2,444
3,357
1,757
1,600
185
5
{-# 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-config/gen/Network/AWS/Config/DescribeConfigurationRecorderStatus.hs
mpl-2.0
5,955
0
13
1,130
608
367
241
82
1
module GramLab.Morfette.Utils ( train , predict , Flag(..) , Input (..) , Output (..) , ROW , morfette ) where...
gchrupala/morfette
src/GramLab/Morfette/Utils.hs
bsd-2-clause
17,799
0
22
6,947
4,936
2,601
2,335
373
6
{-# LANGUAGE DeriveFunctor #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Tests.Matrix.Types ( Mat(..) , fromMat , toMat ) where import Control.Monad (join) import Control.Applicative ((<$>), (<*>)) import Statistics.Matrix (Matrix(..), fromList) import Test.QuickCheck import Tests.Helpers (sh...
bos/statistics
tests/Tests/Matrix/Types.hs
bsd-2-clause
1,303
0
11
334
507
274
233
32
2
{-# OPTIONS_GHC -fno-warn-orphans #-} module Application ( makeApplication , getApplicationDev , makeFoundation ) where import Import import Settings import Yesod.Auth import Yesod.Default.Config import Yesod.Default.Main import Yesod.Default.Handlers import Network.Wai.Middleware.RequestLogger ( m...
ikeda-yuko/nomnichi-haskell
Application.hs
bsd-2-clause
3,866
0
13
745
670
371
299
-1
-1
{-# LANGUAGE ScopedTypeVariables #-} -- | Use 'withWaiterPoll' or 'withWaiterNotify' to create a 'Waiter' object, -- then access it (single-threaded) by using 'waitFiles'. module Wait(Waiter, withWaiterPoll, withWaiterNotify, waitFiles) where import Control.Concurrent.Extra import qualified Data.Map as Map import q...
JPMoresmau/ghcid
src/Wait.hs
bsd-3-clause
3,912
0
33
1,226
1,099
553
546
70
5
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-s3/gen/Network/AWS/S3/PutBucketAcl.hs
mpl-2.0
5,938
0
9
1,421
934
550
384
99
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="ko-KR"> <title>Browser View | ZAP Extension</title> <maps> <homeID>top</homeID> <mapre...
0xkasun/security-tools
src/org/zaproxy/zap/extension/browserView/resources/help_ko_KR/helpset_ko_KR.hs
apache-2.0
974
85
52
160
398
210
188
-1
-1
module System.Console.ANSI.Common where import Data.Ix -- | ANSI colors: come in various intensities, which are controlled by 'ColorIntensity' data Color = Black | Red | Green | Yellow | Blue | Magenta | Cyan | White deriving (Eq,...
ekmett/ansi-terminal
System/Console/ANSI/Common.hs
bsd-3-clause
2,096
0
6
673
364
209
155
38
0
module ImportType where import ExportType w' :: W w' = w main :: Fay () main = do print X print Y print (Z 1) print (z (Z 1)) print w' print (V 1 2) print (v1 (V 1 2))
beni55/fay
tests/ImportType.hs
bsd-3-clause
195
0
11
67
114
53
61
13
1
{-| Module : Servant.Server.Auth.Token.Patch Description : Helpers for patching entities Copyright : (c) Anton Gushcha, 2016 License : MIT Maintainer : ncrashed@gmail.com Stability : experimental Portability : Portable -} module Servant.Server.Auth.Token.Patch( withPatch , withPatch' , withNullPat...
NCrashed/servant-auth-token
src/Servant/Server/Auth/Token/Patch.hs
bsd-3-clause
1,768
0
13
402
394
203
191
34
2
{-# LANGUAGE RankNTypes, ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Hoopl ( module Compiler.Hoopl, module Hoopl.Dataflow, ) where import Compiler.Hoopl hiding ( (<*>), mkLabel, mkBranch, mkMiddle, mkLast, -- clashes with our MkGraph DataflowLattice, OldFact, NewFact, JoinFun,...
olsner/ghc
compiler/cmm/Hoopl.hs
bsd-3-clause
753
0
7
136
190
123
67
21
0
<?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="sq-AL"> <title>Groovy Support</title> <maps> <homeID>top</homeID> <mapref location="map...
kingthorin/zap-extensions
addOns/groovy/src/main/javahelp/org/zaproxy/zap/extension/groovy/resources/help_sq_AL/helpset_sq_AL.hs
apache-2.0
959
77
66
156
407
206
201
-1
-1
module ListToMaybeIn2 where f :: [a] -> Maybe a f x@[] = (case x of [] -> Nothing (a : _) -> Just a) f x@(b_1 : b_2) = (case x of [] -> Nothing (a : _) -> Just a) f x = listToMaybe x -- | The 'listToMaybe' function returns 'Nothing' on an empty list -- or @'Ju...
SAdams601/HaRe
old/testing/simplifyExpr/ListToMaybeIn2.hs
bsd-3-clause
527
0
10
184
208
110
98
14
3
-------------------------------------------------------------------------------- {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE Rank2Types #-} module Hakyll.Core.Rules.Internal ( RulesRead (..) , RuleSet (..) , RulesState (..) , emptyRulesState , Rules (..) , runRules ...
Minoru/hakyll
src/Hakyll/Core/Rules/Internal.hs
bsd-3-clause
3,844
0
16
911
678
392
286
62
1
{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Foldable -- Copyright : Ross Paterson 2005 -- License : BSD-style (see the LICENSE file in the distribution) -- -- Maintainer : ross@soi.city.ac.uk -- Stability : experimental -- P...
hvr/jhc
lib/applicative/Data/Foldable.hs
mit
9,905
0
14
2,747
2,475
1,338
1,137
138
2
module Import0 () where import Language.Haskell.Liquid.Prelude import Foreign.Storable -- ERROR goes away if we: -- import Language.Haskell.Liquid.Foreign -- We shouldn't have to do so since, -- include/Foreign/Storable.Spec -- has the line: -- import Language.Haskell.Liquid.Foreign -- HYPOTHESIS: the import i...
mightymoose/liquidhaskell
tests/pos/imp0.hs
bsd-3-clause
542
0
5
112
50
34
16
5
1
module AsPatIn2 where f :: Either a b -> Either a b f x@(x_1) = x_1
kmate/HaRe
old/testing/subIntroPattern/AsPatIn2.hs
bsd-3-clause
69
0
7
17
37
20
17
3
1
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} module T7788 where data Proxy a = Proxy foo :: Proxy (F (Fix Id)) -> () foo = undefined newtype Fix a = Fix (a (Fix a)) newtype Id a = Id a type family F a type instance F (Fix a) = F (a (Fix a)) type instance F (Id a) = F a main :: IO () main = ...
urbanslug/ghc
testsuite/tests/indexed-types/should_fail/T7788.hs
bsd-3-clause
338
0
10
79
153
85
68
13
1
module T5922 where data Proposition = Proposition deriving (show)
urbanslug/ghc
testsuite/tests/deriving/should_fail/T5922.hs
bsd-3-clause
67
0
6
10
18
11
7
-1
-1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} -- | Variation of "Futhark.CodeGen.ImpCode" that contains the notion -- of a kernel invocation. module Futhark.CodeGen.ImpCode.GPU ( Program, Function, FunctionT (Function), Code, KernelCode, KernelConst (..), KernelConstExp...
HIPERFIT/futhark
src/Futhark/CodeGen/ImpCode/GPU.hs
isc
9,966
0
21
2,274
3,363
1,692
1,671
207
1
{-# LANGUAGE CPP #-} module GHCJS.DOM.XPathNSResolver ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.XPathNSResolver #else module Graphics.UI.Gtk.WebKit.DOM.XPathNSResolver #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFF...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/XPathNSResolver.hs
mit
460
0
5
39
33
26
7
4
0
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE QuasiQuotes #-} module Hesh.Shell (sh, desugar) where import Control.Applicative ((<$>), (*>), (<*)) import Control.Monad.IO.Class (liftIO) import Data.Char (isSpace, isAlphaNum) import Language.Haskell.TH (Q, location, Name, mkName, newName, stringL, litE, varE, listE, v...
jekor/hesh
lib/Hesh/Shell.hs
mit
5,161
0
17
1,137
1,498
800
698
102
2
{-# LANGUAGE PatternSynonyms #-} -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module JSDOM.Generated.HTMLOptionElement (setDisabled, getDisabled, getForm, setLabel, getLabel, setDefaultSelected, getDefaultS...
ghcjs/jsaddle-dom
src/JSDOM/Generated/HTMLOptionElement.hs
mit
5,104
0
12
648
1,131
634
497
63
1
{-# htermination sort :: [()] -> [()] #-} import List
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/List_sort_1.hs
mit
54
0
3
10
5
3
2
1
0
-- Cartesian coordinates from degree angle -- http://www.codewars.com/kata/555f43d8140a6df1dd00012b/ module Coordinates where import Numeric (showFFloat) coordinates :: Double -> Double -> (Double, Double) coordinates deg r = (r10 $ r * cos φ, r10 $ r * sin φ) where φ = deg * pi / 180 r10 x = read (sho...
gafiatulin/codewars
src/6 kyu/Coordinates.hs
mit
357
0
11
74
116
63
53
6
1
{-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module Language.LSP.Types.Completion where import qualified Data.Aeson as A import Data.Aeson.TH import Data.Scientific ( Scientific ...
wz1000/haskell-lsp
lsp-types/src/Language/LSP/Types/Completion.hs
mit
17,883
0
11
5,112
2,665
1,436
1,229
248
0
module LoopTest where import Data.List hiding (transpose) import Data.Maybe loop :: Eq a => Int -> [a] -> [[a]] loop 0 _ = [[]] loop _ [] = [] loop n xs = concat [map (x:) (loop (n-1) xs) | x <- xs] loop2 n xs = [(as,bs) | k <- [0..n], as <- loop k xs, bs <- loop (n-k) xs, f as bs] where f (a:as) (b:bs) | last (a...
rzil/honours
LeavittPathAlgebras/LoopTest.hs
mit
3,011
0
15
621
2,142
1,185
957
73
2
{-# OPTIONS_GHC -Wno-orphans #-} -- | -- This module contains orphan instancs to use string literatls to refer to -- variables in terms, which is convenient when building expressions in the -- Haskell code (e.g. in Monad.hs). -- -- Orphans are frowned upon in libraries, but not quite as bad in programs. -- We still put...
antalsz/hs-to-coq
src/lib/HsToCoq/Coq/Gallina/Orphans.hs
mit
879
0
13
142
146
84
62
12
0
module ConvertHTML ( htmlToPlain , htmlToHaddock ) where import Data.Maybe.Extra (rightToMaybe) import Regex import Text.Pandoc (readHtml, writePlain, writeHaddock, def, WriterOptions(..)) import Text.Pandoc.Walk (Walkable(walk)) import Text.Pandoc.Definition (Pandoc, Inline(..), nullAttr) import Text.XML.HXT.Co...
expipiplus1/spir-v
generate/src/ConvertHTML.hs
mit
1,829
0
12
298
433
244
189
37
4
{-# LANGUAGE NoImplicitPrelude #-} module Data.Soundchange ( PhonemeR(..) , Rule(..) ) where import ClassyPrelude import Data.Phoneme data PhonemeR = ConsonantR { cplaceR :: Maybe Place , cmannerR :: Maybe Manner , cvoiceR :: Maybe Phonation , cairstreamR :: Maybe Airstrea...
Brightgalrs/con-lang-gen
src/Data/Soundchange.hs
mit
2,432
0
17
945
829
433
396
51
0
{-# LANGUAGE OverloadedStrings #-} module Mint.Category (mintCategories) where import Control.Lens import Data.List import qualified Data.Text.Lazy as LT import qualified Data.Text.Lazy.Encoding as LTE import Database.HDBC import Database.HDBC.Sqlite3 import qualified Network.Wreq as Wreq import Text.XML.HXT.Core im...
jpotterm/manila-hs
src/Mint/Category.hs
cc0-1.0
3,208
55
15
588
850
438
412
65
1
{-# LANGUAGE NoImplicitPrelude #-} module Foreign.Introspection where builtin get_arg 2 "get_arg" "Prelude" builtin get_n_args 1 "get_n_args" "Prelude"
bredelings/BAli-Phy
haskell/Foreign/Introspection.hs
gpl-2.0
160
0
5
25
31
15
16
-1
-1
{-# LANGUAGE BangPatterns #-} module BasisFunction ( Basis , kineticMatrix , nuclearMatrix , twoElectronMatrix , overlapMatrix , contraction , sortBasisFunctions , soadDiago...
peterspackman/hsqc
src/BasisFunction.hs
gpl-3.0
5,010
0
16
1,294
1,825
978
847
100
2
{-# LANGUAGE UnicodeSyntax, OverloadedStrings #-} -- -- CSS to go with an HTML-rendered diff tree. -- module Css.DiffTree (stylesheet, main) where import BaseImport import Clay import Clay.Display import qualified Data.Text.Lazy.IO as TextIO import Css.FontIcon import Css.Images -- -- call from build script to gene...
c0c0n3/audidoza
Css/DiffTree.hs
gpl-3.0
4,636
0
16
1,577
1,215
615
600
118
1
{-#LANGUAGE OverloadedStrings #-} {-#LANGUAGE RecordWildCards #-} module Codec.MFO.API.Operator ( OReqAuth (..) , OAnswerAuth (..) , OReqNews(..) , OAnswerNews(..) , NewsShort(..) , NewsFull(..) ) where import Data.Aeson import Data.Aeson.Types as AT import Data.Text import Control.Appl...
dambaev/mfo-api-operator
src/Codec/MFO/API/Operator.hs
gpl-3.0
5,612
0
16
1,656
1,599
872
727
175
1
{-# Language RecordWildCards #-} {-# OPTIONS_GHC -funbox-strict-fields #-} -- | -- Module : Network.Bouquet.Base -- Copyright : (c) 2013 Kim Altintop <kim.altintop@gmail.com> -- License : This Source Code Form is subject to the terms of -- the Mozilla Public License, v. 2.0. -- ...
kim/bouquet
src/Network/Bouquet/Base.hs
mpl-2.0
3,297
0
18
940
1,126
603
523
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/TargetHTTPSProxies/Delete.hs
mpl-2.0
4,624
0
16
985
477
287
190
78
1
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances, UndecidableInstances #-} -- | -- Module : Data.ByteString.Extra -- Copyright : (c) Alexandru Scvortov 2009 -- License : LGPL (see LICENSE file) -- Maintainer : scvalex@gmail.com -- -- Contains the IsByteString class that simplifies the translation o...
scvalex/ltorrent
Data/ByteString/Extra.hs
lgpl-3.0
1,274
0
8
247
197
120
77
23
0
{-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDe...
GU-CLASP/TypedFlow
TypedFlow/Types/Proofs.hs
lgpl-3.0
15,038
15
19
3,872
6,601
3,405
3,196
319
4
{-# LANGUAGE OverloadedStrings #-} module Objects.Object where import qualified Data.Text as T(Text) import Physics.Motion(Position, Velosity) import Physics.Collision(isCollide) --import Physics.Collision type Objects = [Object] data Object = Object { objectName :: ObjectName , objectKind :: ObjectKind , ...
no-moree-ria10/utsuEater
src/Objects/Object.hs
apache-2.0
1,690
0
9
520
476
263
213
47
2
module ParseCmdSpec (spec) where import ParseCmd import Test.Hspec spec :: Spec spec = describe "setCmd" $ do it "standard" $ setCmd "w test.txt" `shouldBe` Command {addr = Nothing, cmdName = 'w', param = Just "test.txt"} it "standard...
Tatsuki-I/Vihs
test/ParseCmdSpec.hs
apache-2.0
629
0
15
226
194
106
88
12
1
module P37 where import P36 totientAlt = foldl (\acc (p, m) -> acc * (p - 1) * p ^ (m - 1)) 1 . primeFactorsMult
plilja/h99
p37.hs
apache-2.0
116
0
13
29
63
36
27
3
1
{-# LANGUAGE TemplateHaskell, QuasiQuotes, OverloadedStrings #-} module Handler.Root where import MySite -- This is a handler function for the GET request method on the RootR -- resource pattern. All of your resource patterns are defined in -- MySite.hs; look for the line beginning with mkYesodData. -- -- The majorit...
Tarrasch/Recipe-Site
Handler/Root.hs
bsd-2-clause
693
0
13
139
73
38
35
10
1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUA...
gcross/LogicGrowsOnTrees
LogicGrowsOnTrees/sources/LogicGrowsOnTrees/Checkpoint.hs
bsd-2-clause
24,614
0
24
4,808
3,323
1,755
1,568
330
14
{-# LANGUAGE FlexibleInstances, DeriveDataTypeable #-} module Model.Stats where import Prelude import Data.Convertible import Data.Data (Typeable) import Database.HDBC import Data.Text (Text) import Data.Time (LocalTime) import Control.Applicative import Model.Query import Model.Download (InfoHash) data StatsValue =...
jannschu/bitlove-ui
Model/Stats.hs
bsd-2-clause
1,717
0
11
304
413
212
201
-1
-1
----------------------------------------------------------------------------- -- | -- Module : Haddock.Backends.Html.Types -- Copyright : (c) Simon Marlow 2003-2006, -- David Waern 2006-2009, -- Mark Lentczner 2010 -- License : BSD-like -- -- Maintainer : haddo...
nominolo/haddock2
src/Haddock/Backends/Xhtml/Types.hs
bsd-2-clause
884
0
6
171
103
67
36
8
0
{-# LANGUAGE TemplateHaskell #-} module Client.KButtonT where import Control.Lens (makeLenses) import Data.Int (Int64) import Types makeLenses ''KButtonT newKButtonT :: KButtonT newKButtonT = KButtonT { _kbDown = (0, 0) , _kbDownTime = 0 , _kbMsec = 0 , _kbS...
ksaveljev/hake-2
src/Client/KButtonT.hs
bsd-3-clause
337
0
7
109
80
49
31
12
1
import qualified Streamly.Prelude as S import qualified Streamly.Data.Fold as FL -- import qualified Streamly.Memory.Array as A import qualified Streamly.FileSystem.Handle as FH import qualified System.IO as FH -- import qualified Streamly.FileSystem.FD as FH -- import qualified Streamly.Data.Unicode.Stream as US impo...
harendra-kumar/asyncly
examples/HandleIO.hs
bsd-3-clause
2,617
0
13
590
734
390
344
47
2
{-# LANGUAGE GeneralizedNewtypeDeriving, DeriveDataTypeable, OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-orphans #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Server.Framework.ResponseContentTypes -- Copyright : (c) David Himmelstrup 2008 --...
chrisdotcode/hackage-server
Distribution/Server/Framework/ResponseContentTypes.hs
bsd-3-clause
5,420
0
12
950
1,261
722
539
117
1
-- | Serialization methods for binary lists. module Data.BinaryList.Serialize ( -- * Simple interface encode , decode -- * Other methods , Direction (..) -- ** Encoding , EncodedBinList (..) , encodeBinList -- ** Decoding , DecodedBinList (..) , Decoded (..) , fromDecoded ...
Daniel-Diaz/binary-list
Data/BinaryList/Serialize.hs
bsd-3-clause
8,680
0
18
2,270
1,598
864
734
111
6
{-# LANGUAGE ScopedTypeVariables, QuasiQuotes, TemplateHaskell, MultiParamTypeClasses, FlexibleInstances #-} module XPathFullAnnotation where import Language.XHaskell [xh| data Html = Html Head Body data Head = Head data Body = Body (Star P) data P = P deriving Show class XPath a b where (//) :: a -> b -...
luzhuomi/xhaskell
test/XPathFullAnnotation.hs
bsd-3-clause
1,245
0
4
404
17
12
5
4
0
{-# LANGUAGE CPP, ScopedTypeVariables #-} module MB.Startup ( startupConfigFromEnv , canonicalizeStartupConfig , versionString #ifdef TESTING , Flag(..) , startupConfig , baseDirEnvName , baseDirParamName , htmlOutputDirEnvName , htmlDirParamName , getDataDirFlag #endif ) whe...
jtdaugherty/mathblog
src/MB/Startup.hs
bsd-3-clause
7,960
0
20
2,467
1,795
951
844
163
6
{- Copyright : Galois, Inc. 2012-2015 License : BSD3 Maintainer : jhendrix@galois.com Stability : experimental Portability : non-portable (language extensions) -} module Tests.SharedTerm ( sharedTermTests ) where import Control.Monad import Data.Hashable import qualified Data.Map as Map import Data.Tim...
iblumenfeld/saw-core
tests/src/Tests/SharedTerm.hs
bsd-3-clause
791
0
9
132
122
71
51
19
1
{-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StaticPointers #-} module Main (main) where import Control.Exception import Data.Binary import Data.Typeable.Internal import GHC.Fingerprint import GHC.Gener...
iu-parfunc/haskell-hpx
mockups/StaticRep.hs
bsd-3-clause
3,491
0
16
740
977
503
474
78
3
{-# LANGUAGE CPP, DeriveDataTypeable, MagicHash, PolymorphicComponents, RoleAnnotations, UnboxedTuples #-} ----------------------------------------------------------------------------- -- | -- Module : Language.Haskell.Syntax -- Copyright : (c) The University of Glasgow 2003 -- License : BSD-style (see t...
spacekitteh/smcghc
libraries/template-haskell/Language/Haskell/TH/Syntax.hs
bsd-3-clause
49,652
36
14
13,683
8,711
4,793
3,918
622
9
module Main ( main ) where import qualified CrispMain as C main :: IO () main = C.main
talw/crisp-compiler
src-executable/Main.hs
bsd-3-clause
91
0
6
22
32
20
12
5
1
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.Raw.NV.TexgenEmboss -- Copyright : (c) Sven Panne 2015 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : portable -- ...
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/NV/TexgenEmboss.hs
bsd-3-clause
688
0
4
84
43
35
8
5
0
{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE StandaloneDeriving #-} module Da...
cdxr/haskell-interface
src/Data/Interface/Change.hs
bsd-3-clause
12,731
0
17
3,482
4,427
2,251
2,176
263
3
-- Copyright (c) 2016-present, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. An additional grant -- of patent rights can be found in the PATENTS file in the same directory. {-# LANGUAGE GADT...
rfranek/duckling
Duckling/Rules/ID.hs
bsd-3-clause
1,087
0
7
171
300
167
133
24
1
-- -- Copyright (c) 2009-2011, ERICSSON AB -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- -- * Redistributions of source code must retain the above copyright notice, -- this list...
rCEx/feldspar-lang-small
src/Feldspar/Lattice.hs
bsd-3-clause
8,067
0
12
1,916
2,417
1,385
1,032
88
1
{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE PackageImports #-} {-# LANGUAGE TypeSynonymInstances #-} {-# OPTIONS -fno-warn-missing-methods #-} module Prelude ( -- Prelude type re-exports Base.Char ,Base.String ,Base.Double ,Base.Int ,Base.Integer ,Bas...
beni55/fay
fay-base/src/Prelude.hs
bsd-3-clause
20,966
2
12
5,744
9,868
5,390
4,478
-1
-1
-- | -- Module : Data.Semiring -- Description : Semirings -- Copyright : 2012, Thomas Wilke, Frank Huch, Sebastian Fischer -- 2014-2016, Peter Harpending -- License : BSD3 -- Maintainer : Peter Harpending <peter@harpending.org> -- Stability : experimental -- Portability : portable --...
pharpend/semiring
src/Data/Semiring.hs
bsd-3-clause
2,391
0
8
597
165
122
43
10
1
module Day18 where import Control.Monad import Data.Map ((!)) import Data.Maybe import qualified Data.Map as Map type Coord = (Int, Int) type Grid = Map.Map (Int, Int) Bool type GridRules = Grid -> Coord -> Bool lightsOn :: Grid -> Int lightsOn = length . filter id . Map.elems nextGrid :: GridRules -> Grid -> Grid ...
patrickherrmann/advent
src/Day18.hs
bsd-3-clause
1,402
0
16
326
626
336
290
39
3
-- Tipos.hs -- Algunas funciones requieren tipos de datos mas generales que otras. -- Aqui se definen tipos de datos para representar mejor la informacion. -- En cada tipo definido, se especifica que formato tendra y que representa. module Tipos where type Cadena = String -- Conjunto de caracteres type Texto ...
emikohmann/summarizer
Tipos.hs
bsd-3-clause
561
0
4
117
57
42
15
8
0
{-#LANGUAGE MultiParamTypeClasses, NoMonomorphismRestriction#-} module Tests.Data.Full.Teste3 where import Tests.Data.Full.Teste2 teste = [h] f = (1,'a', [1]) g x = x : [2] h1 = ('1',()) teste3 = teste1 '1' teste1 x = teste3
rodrigogribeiro/mptc
test/Data/Full/Teste3.hs
bsd-3-clause
232
0
6
39
85
52
33
9
1
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} -- | Provides instance implementations for the >>> combinator -- using the /explicit/ subword construction algorithm. module ADP.Multi.Rewriting.Combinators where import ADP.Multi.Combinators import ADP.M...
adp-multi/adp-multi
src/ADP/Multi/Rewriting/Combinators.hs
bsd-3-clause
691
0
8
104
148
90
58
14
0
module Data.Kicad.SExpr.Write ( pretty , write ) where import Text.PrettyPrint.Compact import Data.Kicad.SExpr.SExpr {-| Pretty-print an s-expression as a readable "document". -} pretty :: SExpr -> Doc pretty (List _ xs) = text "(" <> align (sep $ map pretty xs) <> text ")" pretty atm = text $ write atm {-| Seriali...
monostable/haskell-kicad-data
Data/Kicad/SExpr/Write.hs
mit
728
1
14
169
240
127
113
13
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 #-} -- ...
olorin/amazonka
amazonka-opsworks/gen/Network/AWS/OpsWorks/DescribeUserProfiles.hs
mpl-2.0
4,790
0
13
1,002
604
363
241
78
1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} module Distribution.Types.UnqualComponentName ( UnqualComponentName, unUnqualComponentName, mkUnqualComponentName , packageNameToUnqualComponentName, unqualComponentNameToPackageName ) where import Prel...
themoritz/cabal
Cabal/Distribution/Types/UnqualComponentName.hs
bsd-3-clause
2,851
0
8
381
313
193
120
32
1
{-# LANGUAGE NoRebindableSyntax #-} {-# OPTIONS_GHC -fno-warn-missing-methods #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} -- | This file contains a LOT of instance declarations for making Base code compatible with SubHask type cl...
Drezil/subhask
src/SubHask/Compatibility/Base.hs
bsd-3-clause
3,061
0
10
626
718
386
332
-1
-1
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, ScopedTypeVariables, GADTs, TypeFamilies, InstanceSigs, DataKinds #-} {-# OPTIONS -W #-} module Language.Hakaru.Maple (Maple(..), runMaple) where -- Expect-Maple printing interpretation -- This fuses two operations: -- 1. the Expect program transformation -- 2. t...
bitemyapp/hakaru
Language/Hakaru/Maple.hs
bsd-3-clause
10,034
0
35
2,831
3,977
1,975
2,002
234
1
{-# LANGUAGE CPP #-} -- #define NoOptimizeCircuit -- #define NoHashCons -- #define NoIfBotOpt -- #define NoIdempotence -- -- Improves hash consing, but can obscure equivalent circuits -- #define NoCommute #define NoBusSize #define MealyToArrow -- -- TODO: Make dynamic, perhaps via display attributes -- #define Sh...
capn-freako/circat
src/Circat/Circuit.hs
bsd-3-clause
74,771
114
32
20,725
18,215
9,781
8,434
-1
-1
module Multi.Selection where -- $Id$ import Multi.Config import Multi.Paths import Util.Zufall import Util.Datei import Types -- wash import qualified Posix import Control.Monad ( guard ) data Item = Item { picture :: FilePath -- ohne dir , alternatives :: [ String ] -- vorschläge , solution :: Int ...
Erdwolf/autotool-bonn
src/Multi/Selection.hs
gpl-2.0
1,574
10
20
468
567
299
268
42
1
data Season = Winter | Spring | Summer | Fall deriving(Show) toInt :: Season -> Int toInt Winter = 0 toInt Spring = 1 toInt Summer = 2 toInt Fall = 3 fromInt :: Int -> Season fromInt 0 = Winter fromInt 1 = Spring fromInt 2 = Summer fromInt 3 = Fall next :: Season -> Season next x = fromInt ( (toInt(x) + 1) `m...
Khady/Functional-Programming
codes/seasons.hs
unlicense
467
0
11
111
204
107
97
18
1
{-# OPTIONS -fglasgow-exts #-} {-# LANGUAGE MultiParamTypeClasses, OverlappingInstances, UndecidableInstances, FunctionalDependencies, NoMonomorphismRestriction #-} module IdM where import MT import Control_Monad_Fix newtype IdM a = I { removeId :: a } instance Monad IdM where return = I I x >>= f ...
kmate/HaRe
old/tools/base/lib/Monads/IdM.hs
bsd-3-clause
509
0
12
124
144
76
68
15
0
module SlicingUtils where import AbstractIO import Data.Maybe import Data.List import RefacUtils import RefacRedunDec checkCase (Exp(HsInfixApp e11 o e22 )) high wh | findEntity high e11 = do (e, wh) <- checkCase e11 high wh return (e, wh) | findEntity hi...
SAdams601/HaRe
old/refactorer/SlicingUtils.hs
bsd-3-clause
5,836
0
15
3,472
1,383
677
706
-1
-1
{-# LANGUAGE CPP, MagicHash, NoImplicitPrelude, BangPatterns, UnboxedTuples, UnliftedFFITypes #-} -- Commentary of Integer library is located on the wiki: -- http://ghc.haskell.org/trac/ghc/wiki/Commentary/Libraries/Integer -- -- It gives an in-depth description of implementation details and -- decisions...
shlevy/ghc
libraries/integer-simple/GHC/Integer/Type.hs
bsd-3-clause
34,271
4
39
10,645
7,717
4,171
3,546
-1
-1
module Aws.SimpleDb.Commands.Domain where import Aws.Core import Aws.SimpleDb.Core import Control.Applicative import Data.Maybe import Data.Time import Data.Time.Clock.POSIX import Text.XML.Cursor (($//), (&|)) import qualified Data.Text ...
Soostone/aws
Aws/SimpleDb/Commands/Domain.hs
bsd-3-clause
6,628
0
14
1,425
1,285
688
597
-1
-1