code
stringlengths
5
1.03M
repo_name
stringlengths
5
90
path
stringlengths
4
158
license
stringclasses
15 values
size
int64
5
1.03M
n_ast_errors
int64
0
53.9k
ast_max_depth
int64
2
4.17k
n_whitespaces
int64
0
365k
n_ast_nodes
int64
3
317k
n_ast_terminals
int64
1
171k
n_ast_nonterminals
int64
1
146k
loc
int64
-1
37.3k
cycloplexity
int64
-1
1.31k
module AsXYSpec where import Control.Exception (evaluate) import Test.Hspec import Data.Ratio import Data.Matrix import Data.Matrix.AsXYZ readTest str mat = do it ("read " ++ str) $ do fromXY str `shouldBe` mat readData = [ ("x,y+1", {- shouldBe -} fromLists [ [1,0,0], [0,1,1], [0,...
narumij/matrix-as-xyz
test/AsXYSpec.hs
bsd-3-clause
2,193
0
31
636
882
446
436
66
1
{-# LANGUAGE TemplateHaskell, ConstraintKinds, ScopedTypeVariables, FlexibleInstances #-} module Templates where import qualified Classes as D import Prelude ( (=<<), String ) import Language.Haskell.InstanceTemplates import Language.Haskell.TH.Syntax -- This is just for prettier -ddump-splices -- The instance tem...
mgsloan/instance-templates
tests/monads/Templates.hs
bsd-3-clause
1,833
0
7
541
134
86
48
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Dalvik.Printer ( prettyInstruction , prettyHeader , prettyClassDef , protoDesc , methodStr , getStr' , getTypeName' ) where import qualified Control.Exception as E import Data.Bits import qualified Data.ByteString.Char8 as ...
travitch/dalvik
src/Dalvik/Printer.hs
bsd-3-clause
30,900
0
20
7,157
10,901
5,512
5,389
657
16
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE DataKinds #-} module Main where import Numeric.HXSC import Numeric.HXSC.Internal import Text.Printf -- import qualified Data.Vector as V -- import qualified Data.Vector.Storable as V import qualified Data.Vector.Unboxed as V import System.Random.MWC import Control.Dee...
dlilja/hxsc
example/example.hs
bsd-3-clause
2,078
0
15
857
478
250
228
31
1
{- Baseclasses for Map-like and Set-like collections inspired by containers. -} {-# LANGUAGE TypeFamilies #-} module Compiler.Hoopl.Collections ( IsSet(..) , setInsertList, setDeleteList, setUnions , IsMap(..) , mapIn...
ezyang/hoopl
src/Compiler/Hoopl/Collections.hs
bsd-3-clause
2,742
0
11
738
1,098
555
543
60
1
{-# LANGUAGE Unsafe #-} -- | It defines main data structures for security, i.e., monad family 'MAC' and labeled resources 'Res'. module MAC.Core ( -- Resources definitions Res (MkRes,unRes) , labelOf -- Monad MAC , MAC (MkMAC) , runMAC -- IO actions into MAC , ioTCB ) ...
alejandrorusso/mac-privacy
MAC/Core.hs
bsd-3-clause
1,148
0
9
296
301
169
132
30
1
module Problem38 where import Data.List (find) import Data.Maybe (mapMaybe) import Problem32 (digits, fromDigits, isPandigital) -- -- Problem 38: Pandigital multiples -- -- Take the number 192 and multiply it by each of 1, 2, and 3: -- -- 192 × 1 = 192 -- 192 × 2 = 384 -- 192 × 3 = 576...
c0deaddict/project-euler
src/Part1/Problem38.hs
bsd-3-clause
1,370
0
12
267
254
146
108
15
1
import Test.Framework (defaultMain) import qualified HStyle.Block.Tests (tests) main :: IO () main = defaultMain [ HStyle.Block.Tests.tests ]
mightybyte/hstyle
tests/TestSuite.hs
bsd-3-clause
152
0
7
27
48
28
20
5
1
{-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports#-} module Data.KeyStore.KS.Opt ( Opt , OptEnum(..) , opt_enum , getSettingsOpt , getSettingsOpt' , setSettingsOpt , op...
cdornan/keystore
src/Data/KeyStore/KS/Opt.hs
bsd-3-clause
10,201
0
16
3,282
2,415
1,318
1,097
254
13
-- | Nelson-Oppen Procedure for Combining Theory Solvers module Language.Nano.SMT.NelsonOppen (theory_solver) where import Language.Nano.SMT.Types import Control.Monad.State import qualified Data.HashMap.Strict as M import qualified Data.HashSet as S import Control.Applicative ((<...
UCSD-PL/nano-smt
Language/Nano/SMT/NelsonOppen.hs
bsd-3-clause
4,398
0
14
941
1,109
598
511
-1
-1
{-# LANGUAGE CPP #-} #if __GLASGOW_HASKELL__ >= 701 {-# LANGUAGE Safe #-} #endif ----------------------------------------------------------------------------- -- | -- Module : Text.PrettyPrint.HughesPJClass -- Copyright : (c) Lennart Augustsson 2014 -- License : BSD-style (see the file LICENSE) -- -- Mai...
ku-fpg/marked-pretty
src/Text/PrettyPrint/MarkedHughesPJClass.hs
bsd-3-clause
4,833
0
10
1,059
1,674
904
770
79
1
module Matterhorn.State.ChannelListOverlay ( enterChannelListOverlayMode , channelListSelectDown , channelListSelectUp , channelListPageDown , channelListPageUp ) where import Prelude () import Matterhorn.Prelude import qualified Brick.Widgets.List as L import qualified Data.Vector as...
matterhorn-chat/matterhorn
src/Matterhorn/State/ChannelListOverlay.hs
bsd-3-clause
3,109
0
16
653
611
332
279
54
2
----------------------------------------------------------------------------- -- | -- Module : Distribution.Server.Util.ServeTarball -- Copyright : (c) 2008 David Himmelstrup -- (c) 2009 Antoine Latter -- License : BSD-like -- -- Maintainer : duncan@haskell.org -- Stability : provision...
snoyberg/hackage-server
Distribution/Server/Util/ServeTarball.hs
bsd-3-clause
5,422
0
21
1,512
1,288
682
606
104
3
{-# OPTIONS_HADDOCK hide #-} module Database.Edis.Helper where import Data.ByteString (ByteString) import Data.Maybe (fromJust) import Data.Proxy (Proxy) import Data.Serialize (Serialize, encode, decode) import Database.Redis as Redis hiding (decode) import GHC.TypeLits ...
banacorn/tredis
src/Database/Edis/Helper.hs
mit
2,605
0
14
519
936
470
466
43
2
{- - Qoropa -- Love Your Mail! - Copyright © 2010 Ali Polatel - - This file is part of the Qoropa mail reader. Qoropa is free software; - you can redistribute it and/or modify it under the terms of the GNU General - Public License version 2, as published by the Free Software Foundation. - - Qoropa is distributed in the...
beni55/qoropa
src/Qoropa.hs
gpl-2.0
1,036
0
8
207
72
39
33
8
1
{-# LANGUAGE CPP, RankNTypes #-} {- | Module :./CMDL/InfoCommands.hs Description : CMDL interface commands Copyright : uni-bremen and DFKI License : GPLv2 or higher, see LICENSE.txt Maintainer : r.pascanu@jacobs-university.de Stability : provisional Portability : portable CMDL.InfoCommands contains all c...
spechub/Hets
CMDL/InfoCommands.hs
gpl-2.0
12,900
0
23
4,005
3,362
1,720
1,642
246
4
{- | Module : ./CspCASLProver.hs Description : Interface to the CspCASLProver (Isabelle based) theorem prover Copyright : (c) Liam O'Reilly and Markus Roggenbach, Swansea University 2009 License : GPLv2 or higher, see LICENSE.txt Maintainer : csliam@swansea.ac.uk Stability : provisional Portability...
spechub/Hets
CspCASLProver.hs
gpl-2.0
1,356
0
2
183
5
4
1
1
0
#!/usr/bin/env stack {- stack runghc --verbosity info --package pandoc-types -} import Text.Pandoc.JSON main :: IO () main = toJSONFilter dropHtmlInlines dropHtmlInlines :: Inline -> Inline dropHtmlInlines (RawInline (Format "html") _) = Str "" dropHtmlInlines x = x
ony/hledger
tools/pandoc-drop-html-inlines.hs
gpl-3.0
271
0
9
41
69
36
33
6
1
{-# LANGUAGE OverloadedStrings, TemplateHaskell #-} module Types where import Prelude hiding (FilePath, putStrLn) import Control.Lens import Control.Monad.Except import Control.Monad.Reader import Control.Monad.State import Control.Monad.Trans.Resource import Data.Text (Text(), pack) import Data.Text.IO (putStrLn) i...
ktvoelker/HsTools
src/Types.hs
gpl-3.0
1,807
0
9
372
579
320
259
59
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Network.AWS.ElastiCache.Waiters -- Copyright : (c) 2013-2015 Brendan Hay -- License : Mozilla Public Lice...
fmapfmapfmap/amazonka
amazonka-elasticache/gen/Network/AWS/ElastiCache/Waiters.hs
mpl-2.0
6,645
0
15
2,934
839
451
388
119
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} -- run as: ./gen -o favicon.png -w 32 -h 32 import Diagrams.Prelude import Diagrams.Backend.Rasterific.CmdLine main = defaultMain icon icon :: Diagram B icon = lines_ `atop` canvas_ where line_ = rect 14 3 # fc white . lw none dot_ = circle 2 # f...
aelve/guide
favicon/gen.hs
bsd-3-clause
548
5
14
130
190
98
92
-1
-1
{-# LANGUAGE TupleSections #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} module Stack.Dot (dot ,listDependencies ,DotOpts(..) ,resolveDependencies ,printGraph ,pruneGraph ) where import ...
duplode/stack
src/Stack/Dot.hs
bsd-3-clause
11,701
0
21
3,470
3,032
1,582
1,450
216
3
{-# LANGUAGE MultiParamTypeClasses #-} -- Test #3265 module T3265 where data a :+: b = Left a | Right b class a :*: b where {}
sdiehl/ghc
testsuite/tests/rename/should_fail/T3265.hs
bsd-3-clause
131
0
6
30
36
22
14
-1
-1
module Graphics.Blank.Events ( -- * Events Event(..) , NamedEvent(..) , EventName(..) -- * Event Queue , EventQueue -- not abstract , writeEventQueue , readEventQueue , tryReadEventQueue , newEventQueue ) where import...
sordina/blank-canvas
Graphics/Blank/Events.hs
bsd-3-clause
2,406
0
19
769
591
324
267
58
2
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, FlexibleContexts, TypeFamilies #-} module PushedInAsGivens where type family F a bar y = let foo :: (F Int ~ [a]) => a -> Int foo x = length [x,y] in (y,foo y) -- This example demonstrates why we need to push in -- an unsolved wanted as a...
sdiehl/ghc
testsuite/tests/indexed-types/should_compile/PushedInAsGivens.hs
bsd-3-clause
1,043
0
12
230
92
57
35
6
1
module Main where import Digraph main = mapM_ print [ test001 , test002 , test003 , test004 ] -- These check that the result of SCCs doesn't depend on the order of the key -- type (Int here). test001 = testSCC [("a", 1, []), ("b", 2, []), ("c", 3, [])] test002 = testSCC [("a", 2, []), ("b", 3, []), ("c",...
ezyang/ghc
testsuite/tests/determinism/determ001/determinism001.hs
bsd-3-clause
577
0
8
128
273
166
107
13
1
{-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE ViewPatterns #-} module T13098 where import Language.Haskell.TH $( sequence [ dataD (cxt []) (mkName "T") [PlainTV (mkName "a")] Nothing [normalC (mkName "T") []] [] , pragCompleteD [mkName "T"] Nothing ] ) ...
shlevy/ghc
testsuite/tests/th/T13098.hs
bsd-3-clause
581
0
13
194
108
58
50
17
0
module Completesig03A where data A = A | B {-# COMPLETE A #-}
shlevy/ghc
testsuite/tests/pmcheck/complete_sigs/Completesig03A.hs
bsd-3-clause
65
0
5
15
15
10
5
3
0
import Text.Printf main = do line <- getLine let f = read line :: Double putStrLn . printf "%.3f" $ 5*(f-32)/9
Voleking/ICPC
references/aoapc-book/BeginningAlgorithmContests/haskell/ch1/ex1-2.hs
mit
118
0
11
28
62
30
32
5
1
module Filter.Posterise where import Codec.Picture simplePosterise :: Int -> Image Pixel8 -> Image Pixel8 simplePosterise n = pixelMap f where width = 255 `div` fromIntegral n f gray = width * (gray `div` width)
lesguillemets/haskell-image-filters
Filter/Posterise.hs
mit
233
0
9
55
78
42
36
6
1
{-# LANGUAGE DataKinds #-} module App where import Network.Wai import Network.Wai.Handler.Warp import Servant import System.IO import Api.Main import qualified Database.PostgreSQL.Simple as PGS -- * run app run :: IO () run = do con <- PGS.connect PGS.defaultConnectInfo { PGS.connectUser = "ordermag...
gigavinyl/ordermage
src/App.hs
mit
709
0
16
168
189
102
87
21
1
{-# LANGUAGE CPP, OverloadedStrings #-} module BasicTests (basicSpecs) where import Yesod.Test import Foundation redirectCode :: Int #if MIN_VERSION_yesod_test(1,4,0) redirectCode = 303 #else redirectCode = 302 #endif basicSpecs :: YesodSpec MyApp basicSpecs = ydescribe "Basic tests" $ do yit "checks the...
jasonzoladz/yesod-auth-account-fork
tests/BasicTests.hs
mit
2,731
0
14
993
472
183
289
68
1
module Spacer where import Data.Foldable (maximum) import Data.List (transpose) import Rainbow --[ -- [0, 0, 0, 0, 0], [0, 0, 0, 0, 0] -- [1, 2, 6, 2, 1], [0, 0, 0, 0, 0] -- [3, 4, 8, 3, 7] [0, 0, 0, 0, 0h] --] -- -- fill :: Int -> a -> [a] fill n a = take n $ repeat a space...
nlim/portfolio-quote
src/Spacer.hs
mit
1,881
0
14
482
748
411
337
46
1
{-# htermination (ceilingRatio :: Ratio MyInt -> MyInt) #-} import qualified Prelude data MyBool = MyTrue | MyFalse data List a = Cons a (List a) | Nil data Tup2 a b = Tup2 a b ; data Integer = Integer MyInt ; data MyInt = Pos Nat | Neg Nat ; data Nat = Succ Nat | Zero ; data Ordering = LT | EQ | GT ; da...
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/ceiling_1.hs
mit
6,131
0
11
1,229
2,890
1,505
1,385
140
1
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module Betfair.APING.Types.RunnerStatus ( RunnerStatus(..) ) where import Data.Aeson.TH ...
joe9/betfair-api
src/Betfair/APING/Types/RunnerStatus.hs
mit
695
0
9
159
124
77
47
21
0
module Main where import Data.Map.Strict(Map) import qualified Data.Map.Strict as M import Data.Maybe(fromJust) import Data.Tree(flatten, unfoldTree) import Diagrams.Backend.SVG.CmdLine(defaultMain) import Diagrams.Prelude main = defaultMain $ pad 1.1 $ renderTree buildTree renderTree = mconcat . flatten . fmap ...
bobgru/tree-derivations
src/LSystem2.hs
mit
2,460
0
10
658
849
469
380
55
2
module Control.AutoUpdate ( mkAutoUpdate ) where import Control.Monad import Control.Concurrent (forkIO) import Control.Concurrent.MVar (newEmptyMVar, putMVar, readMVar, takeMVar, tryPutMVar, tryTakeMVar) import Control...
arianvp/ghcjs-auto-update
Control/AutoUpdate.hs
mit
1,496
0
23
464
376
188
188
35
2
module HTMLTokenizer.MonadPlus where import HTMLTokenizer.Prelude hiding (foldl, foldl1, concat) {-# INLINE foldl #-} foldl :: MonadPlus m => (a -> b -> a) -> a -> m b -> m a foldl step start fetch = loop start where loop !state = mplus (do !element <- fetch loop (step state...
nikita-volkov/html-tokenizer
library/HTMLTokenizer/MonadPlus.hs
mit
967
0
13
293
380
187
193
36
1
module SolutionTree where import System.IO import Board {- > Big TODO: > - Generate all move permutations > - Work from the bottom up (with solutions that provide one marble left) > - Create a set of solutions > - Solve puzzle -} data Tree = Root { board :: Board, branches :: [Tree] } | Node...
crockeo/ballgame
src/SolutionTree.hs
mit
1,375
0
12
324
466
250
216
27
1
{-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE ViewPatterns #-} module GLM.Dot where import GLM.Parser import qualified GLM.Nesting as N import Data.Maybe import System.Environment import System.Exit import System.IO import Data.Digest.Pure.MD5 import Data.List import Data.String.Interpolate import qualified Data.ByteSt...
sordina/GLM
src/GLM/Dot.hs
mit
2,923
0
11
676
1,153
620
533
-1
-1
import Huffman import Data.Char import System.Environment import System.IO import System.IO.Error import Data.List import Data.List.Split import qualified Data.Binary.Put as P import qualified Data.Binary.Get as G import qualified Data.ByteString.Lazy as L import qualified Data.ByteString.Internal as I getReg = do ...
AndressaUmetsu/PapaEhPop
huffman/expand.hs
mit
2,985
1
14
692
1,037
535
502
70
4
module Hasql.Pool ( Pool, Settings(..), acquire, release, UsageError(..), use, ) where import Hasql.Pool.Prelude import qualified Hasql.Connection import qualified Hasql.Session import qualified Data.Pool as ResourcePool import qualified Hasql.Pool.ResourcePool as ResourcePool -- | -- A pool of connectio...
nikita-volkov/hasql-pool
library/Hasql/Pool.hs
mit
1,888
0
14
333
408
239
169
41
1
----------------------------------------------------------- ---- | ---- Module: Anagram ---- Description: Find anagrams ---- Copyright: (c) 2015 Alex Dzyoba <alex.dzyoba@gmail.com> ---- License: MIT ------------------------------------------------------------- module Anagram where import Data.List (sort) import qualif...
dzeban/haskell-exercism
anagram/haskell/anagram/Anagram.hs
mit
673
0
10
108
162
89
73
10
1
{-# LANGUAGE TypeOperators #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# OPTIONS_GHC -fn...
schell/caltrops
src/Web/User.hs
mit
4,277
0
13
1,035
1,112
583
529
104
2
{-#LANGUAGE ScopedTypeVariables #-} {-#LANGUAGE DeriveGeneric #-} {-#LANGUAGE DataKinds #-} {-#LANGUAGE GADTs #-} module Foreign.Storable.Generic.InternalSpec where -- Test tools import Test.Hspec import Test.QuickCheck import GenericType -- Tested modules import Foreign.Storable.Gener...
mkloczko/derive-storable
test/Spec/Foreign/Storable/Generic/InternalSpec.hs
mit
7,448
0
25
2,924
1,805
897
908
105
1
module TypeLinking where import Debug.Trace import Data.Maybe import Data.List import Environment import TypeDatabase import AST import TypeChecking typeLinkingFailure :: String -> [Type] typeLinkingFailure msg = error msg --typeLinkingFailure msg = [] typeLinkingFailure' :: String -> [Symbol] typeLinkingFailure' ms...
yangsiwei880813/CS644
src/TypeLinking.hs
gpl-2.0
31,614
0
24
11,696
9,230
4,732
4,498
371
50
-- Copyright (C) 2014-2016 Sebastian Wiesner <swiesner@lunaryorn.com> -- Copyright (C) 2016 Danny Navarro -- Copyright (C) 2015 Mark Karpov <markkarpov@opmbx.org> -- Copyright (C) 2015 Michael Alan Dorman <mdorman@ironicdesign.com> -- Copyright (C) 2014 Gracjan Polak <gracjanpolak@gmail.com> -- This file is not part o...
mrkkrp/flycheck-haskell
get-cabal-configuration.hs
gpl-3.0
11,782
0
14
2,571
2,237
1,230
1,007
225
3
module Data.Heap ( Heap, singleton, pop, fromList, toList ) where import Data.Monoid (Monoid(..),(<>)) data Heap p a = Empty | Heap p a (Heap p a) (Heap p a) instance (Ord p) => Monoid (Heap p a) where mempty = Empty mappend heap1@(Heap p1 a1 l1 r1) heap2@(Heap p2 a2 l2 r2) | p1 <= p2 = Heap p1 a1...
quickdudley/sokosolve
Data/Heap.hs
gpl-3.0
1,120
0
10
305
678
354
324
36
5
module Integration where -- https://stepic.org/lesson/%D0%9B%D0%BE%D0%BA%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5-%D1%81%D0%B2%D1%8F%D0%B7%D1%8B%D0%B2%D0%B0%D0%BD%D0%B8%D1%8F-%D0%B8-%D0%BF%D1%80%D0%B0%D0%B2%D0%B8%D0%BB%D0%B0-%D0%BE%D1%82%D1%81%D1%82%D1%83%D0%BF%D0%BE%D0%B2-8414/step/9?unit=1553 integration :: (Double -> D...
devtype-blogspot-com/Haskell-Examples
Integration/Integration.hs
gpl-3.0
637
0
14
160
227
115
112
11
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE StandaloneDeriving #-} -- Tests.hs -- Copyright 2015 Remy E. Goldschmidt <taktoa@gmail.com> -- This file is part of wai-middleware-preprocessor. -- wai-middleware-preprocessor is free software: you can redistribute it and/or modify...
taktoa/wai-middleware-preprocessor
test/Network/Wai/Middleware/Preprocessor/Tests.hs
gpl-3.0
1,173
0
6
219
65
47
18
9
1
{-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE NoMonoPatBinds #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE DataKinds #-} ----------------------------------------------------------------------------- -- | -- Module : H...
wavewave/hoodle-core
src/Hoodle/Type/PageArrangement.hs
gpl-3.0
9,861
0
15
3,126
2,795
1,527
1,268
164
4
{- GPLV3.0 or later copyright brmlab.cz contact timothyhobbs@seznam.cz Also copyright cheater http://cheater.posterous.com/haskell-curses Copyright 2012. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundat...
timthelion/vty-menu
Graphics/Vty/Menu.hs
gpl-3.0
4,975
0
15
1,085
1,220
628
592
85
12
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-apps-tasks/gen/Network/Google/Resource/Tasks/TaskLists/Update.hs
mpl-2.0
3,131
0
15
746
390
234
156
63
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-firestore/gen/Network/Google/Resource/FireStore/Projects/Databases/Documents/List.hs
mpl-2.0
8,816
0
23
2,072
1,395
804
591
188
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-logging/gen/Network/Google/Resource/Logging/Organizations/Sinks/Delete.hs
mpl-2.0
5,879
0
17
1,351
860
503
357
121
1
{-# LANGUAGE CPP #-} -- | -- Module : GHC.Vacuum.ClosureType -- Copyright : (c) Matt Morrow 2009, Austin Seipp 2011-2012 -- License : LGPLv3 -- -- Maintainer : mad.one@gmail.com -- Stability : experimental -- Portability : non-portable (GHC only) -- -- This module exports the different kind of closure t...
thoughtpolice/vacuum
src/GHC/Vacuum/ClosureType.hs
lgpl-3.0
2,030
0
6
360
309
176
133
-1
-1
module Affection.MessageBus.Message.Class where -- | Typeclass definition for messages class Message msg where -- | return the time when the message was sent msgTime :: msg -> Double
nek0/affection
src/Affection/MessageBus/Message/Class.hs
lgpl-3.0
188
0
7
33
28
17
11
3
0
------------------------------------------------- -- | -- Module : Crypto.Noise -- Maintainer : John Galt <jgalt@centromere.net> -- Stability : experimental -- Portability : POSIX -- -- Please see the README for usage information. module Crypto.Noise ( -- * Types NoiseState , NoiseResult(..) , Handsha...
centromere/cacophony
src/Crypto/Noise.hs
unlicense
7,537
0
10
1,692
1,261
707
554
-1
-1
{-# LANGUAGE UnicodeSyntax #-} import Data.Ratio import Control.Monad import Data.List ((\\), intersect) import Debug.Trace (traceShow) type Rational = (Int, Int) -- Cancel how an inexperienced mathematician would cancel inexperiencedCancel :: Int -> Int -> Ratio Int inexperiencedCancel a b = let astr = show a ...
ulikoehler/ProjectEuler
Euler33.hs
apache-2.0
1,623
0
15
427
475
250
225
34
1
{-# LANGUAGE ScopedTypeVariables #-} module SetOfTests where import Control.Monad (liftM2) import Test.QuickCheck hiding (elements) import BRC.SetOf import BRC.Size runAll :: forall e . forall s . (Show e, Show s, Eq e, SetOf e s) => Gen e -> Gen s -> IO () runAll ge gs = mapM_ quickCheck [allE (\x -> elements ((...
kcharter/brc-solver
tests/SetOfTests.hs
bsd-2-clause
4,050
0
14
1,039
1,410
760
650
82
1
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE OverloadedStrings #-} module Handler.Update where import Control.Applicative import Data.Aeson import qualified Data.Text as T import Filesystem.Path import Filesystem.Path.CurrentOS (fromText, toText, encodeString) import ...
erochest/NeatlineUpdate
Handler/Update.hs
bsd-2-clause
1,853
0
12
591
468
256
212
-1
-1
{-# Language FlexibleInstances, RankNTypes, RecordWildCards, TemplateHaskell #-} module Test.Ambiguous where import Control.Applicative ((<|>), empty, liftA2) import Data.Foldable (fold) import Data.Semigroup ((<>)) import qualified Rank2.TH import Text.Grampa import Text.Grampa.Combinators import Text.Grampa.Context...
blamario/grampa
grammatical-parsers/test/Test/Ambiguous.hs
bsd-2-clause
944
0
21
233
306
167
139
24
1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE ViewPatterns #-} -- | All data types. module Stack.Build.Types ...
hesselink/stack
src/Stack/Build/Types.hs
bsd-3-clause
20,984
0
19
6,472
3,961
2,166
1,795
462
7
module Web.RTBBidder.Types ( Banner(..) , Imp(..) , Request(..) , Bid(..) , SeatBid(..) , Response(..) , Bidder , RTBProtocol(..) ) where import qualified Network.Wai as WAI import Web.RTBBidder.Types.Request (Request(..)) import Web.RTBBidder.Types.Request.Imp (Imp(..)) import Web.RTBBidder.Types.Re...
hiratara/hs-rtb-bidder
src/Web/RTBBidder/Types.hs
bsd-3-clause
689
0
12
98
229
151
78
20
0
module TopOrLocal where topLevelFunction :: Integer -> Integer topLevelFunction x = x + woot + topLevelValue where woot :: Integer woot = 10 topLevelValue :: Integer topLevelValue = 5 area d = pi * (r * r) where r = d / 2 thirdLetter :: String -> Char thirdLetter x = x !! 2 letterIndex :: Int -> Char...
renevp/hello-haskell
src/topOrLocal.hs
bsd-3-clause
376
0
7
92
130
71
59
14
1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP, ForeignFunctionInterface #-} import Control.Concurrent (forkIO, threadWaitRead, threadWaitWrite) import Control.Monad (when, forever, liftM) import qualified Data.ByteString as B import Data.ByteString.Char8 (ByteString, pack) import Data.ByteString.Internal (toForeignPt...
AndreasVoellmy/SimpleServer
SimpleServerByteString2.hs
bsd-3-clause
2,769
0
14
606
617
329
288
62
2
-- 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. module Duckling.Distance.CA.Tests ( tests ) where import Data.String import Prelude import Test.Tasty import ...
facebookincubator/duckling
tests/Duckling/Distance/CA/Tests.hs
bsd-3-clause
507
0
9
78
79
50
29
11
1
module Calc ( eval, evalStr, lit, add, mul, MinMax (MinMax), Mod7 (Mod7), testInteger, testBool, testMM, testSat ) where import ExprT import Parser -- Exercise 1 eval :: ExprT -> Integer eval (Lit n) = n eval (Add x y) = (eval x) + (eval y) eval (Mu...
wangwangwar/cis194
src/ch5/Calc.hs
bsd-3-clause
1,484
0
9
454
611
327
284
56
1
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} -- Determine which packages are already installed module Stack.Build.Installed ( InstalledMap , Installed (..) , GetI...
rrnewton/stack
src/Stack/Build/Installed.hs
bsd-3-clause
9,835
9
20
2,971
1,804
982
822
174
8
-- File created: 2009-07-20 13:30:25 module Haschoo.Evaluator.Standard.IO (procedures) where import Control.Arrow ((&&&)) import Control.Exception (bracket) import Control.Monad (liftM2) import Data.Array.IArray (elems) import Data.Array.MArray (getElems) import System.IO ( Handle, IOMode(..), stdin, ...
Deewiant/haschoo
Haschoo/Evaluator/Standard/IO.hs
bsd-3-clause
7,960
0
16
2,116
2,646
1,363
1,283
148
4
{- | Module : Main Description : Saeplog web server Copyright : (c) Sebastian Witte License : BSD3 Maintainer : woozletoff@gmail.com Stability : experimental -} module Main where import System.Exit import System.IO import Web.RBB (rbb) main :: IO () main = rbb $ do mapM_ (hPutStrLn stder...
saep/repo-based-blog
executable/Main.hs
bsd-3-clause
855
0
10
260
94
55
39
19
1
-- 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/NB.hs
bsd-3-clause
1,282
0
7
186
330
191
139
27
1
-- 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. module Duckling.Ti...
rfranek/duckling
tests/Duckling/Time/VI/Tests.hs
bsd-3-clause
590
0
9
95
80
51
29
11
1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} -- | Utilities for syntactic processing of URLs. module Network.SPDY.Url where import Data.String (IsString) import Network (HostName) import Network.Socket (PortNumber) -- | A web origin, as defined in RFC 6454. data Origin = Origin { originScheme :: Scheme ...
kcharter/spdy-base
src/Network/SPDY/Url.hs
bsd-3-clause
678
0
8
152
159
94
65
12
1
{-# LANGUAGE DeriveDataTypeable, OverloadedStrings, FlexibleInstances #-} {-# LANGUAGE ViewPatterns, TupleSections #-} -- | -- Copyright : 2012 Eric Kow (Computational Linguistics Ltd.) -- License : BSD3 -- Maintainer : eric.kow@gmail.com -- Stability : experimental -- Portability : portable -- -- Discourse hi...
kowey/antfarm
NLP/Antfarm/History.hs
bsd-3-clause
12,781
0
15
3,094
2,044
1,137
907
129
5
module Main where import Data.Maybe import Data.List import qualified Data.ByteString.Lazy.Char8 as B import System.Environment import System.Exit import System.Process import System.IO import Lib import Opts import Check produceAST :: [Flag] -> IO () produceAST flags = do pipeBinary lang $ compileToJSON pat ...
forestbelton/revm
app/Main.hs
bsd-3-clause
1,063
0
13
238
362
184
178
31
2
{-# LANGUAGe BangPatterns #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGe TemplateHaskell #-} module Mandelbrot.NikolaV4 (mandelbrotImageGenerator) where import Data.IORef import Data.Int import Data.Word import Data.Array.Nikola.Backend.CUDA.TH import Data.Array.Repa import Data.Array.Repa.Eval import Data.Ar...
mainland/nikola
examples/mandelbrot/Mandelbrot/NikolaV4.hs
bsd-3-clause
3,685
0
15
1,159
994
520
474
102
2
module Test.WVar where import qualified Test.Hspec as HS import qualified Test.QuickCheck as Q import qualified Control.Concurrent.WVar as WV import qualified Control.Monad as M withLatestCache :: (IO (v, v, WV.WVar v, WV.WCached v) -> r) -> IO (v, WV.WVar v) -> r withLatestCache f prepare = f prepare' ...
asakamirai/kazura-queue
test/Test/WVar.hs
bsd-3-clause
1,902
0
12
519
723
367
356
48
1
{-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE ImpredicativeTypes #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE TypeFamilies #-} module Snap.Snaplet.HTTPAuth.Types.IAuthDataSource ( IAut...
anchor/snaplet-httpauth
lib/Snap/Snaplet/HTTPAuth/Types/IAuthDataSource.hs
bsd-3-clause
1,807
0
13
334
220
137
83
24
1
{-# LANGUAGE OverloadedStrings #-} {-| Module : Foreign.Lua.Userdata Copyright : © 2007–2012 Gracjan Polak, 2012–2016 Ömer Sinan Ağacan, 2017-2019 Albert Krewinkel License : MIT Maintainer : Albert Krewinkel <tarleb+hslua@zeitkraut.de> Stability : beta Portability : non-p...
osa1/hslua
src/Foreign/Lua/Userdata.hs
mit
5,158
0
13
1,218
835
435
400
70
2
-- -- -- ----------------- -- Exercise 7.19. ----------------- -- -- -- module E'7'19 where import Prelude import qualified Prelude ( (<) , (>) ) type IntegerPair = (Integer, Integer) iSort''' :: [IntegerPair] -> [IntegerPair] iSort''' [] = [] iSort''' ( integerPair : remainingIntegerPairs ) = ins''' integ...
pascal-knodel/haskell-craft
_/links/E'7'19.hs
mit
1,537
0
10
401
313
182
131
22
2
{-# LANGUAGE TemplateHaskell, ForeignFunctionInterface #-} module Graphics.Wayland.Internal.SpliceClientTypes where import Data.Functor import Language.Haskell.TH import Foreign.C.Types import Graphics.Wayland.Scanner.Protocol import Graphics.Wayland.Scanner $(runIO readProtocol >>= generateClientTypes)
abooij/haskell-wayland
Graphics/Wayland/Internal/SpliceClientTypes.hs
mit
309
0
8
26
53
33
20
8
0
module Distribution.Client.Dependency.Modular.Solver where import Data.Map as M import Distribution.Client.Dependency.Types import Distribution.Client.Dependency.Modular.Assignment import Distribution.Client.Dependency.Modular.Builder import Distribution.Client.Dependency.Modular.Dependency import Distribution.Clien...
jwiegley/ghc-release
libraries/Cabal/cabal-install/Distribution/Client/Dependency/Modular/Solver.hs
gpl-3.0
2,454
0
12
612
404
244
160
45
3
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-rds/gen/Network/AWS/RDS/DescribeDBLogFiles.hs
mpl-2.0
7,501
0
12
1,662
1,013
601
412
107
1
{-# LANGUAGE CPP, DeriveDataTypeable #-} module ETA.HsSyn.HsDoc ( HsDocString(..), LHsDocString, ppr_mbDoc ) where #include "HsVersions.h" import ETA.Utils.Outputable import ETA.BasicTypes.SrcLoc import ETA.Utils.FastString import Data.Data newtype HsDocString = HsDocString FastString deriving (Eq, Show,...
alexander-at-github/eta
compiler/ETA/HsSyn/HsDoc.hs
bsd-3-clause
553
0
8
88
145
82
63
17
1
-- -- Copyright (c) 2012 Citrix Systems, Inc. -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- -- This progra...
jean-edouard/manager
xenmgr/Vm/DmTypes.hs
gpl-2.0
5,594
0
9
1,707
1,092
648
444
130
2
{-# LANGUAGE CPP, ScopedTypeVariables, MagicHash, UnboxedTuples #-} ----------------------------------------------------------------------------- -- -- GHC Interactive support for inspecting arbitrary closures at runtime -- -- Pepe Iborra (supported by Google SoC) 2006 -- ----------------------------------------------...
frantisekfarka/ghc-dsi
compiler/ghci/RtClosureInspect.hs
bsd-3-clause
52,711
29
27
16,099
12,166
6,188
5,978
-1
-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="bs-BA"> <title>Regular Expression Tester</title> <maps> <homeID>regextester</homeID> <m...
thc202/zap-extensions
addOns/regextester/src/main/javahelp/help_bs_BA/helpset_bs_BA.hs
apache-2.0
978
77
66
157
409
207
202
-1
-1
module PropSyntaxUtil(module HsConstants,module PropSyntaxUtil) where import HsConstants import PropSyntax(hsTyCon,HsType) -- Built-in type constructors/names unit_tycon = hsTyCon unit_tycon_name :: HsType fun_tycon = hsTyCon fun_tycon_name :: HsType list_tycon = hsTyCon list_tycon_name :...
forste/haReFork
tools/property/syntax/PropSyntaxUtil.hs
bsd-3-clause
390
0
6
77
80
47
33
7
1
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances, FlexibleContexts, UndecidableInstances #-} -- Example of improvement, due to George Russel module Folders where data Folder = Folder newtype SB x = SB x newtype SS x = SS x data NodeArcsHidden = NodeArcsHidden class HasS...
ryantm/ghc
testsuite/tests/typecheck/should_compile/tc181.hs
bsd-3-clause
1,219
2
12
280
327
173
154
23
1
module Compose where -- (.) :: (b -> c) -> (a -> b) -> a -> c -- Compose :: (* -> *) -> (* -> *) -> * -> * newtype Compose f g a = Compose { getCompose :: f (g a) } deriving (Eq, Show) -- (fmap . fmap) (+1) (Compose [Just (Compose $ Just [1])]) instance (Functor f, Functor g) => Functor (Compose f g) where fmap...
JoshuaGross/haskell-learning-log
Code/Haskellbook/ComposeTypes/src/Compose.hs
mit
592
0
9
134
194
107
87
7
0
{-# LANGUAGE OverloadedStrings #-} {-| Module : Network.Wai.Twilio.RequestValidatorMiddleware Description : A wai middleware for validating incoming Twilio requests Copyright : (c) 2015 Steve Kollmansberger Maintainer : steve@kolls.net Stability : experimental See https://www.twilio.com/docs/security for det...
steven777400/TwilioIVR
src/Network/Wai/Twilio/RequestValidatorMiddleware.hs
mit
3,916
0
16
861
899
477
422
66
3
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE OverloadedStrings #-} module Network.Sendgrid.Api ( Authentication(..) , EmailMessage(..) , MailSuccess(..) , makeRequest , getRequest , postRequest , sendE...
owainlewis/sendgrid-hs
src/Network/Sendgrid/Api.hs
mit
5,150
0
29
1,539
1,517
842
675
149
2
-- By listing the first six prime numbers: -- -- 2, 3, 5, 7, 11, 13 -- -- we can see that the 6th prime is 13. -- -- What is the 10 001st prime number? import Numbers result = head $ drop 9999 $ primes [3, 5 ..] main = do putStrLn $ show result
carletes/project-euler
problem-7.hs
mit
253
0
8
64
52
30
22
4
1
module Text.Marquee.SyntaxTrees.AST where import Data.Text (Text(), append, empty) import qualified Data.Map as M import Data.Text.Marquee import Text.Marquee.SyntaxTrees.CST as C type Markdown = [MarkdownElement] data MarkdownElement = BlankLine | ThematicBreak | He...
DanielRS/marquee
src/Text/Marquee/SyntaxTrees/AST.hs
mit
3,446
0
9
1,172
898
501
397
79
2
module Jan24 where import Test.QuickCheck {-- EXTRA LIST COMPREHENSION ------------------------ note that i connects and continues in the second list generator. [ (i,j) | i <- [1..3], j <-[i..3]] = [(i,j) | j <- [1..3]] ++ [(2,j) | j <- [2..3]] ++ [(3,j) | j <- [3..3]] ++ = [(1,1),(1,2),(1,3)] ++ [(2,2),...
HaskellForCats/HaskellForCats
30MinHaskell/z_notes/3_b_quickCheckt.hs
mit
2,772
0
7
530
95
52
43
6
1
-- Your Ride Is Here -- http://www.codewars.com/kata/55491e9e50f2fc92f3000074/ module Codewars.Kata.Ride where import Codewars.Kata.Ride.Types import Data.Char (ord) ride :: String -> String -> Ride ride a b = if f a == f b then Go else Stay where f = (`mod` 47) . product . map (\c -> ord c - ord 'A' + 1)
gafiatulin/codewars
src/6 kyu/Ride.hs
mit
314
0
13
61
113
64
49
6
2
module Problem52 where {-- Task description: It can be seen that the number, 125874, and its double, 251748, contain exactly the same digits, but in a different order. Find the smallest positive integer, x, such that 2x, 3x, 4x, 5x, and 6x, contain the same digits. --} import Data.List (sort) sameDigits x y =...
runjak/projectEuler
src/Problem52.hs
mit
593
0
8
124
179
96
83
10
1
{-# LANGUAGE DeriveGeneric, NoMonomorphismRestriction #-} module HsSearch.SearchOptions ( SearchOption(..) , getSearchOptions , getUsage , settingsFromArgs) where import qualified Data.ByteString.Lazy.Char8 as BC import Data.Char (toLower) import Data.Either (isLeft, lefts, rights) import Data.List (isPrefix...
clarkcb/xsearch
haskell/hssearch/src/HsSearch/SearchOptions.hs
mit
11,724
0
18
3,164
3,773
2,125
1,648
203
11
{-# LANGUAGE DataKinds #-} import Control.Monad.Trans import Options.Declarative greet :: Flag "g" '["greet"] "STRING" "greeting message" (Def "Hello" String) -> Flag "" '["decolate"] "" "decolate message" Bool -> Arg "NAME" String -> Cmd "Greeting command" () greet msg deco name...
tanakh/optparse-declarative
example/subcmd.hs
mit
1,276
0
13
342
459
223
236
30
1