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 PatternGuards, ScopedTypeVariables, RecordWildCards, ViewPatterns #-} -- | Check the input/output pairs in the tests/ directory module Test.InputOutput(testInputOutput) where import Control.Applicative import Data.Tuple.Extra import Control.Exception import Control.Monad import Data.List.Extra import Dat...
bitemyapp/hlint
src/Test/InputOutput.hs
bsd-3-clause
4,054
0
21
1,045
1,587
828
759
84
8
{-# LANGUAGE TemplateHaskell, TypeFamilyDependencies, PolyKinds #-} module T8884 where import Language.Haskell.TH import System.IO type family Foo a = r | r -> a where Foo x = x type family Baz (a :: k) = (r :: k) | r -> a type instance Baz x = x $( do FamilyI foo@(ClosedTypeFamilyD (TypeFamilyHead _ tvbs1 res1 ...
sdiehl/ghc
testsuite/tests/th/T8884.hs
bsd-3-clause
1,107
0
19
313
408
210
198
23
0
import TiProgram(tcProgramFiles) import PropParser(parse) import PropSyntax(hsModName) import ReAssocProp() --import ReAssoc --import PrettyPrint import TiPropDecorate() import ReAssocProp() import ScopeNamesProp() import NameMapsProp() import Prop2Alfa import Hs2Alfa(modPath) import FileConv(printModule) import System...
forste/haReFork
tools/hs2alfa/tstProp2Alfa.hs
bsd-3-clause
1,002
6
12
197
280
158
122
30
1
module Ch6 ( (^!), myand, myconcat, myreplicate2, (!!!), myelem, merge, msort, mysum, mytake, mylast, ) where -- 1. (^!) :: Int -> Int -> Int m ^! 0 = 1 m ^! n= m * (m ^! (n-1)) -- 2. {- length [1, 2, 3] = 1 + (length [2, 3]) = 1 + (1 + (length [3])) = 1 + (1 + (1 + length [])) = 1 + (1 + (1 + 0)) ...
nozaq/programming-in-haskell
src/Ch6.hs
mit
1,653
0
9
506
836
448
388
48
1
{-# LANGUAGE NoStarIsType #-} {-# LANGUAGE TypeFamilies, KindSignatures, DataKinds, TypeOperators #-} {-# LANGUAGE ScopedTypeVariables, FlexibleContexts #-} {-# LANGUAGE TypeApplications, PartialTypeSignatures #-} {-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE ConstraintKi...
nshepperd/funn
cldiff.hs
mit
12,290
1
31
3,958
4,402
2,242
2,160
262
5
module Main ( ) where
lhoghu/yahoo-portfolio-manager
ypm-server/Main.hs
mit
35
0
3
18
7
5
2
2
0
import Data.List import Data.Char count :: (Eq a) => a -> [a] -> Int count n = length . filter (== n) multiUnion :: (Eq a) => [a] -> [a] -> [a] multiUnion xs ys = concat [(replicate (count x elements) x) | x <- nub elements] where elements = xs ++ ys multiIntersection :: (Eq a) => [a] -> [a] -> [a] multiIntersec...
stoimenoff/functional-programming
exercises/ex14.hs
mit
2,174
0
14
492
1,230
642
588
55
1
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} module CommandArgs ( HDevTools(..) , loadHDevTools ) where import qualified Config import System.Console.CmdArgs.Implicit import System.Environment (getProgName) import System.Info ...
bennofs/hdevtools
src/CommandArgs.hs
mit
5,149
0
11
1,768
1,309
732
577
141
1
{-# OPTIONS #-} ----------------------------------------------------------------------------- -- | -- Module : Language.Python.Pyn.Lexer -- Copyright : (c) 2016 Savor d'Isavano -- License : MIT -- Maintainer : anohigisavay@gmail.com -- Stability : experimental -- Portability : ghc -- -- Lexical analysis ...
TOSPIO/pyn
lib/Language/Python/Pyn/Lexer.hs
mit
2,199
0
14
431
358
207
151
33
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Pianola ( Selector(..), missing, winnow, context, collect, liftQ, Pianola(..), Delay, peek, peekMaybe, retryP...
danidiaz/pianola
src/Pianola.hs
mit
6,628
0
18
1,844
2,698
1,342
1,356
155
2
{-# LANGUAGE PatternSynonyms #-} -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module JSDOM.Generated.DeviceProximityEvent (newDeviceProximityEvent, getValue, getMin, getMax, DeviceProximityEvent(..), gTypeD...
ghcjs/jsaddle-dom
src/JSDOM/Generated/DeviceProximityEvent.hs
mit
2,325
0
10
322
532
321
211
33
1
module Unison.Runtime.SharedResourceMap where import Control.Concurrent.MVar import Control.Exception (finally) import Data.Hashable (Hashable) import Prelude hiding (lookup) import qualified Unison.Runtime.ExpiringMap as M -- import System.IO (stderr, hPutStrLn) debug :: String -> IO () debug _ = pure ()-- hPutStrLn...
nightscape/platform
node/src/Unison/Runtime/SharedResourceMap.hs
mit
1,440
0
23
366
526
259
267
34
3
{-# LANGUAGE OverloadedStrings #-} module Web.Twitter ( search , tweet ) where import System.Process -- This is just a wraper around a command line call to the python program python/twitter.hs -- It is made into it's own module as a promise that I'll replace the python with a proper haskell -...
aBathologist/borgmanities
src/Web/Twitter.hs
mit
717
0
9
173
146
80
66
13
2
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} module Haste.WebAudio.Internal where import Haste.Foreign -- | Web Audio context newtype Ctx = Ctx JSAny deriving (ToAny, FromAny) -- | Web Audio is a monad newtype WebAudio a = WebAudio { unWA :: Ctx -> IO a } jsAudioContext ...
akru/haste-webaudio
src/Haste/WebAudio/Internal.hs
mit
3,555
0
9
460
770
398
372
67
1
-- @Author: Zeyuan Shang -- @Date: 2016-07-23 15:33:02 -- @Last Modified by: Zeyuan Shang -- @Last Modified time: 2016-07-23 16:47:59 import Data.List data Graph a = Graph [a] [(a, a)] deriving (Show, Eq) k4 = Graph ['a', 'b', 'c', 'd'] [('a', 'b'), ('b', 'c'), ('c', 'd'), ('d', 'a'), ('a', 'c'), ('b', 'd...
zeyuanxy/haskell-playground
ninety-nine-haskell-problems/vol9/83.hs
mit
1,586
50
17
471
820
441
379
26
1
{-# LANGUAGE TemplateHaskell #-} module Render.Core.Manager ( newRenderManager , newTriangleRenderer , TriangleRenderer , FontRenderer , Triangle(..) , newFontRenderer , renderText , RenderManager , mkTextureUnit ) where import Debug.Trace import Graphics.Ren...
mfpi/halo
src/Render/Core/Manager.hs
mit
11,542
0
20
2,577
2,873
1,490
1,383
-1
-1
module Examples where import Interaction readWrite :: Interact () () readWrite = readin `sq` writeout id copy :: Interact () () copy = readin `sq` writeout id `sq` copy test1 :: IO () test1 = run readWrite () test2 :: IO () test2 = runL readWrite () readInt :: String -> Int readInt = read getInt :: Inter...
simonjohnthompson/Interaction
Examples.hs
mit
2,056
0
15
712
662
366
296
55
1
module Main where import Tictactoe.Att.Base import Tictactoe.Def.Base main :: IO () main = do putStrLn "Game name: " name <- getLine putStrLn "Game mode: (D | A)?" mode <- getLine case mode of "D" -> playDefender name "A" -> playAttacker name _ -> putStrLn "Game mode is u...
viktorasl/tictactoe-bot
src/Main.hs
mit
328
0
10
96
91
44
47
13
3
module Compose where oddsFrom :: Integer -> [Integer] oddsFrom = take 5 . filter odd . enumFrom negateSum :: Num a => [a] -> a negateSum = negate . sum mySum :: Num a => [a] -> a mySum = foldl (+) 0 ay :: [Char] -> Int ay = length . filter (== 'a')
andrewMacmurray/haskell-book-solutions
src/ch7/compose.hs
mit
253
0
7
59
122
67
55
9
1
{-# LANGUAGE OverloadedStrings #-} module GitHub where import Import import Data.Aeson ((.:)) import Data.Aeson.Types (parseMaybe) import Data.ByteString.Lazy (ByteString) import Data.Maybe (fromJust) import Data.Time.Clock (getCurrentTime) import Data.Time.Format (formatTime) import Network.HTTP.Types.Method (Method...
puffnfresh/licentious
GitHub.hs
mit
5,186
0
21
1,398
1,420
744
676
84
3
-- -------------------------------------------------------------------------- -- $Revision: 262 $ $Date: 2007-04-12 12:19:50 +0200 (Thu, 12 Apr 2007) $ -- -------------------------------------------------------------------------- -- | -- -- Module : PureFP.OrdMap -- Copyright : Peter Ljunglof 2002 -- License...
natetarrh/comp150
OrdMap.hs
mit
4,653
0
15
1,476
1,838
961
877
77
3
{-# LANGUAGE ImplicitParams #-} module GameObjectRender ( renderMonadius ) where import Data.Complex import Util import Data.Array ((!)) import GLWrapper import GameObject import GOConst import RenderUtil import qualified Render.VicViper as VicViper when b act = if b then act else return () renderScore' :: V...
keqh/Monadius_rewrite
Monadius/GameObjectRender.hs
gpl-2.0
11,652
1
22
2,679
5,776
3,062
2,714
219
31
{-# LANGUAGE MagicHash #-} {- | Module : ./atermlib/src/ATerm/AbstractSyntax.hs Description : the abstract syntax of shared ATerms and their lookup table Copyright : (c) Klaus Luettich, C. Maeder, Uni Bremen 2002-2006 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Sta...
gnn/Hets
atermlib/src/ATerm/AbstractSyntax.hs
gpl-2.0
4,364
0
16
1,000
1,520
792
728
109
8
module CTM where import Debug.Trace (trace) import Control.Monad import Text.Printf import GHC.Float import Data.List import Data.Map (fromList, findWithDefault, (!)) import Text.XML.Light import Codec.Picture import Codec.Picture.Types (createMutableImage, unsafeFreezeImage) -- colors = ["White", "Silver", "Gray", "...
specify/TreeMap
CTM.hs
gpl-2.0
6,288
48
15
2,116
1,942
1,073
869
99
4
{-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE FlexibleInstances #-} module Utils where import GHC.Generics import Servant.API import Data.List (intercalate) import Data.List.Split (splitOn) import qualified Data.Map as Map import qua...
massimo-zaniboni/netrobots
robot_examples/haskell-servant/rest_api/lib/Utils.hs
gpl-3.0
784
0
12
149
231
127
104
22
2
{- Copyright 2012 Dustin DeWeese This file is part of peg. peg is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. peg i...
HackerFoo/peg
Search.hs
gpl-3.0
5,457
0
15
1,723
1,937
980
957
112
3
module Input where import Life import Data.Char import qualified Data.Array.Repa as R import Data.Array.Repa (Z(..),(:.)(..),computeP,extent) -- Life 1.06 text format input -- Read cell coordinates parseLine :: String -> Maybe (Int,Int) parseLine cs | any isNotNum cs = Nothing | length (words cs) /= 2 =...
iurdan/haskell-life
src/Input.hs
gpl-3.0
822
0
17
210
348
185
163
19
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-tpu/gen/Network/Google/Resource/TPU/Projects/Locations/Nodes/Reimage.hs
mpl-2.0
5,225
0
16
1,177
778
454
324
114
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-ml/gen/Network/Google/Resource/Ml/Projects/Locations/Studies/Trials/Delete.hs
mpl-2.0
5,141
0
15
1,118
697
408
289
108
1
import Prelude hiding (mapM) import Data.Traversable import Data.List import Data.Maybe import Control.Concurrent.STM.Promise import Control.Concurrent.STM.Promise.Process import Control.Concurrent.STM.Promise.Tree import Control.Concurrent.STM.Promise.Workers import System.Environment {- | A tree for this file st...
danr/stm-promise
tptp/Test.hs
lgpl-3.0
2,683
0
12
590
651
353
298
42
1
module Data.Logic where class Logic a where and :: a -> a -> a or :: a -> a -> a not :: a -> a (∧) :: Logic a => a -> a -> a (∧) = Data.Logic.and (∨) :: Logic a => a -> a -> a (∨) = Data.Logic.or infixr 3 ∧ infixr 2 ∨
bflyblue/tag
Data/Logic.hs
unlicense
253
0
8
81
124
71
53
11
1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} module OrcBot.Types ( -- * Args Args(..) -- * Settings , Settings(..) , orcOrchestrateSession , orcIrcUri ...
erochest/orcbot
src/OrcBot/Types.hs
apache-2.0
1,676
1
10
535
395
230
165
43
1
-- http://www.codewars.com/kata/52de9bd621c71b919c000592 module HyperSphere where inSphere :: (Ord a, Num a) => [a] -> a -> Bool inSphere xs r = sum (map (^2) xs) <= r^2
Bodigrim/katas
src/haskell/6-Hyper-Sphere.hs
bsd-2-clause
170
0
10
27
69
38
31
3
1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} #include "version-compatibility-macros.h" -- | Definitions to write renderers based on looking at a 'SimpleDocStream' as -- an instruction tape for a stack machine: text is written, annotations are -- added (pushed) and later removed (popped). modu...
quchen/prettyprinter
prettyprinter/src/Prettyprinter/Render/Util/StackMachine.hs
bsd-2-clause
6,265
0
13
1,617
1,505
807
698
89
9
{-# LANGUAGE QuasiQuotes, TemplateHaskell, ViewPatterns, DoAndIfThenElse #-} ----------------------------------------------------------------------------- -- | -- Module : Language.Haskell.TH.Desugar -- Copyright : (c) 2012 Michael Sloan -- License : BSD-style (see the LICENSE file) -- Maintainer : Mich...
mgsloan/quasi-extras
src/Language/Quasi/Internal/Desugar.hs
bsd-3-clause
17,794
0
20
4,594
2,246
1,279
967
124
6
{-# LANGUAGE DeriveDataTypeable , FlexibleContexts , FlexibleInstances , GeneralizedNewtypeDeriving , ImpredicativeTypes , MultiParamTypeClasses , RankNTypes , ScopedTypeVariables , StandaloneDeriving , TemplateHaskell , TupleSections , TypeFamilies , UndecidableInstances #-} -------------...
mgsloan/toy-diagrams
src/Graphics/UI/Toy/Transformed.hs
bsd-3-clause
4,153
0
12
865
1,153
616
537
69
1
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE OverloadedStrings #-} -- | Main Hell executable. module Main where import Control.Exception import Data.ByteString (ByteString) import qualified Data.ByteString as S import qualified Data.ByteString.Char8 as S8 import Data.Data import ...
chrisdone/hell
app/Main.hs
bsd-3-clause
3,293
0
19
1,008
917
474
443
94
4
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE GADTs #-} module Day12 (run) where import Control.Applicative hiding (optional) import Control.Lens import Control.Monad import Data.Either import Data.List import Data.List.Split (splitOn) import Data.Map.Strict (Map, (!), insert, fromList) import Data.Maybe ...
ulyssesp/AoC
src/day12.hs
bsd-3-clause
2,986
0
17
681
1,152
603
549
-1
-1
import Data.Map (Map) import qualified Data.Map as Map import Parser import Rules trimEnd :: Rules -> Rules trimEnd = Map.map removeEnd . simplifyAll where removeEnd (T a) = Empty removeEnd (Star a) = Star $ removeEnd a removeEnd (Sum a b) = Sum (removeEnd a) (removeEnd b) removeEnd (Product ...
abbradar/comps
src/Lab2.hs
bsd-3-clause
649
4
12
162
279
136
143
19
5
{-# LANGUAGE OverloadedStrings #-} module JsonTypesSpec where import Test.Hspec import Data.Aeson (encode , decode ) import qualified Data.ByteString.Lazy.Char8 as BL import Data.Ratio import qualified Data.Text as T import ...
haroldcarr/juno
z-no-longer-used/test/JsonTypesSpec.hs
bsd-3-clause
8,313
0
15
2,245
1,364
763
601
144
1
module Main ( main ) where import Control.Monad (mapM_) import System.Environment (getArgs) import Language.Py.ParseError (ParseError(..)) import Language.Py.SrcLocation (SrcSpan(..), getSpan) import Language.Py.Parser (parseModule) import PyHint.Scanner (scanModule) import PyHint.Files (getPythonFiles, getFixedCo...
codeq/pyhint
src/PyHint/Main.hs
bsd-3-clause
1,378
0
15
241
504
256
248
31
4
{-# LANGUAGE GADTs #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} -- -- Copyright (c) 200...
emwap/feldspar-language
src/Feldspar/Core/Constructs/Mutable.hs
bsd-3-clause
6,895
0
19
1,722
1,759
888
871
111
1
module Main where import Perseus.Api import Control.Monad.IO.Class import Data.Text import Data.Time (UTCTime) import Network.Wai import Network.Wai.Handler.Warp import Servant server :: Server SampleApi server = read :<|> write where read metric = do value <- liftIO $ readFile (metricFilename metric) retu...
bergey/perseus
src/Perseus/Server.hs
bsd-3-clause
760
0
13
153
231
123
108
24
1
{-# LANGUAGE QuasiQuotes #-} import LiquidHaskell [lq| measure getfst :: (a, b) -> a getfst (x, y) = x |] [lq| type Pair a b = {v0 : ({v:a | v = (getfst v0)}, b) | true } |] [lq| type OPList a b = [(Pair a b)]<\h -> {v: (a, b) | (getfst v) >= (getfst h)}> |] [lq| type OList a = [a]<\h -> {v: a | (v >= ...
spinda/liquidhaskell
tests/gsoc15/unknown/pos/PairMeasure.hs
bsd-3-clause
447
0
8
137
80
49
31
9
1
{-| Utility functions shared by several modules of "Typechecker". -} module Typechecker.Util(TypecheckM ,whenM ,anyM ,allM ,unlessM ,concatMapM ,tcError ,pu...
parapluu/encore
src/types/Typechecker/Util.hs
bsd-3-clause
34,744
0
20
10,291
10,080
4,761
5,319
-1
-1
module Teem (mask ,fa ,gzip ,makeMask ,isNrrd ,center ,getB0Indices ,extractB0 ) where -- Script Deps -- center.py import qualified Data.Map as M import Development.Shake import Development.Shake.Command import Development.Shake.FilePath import ...
reckbo/ppl
pipeline-lib/Teem.hs
bsd-3-clause
2,298
0
18
659
786
425
361
65
2
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeOperators #-} module Main where import Prelude () import MyLittlePrelude import Control.Exception (finally) import Data.Acid (closeAcidState, openLocalState) import Data.IORe...
zudov/purescript-inspection
app/Main.hs
bsd-3-clause
2,272
0
11
660
471
263
208
51
1
import Text.Show.Pretty import Text.XML.HXT.Core import Text.XML.HXT.Curl import Web.Ohloh -- Insert your API Key here: apiKey = "" myQueryUrl = "http://www.ohloh.net/languages/haskell.xml?api_key=" ++ apiKey main = do res <- runX $ xunpickleDocument xpResponse [ withRemoveWS yes, withCurl [] ] $ myQueryUrl putS...
fthomas/ohloh-hs
tests/fetch-haskell.hs
bsd-3-clause
345
0
13
52
94
51
43
9
1
{-# OPTIONS_HADDOCK hide #-} module Control.Distributed.STM.DebugBase (debugStrLn0,debugStrLn1,debugStrLn2,debugStrLn3,debugStrLn4, debugStrLn5,debugStrLn6,debugStrLn7,debugStrLn8,debugStrLn9, gDebugLock, startGDebug, stopGDebug, gDebugStrLn, newDe...
proger/haskell-dstm
Control/Distributed/STM/DebugBase.hs
bsd-3-clause
6,065
0
14
2,549
1,546
759
787
147
2
{-# LANGUAGE LambdaCase #-} module Control.Monad.Trans.Error.Wrap ( WrappedError (..) , WrappedErrorT (..) , runWrappedErrorT , throwError , catchError , mapWrappedErrorT ) where import Control.Applicative import Control.Monad import Control.Monad.Fix import Control.Mon...
sonyandy/unify
src/Control/Monad/Trans/Error/Wrap.hs
bsd-3-clause
2,638
0
12
601
937
488
449
68
3
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE GADTs #-} -- | Make changes to project or global configuration. module Stack.ConfigCmd (ConfigCmdSet(..) ,configCmdSetPa...
martin-kolinek/stack
src/Stack/ConfigCmd.hs
bsd-3-clause
6,260
0
18
1,713
1,209
632
577
136
5
{-# LANGUAGE MultiWayIf #-} module Toy.SM.Interpreter ( execute ) where import Control.Lens (at, (%=), (+=), (.=), (<<%=), (?=)) import Control.Monad (forever, mzero, replicateM, replicateM_, void, when) import ...
Martoon-00/toy-compiler
src/Toy/SM/Interpreter.hs
bsd-3-clause
7,076
0
22
3,141
1,992
1,015
977
-1
-1
{-# OPTIONS_GHC -fno-warn-type-defaults #-} module Util.AccessFrequency ( getAverageReadsPerFile , calculateAverageReadsPerFile ) where import Data.List (foldl', sort) import qualified Data.Map.Strict as M import Request (FileID, FileRequest, RequestType (..), ...
wochinge/CacheSimulator
src/Util/AccessFrequency.hs
bsd-3-clause
1,510
0
11
314
370
205
165
31
1
{-# LANGUAGE JavaScriptFFI #-} module GHCJS.Three.HasGeoMat ( HasGeoMat(..) ) where import GHCJS.Types import GHCJS.Three.Monad import GHCJS.Three.Geometry import GHCJS.Three.Material foreign import javascript unsafe "($1)['geometry']" thr_geometry :: JSVal -> Three JSVal foreign import javascript unsafe...
manyoo/ghcjs-three
src/GHCJS/Three/HasGeoMat.hs
bsd-3-clause
1,151
23
6
242
310
166
144
24
0
module Lib ( someFunc ) where someFunc :: IO () someFunc = putStrLn "someFunc" data Orientation = Up | Down | Left | Right -- type Graphite a = Orientation -> Double -> Double -> a -> Html -- data Graphite a = Graphite -- { grOrientation :: Orientation -- , grX :: Double -- , grY :...
andrewthad/graphite
src/Lib.hs
bsd-3-clause
1,374
0
6
491
72
54
18
5
1
{-# LANGUAGE OverloadedStrings #-} module Lang.PrettyPrint where import System.Console.ANSI import Data.Text (Text) import qualified Data.Text as T import qualified Data.Text.IO as T data ColorScheme = ColorScheme { keywordColor :: Text , sortColor :: Text , namedColor :: Text , unnamedColor :: Text...
Alasdair/Mella
Lang/PrettyPrint.hs
bsd-3-clause
2,412
0
12
671
790
441
349
62
1
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module Ivory.Tower.AST.Signal where #if MIN_VERSION_mainland_pretty(0,6,0) import Text.PrettyPrint.Mainland.Class #endif import Text.PrettyPrint.Mainland import Ivory.Tower.Types.Time data Signal = Signal -- Note: Th...
GaloisInc/tower
tower/src/Ivory/Tower/AST/Signal.hs
bsd-3-clause
754
0
11
153
129
77
52
15
0
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE CPP #-} {-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE FlexibleContexts #...
MichielDerhaeg/stack
src/Stack/Types/Config.hs
bsd-3-clause
80,291
0
16
18,417
15,278
8,288
6,990
1,749
8
module Hint.Base ( MonadInterpreter(..), RunGhc, GhcError(..), InterpreterError(..), mayFail, catchIE, InterpreterSession, SessionData(..), GhcErrLogger, InterpreterState(..), fromState, onState, InterpreterConfiguration(..), ImportList(..), ModuleQualification(..), ModuleImport(..), runG...
mvdan/hint
src/Hint/Base.hs
bsd-3-clause
7,197
0
13
2,235
1,741
961
780
-1
-1
{-# OPTIONS -fno-warn-incomplete-patterns -optc-DNON_POSIX_SOURCE #-} {-# LANGUAGE ForeignFunctionInterface, NamedFieldPuns, PatternGuards #-} -- THIS IS A COPY OF THE GHC DRIVER PROGRAM -- The only modification is the insertion of the RunPhaseHook ---------------------------------------------------------------------...
a-ford/notghc
NotGHC.hs
bsd-3-clause
33,381
2
27
9,474
6,752
3,489
3,263
-1
-1
-- -- -- ------------------ -- Exercise 11.14. ------------------ -- -- -- module E'11'14 where -- uncurry :: (a -> b -> c) -> ( (a , b) -> c ) -- uncurry f (x , y) = f x y -- Because -> is right associative, the type of uncurry -- is equivalent to "(a -> b -> c) -> (a , b) -> c". -- "uncurry ($)": -----------...
pascal-knodel/haskell-craft
_/links/E'11'14.hs
mit
3,491
0
2
1,634
82
81
1
1
0
{-# LANGUAGE DeriveDataTypeable #-} {- | Module : ./Hybrid/AS_Hybrid.der.hs Copyright : (c) T.Mossakowski, W.Herding, C.Maeder, Uni Bremen 2004-2006 License : GPLv2 or higher, see LICENSE.txt Maintainer : till@informatik.uni-bremen.de Stability : provisional Portability : portable Abstract syntax ...
spechub/Hets
Hybrid/AS_Hybrid.der.hs
gpl-2.0
1,825
0
10
461
390
214
176
27
0
{-# LANGUAGE CPP, ForeignFunctionInterface #-} ----------------------------------------------------------------------------------------- {-| Module : WxcObject Copyright : (c) Daan Leijen 2003, 2004 License : wxWindows Maintainer : wxhaskell-devel@lists.sourceforge.net Stability : provisional P...
ekmett/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcObject.hs
lgpl-2.1
7,005
0
13
1,577
1,044
532
512
93
2
{-# LANGUAGE OverloadedStrings #-} {- | Copyright : Galois, Inc. 2012-2015 License : BSD3 Maintainer : jhendrix@galois.com Stability : experimental Portability : non-portable (language extensions) -} module Tests.Rewriter ( rewriter_tests ) where import Verifier.SAW.Conversion import Verifier.SAW.Prelu...
GaloisInc/saw-script
saw-core/tests/src/Tests/Rewriter.hs
bsd-3-clause
1,686
3
11
378
439
230
209
41
1
-- Copyright (c) 2016 Eric McCorkle. All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions -- are met: -- -- 1. Redistributions of source code must retain the above copyright -- notice, this list of conditi...
emc2/saltlang
src/salt/Language/Salt/Core/Syntax.hs
bsd-3-clause
95,073
179
44
28,630
29,249
15,639
13,610
-1
-1
{-# LANGUAGE TypeApplications #-} {-# LANGUAGE ScopedTypeVariables #-} import Control.Monad (zipWithM_) import Data.Aeson (encode, decode, ToJSON, FromJSON) import Data.ByteString (hGetContents) import Data.ByteString.UTF8 (lines, toString) import Data.Coerce (Coercible, coerce) impor...
vaibhavsagar/duffer.hs
duffer-json/test/Spec.hs
bsd-3-clause
2,755
0
13
643
805
442
363
57
1
{-# LANGUAGE Haskell98 #-} {-# LINE 1 "Data/Text/Internal/Builder/RealFloat/Functions.hs" #-} {-# LANGUAGE CPP #-} -- | -- Module: Data.Text.Internal.Builder.RealFloat.Functions -- Copyright: (c) The University of Glasgow 1994-2002 -- License: see li...
phischu/fragnix
tests/packages/scotty/Data.Text.Internal.Builder.RealFloat.Functions.hs
bsd-3-clause
1,184
0
12
367
346
195
151
22
6
{-# LANGUAGE Haskell2010 #-} {-# LINE 1 "Data/Vector/Mutable.hs" #-} {-# LANGUAGE CPP, DeriveDataTypeable, MultiParamTypeClasses, FlexibleInstances, BangPatterns, TypeFamilies #-} -- | -- Module : Data.Vector.Mutable -- Copyright : (c) Roman Leshchinskiy 20...
phischu/fragnix
tests/packages/scotty/Data.Vector.Mutable.hs
bsd-3-clause
13,639
0
19
3,330
3,293
1,720
1,573
235
2
{- (c) The GRASP/AQUA Project, Glasgow University, 1992-2012 Note [Unarisation] ~~~~~~~~~~~~~~~~~~ The idea of this pass is to translate away *all* unboxed-tuple binders. So for example: f (x :: (# Int, Bool #)) = f x + f (# 1, True #) ==> f (x1 :: Int) (x2 :: Bool) = f x1 x2 + f 1 True It is important that we do...
nushio3/ghc
compiler/simplStg/UnariseStg.hs
bsd-3-clause
7,781
0
13
1,648
2,384
1,237
1,147
129
3
{-# LANGUAGE DeriveDataTypeable #-} module Contract.Date ( Date -- incl. Ord instance providing compare function and (<) , DateError , at -- was "?" in SML. Use the Read instance instead , addDays, dateDiff, ppDate, ppDays ) where -- to define the exception import Control.Exception as E import Dat...
HIPERFIT/contracts
Haskell/Contract/Date.hs
mit
5,051
0
16
1,851
1,487
795
692
90
6
----------------------------------------------------------------------------- -- | -- Module : Control.Monad.ST.Strict -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : libraries@haskell.org -- Stability : provisional --...
kaoskorobase/mescaline
resources/hugs/packages/base/Control/Monad/ST/Strict.hs
gpl-3.0
646
2
5
91
41
32
9
4
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="sr-SP"> <title>Retest Add-On</title> <maps> <homeID>retest</homeID> <mapref location="m...
thc202/zap-extensions
addOns/retest/src/main/javahelp/org/zaproxy/addon/retest/resources/help_sr_SP/helpset_sr_SP.hs
apache-2.0
961
77
67
156
411
208
203
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-missing-fields #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -------------------...
chjp2046/fbthrift
thrift/compiler/test/fixtures/service-fuzzer/gen-hs/Module_Types.hs
apache-2.0
1,761
0
6
333
370
257
113
35
0
{-# OPTIONS_GHC -fwarn-unused-matches #-} module T9824 where foo = [p| (x, y) |]
urbanslug/ghc
testsuite/tests/quotes/T9824.hs
bsd-3-clause
83
0
4
15
14
11
3
-1
-1
module ShouldCompile where -- !!! test the overlapping patterns detection. -- f1 overlaps f1 "ab" = [] f1 "ab" = [] f1 _ = [] -- f2 overlaps f2 "ab" = [] f2 ('a':'b':[]) = [] f2 _ = [] -- f3 overlaps f3 ('a':'b':[]) = [] f3 "ab" = [] f3 _ = [] -- f4 doesn't overlap f4 "ab" = [] f4 ('a':'b':'c':[]) = [] f4 _ = [] ...
urbanslug/ghc
testsuite/tests/deSugar/should_compile/ds051.hs
bsd-3-clause
453
0
10
110
260
137
123
19
1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} module TeardownTest where import RIO import Control.Exception (MaskingState (..), getMaskingState) import Control.Monad (replicateM) import qualified Control.Teardown as SUT import Test.Tasty (TestTree, tes...
roman/Haskell-teardown
test/tasty/TeardownTest.hs
isc
3,664
0
19
1,038
813
395
418
79
1
module Env ( initialEnv, extendEnv, lookupEnv, defineVar, setVar, extendRef ) where import Types import Subr import qualified Data.Map as M initialEnv :: Env initialEnv = Node (makeFrame primitiveProcedureNames primitiveProcedureObjects) M.empty primitiveProcedureNames :: [String] primitiveProcedureNames = map (\(...
syunta/Scheme-hs
src/Env.hs
mit
2,557
4
21
696
1,280
649
631
76
4
{-# LANGUAGE OverloadedStrings, RankNTypes #-} {-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} -- | An HTTP\/2-aware variant of the 'Network.Wai.Application' type. Compared -- to the original, this exposes the new functionality of server push and -- trailers, allows stream fragments to be sent in the form of...
coypoop/wai
wai/Network/Wai/HTTP2.hs
mit
11,546
0
17
2,270
1,653
939
714
-1
-1
{-# htermination (readInt :: MyInt -> (Char -> MyBool) -> (Char -> MyInt) -> (List Char) -> (List (Tup2 MyInt (List Char)))) #-} import qualified Prelude data MyBool = MyTrue | MyFalse data List a = Cons a (List a) | Nil data Tup2 a b = Tup2 a b ; data Char = Char MyInt ; data Integer = Integer MyInt ...
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/readInt_1.hs
mit
3,939
0
13
943
2,042
1,064
978
88
1
module HaSC.Prim.Semantic where import qualified Data.Map as M import Text.Parsec.Pos import Control.Applicative import Control.Monad import Control.Monad.Writer import Control.Monad.State.Strict import HaSC.Prim.AST import HaSC.Prim.Environment import HaSC.Prim.ObjInfo import HaSC.Prim.AnalyzedAST import HaSC.Prim.E...
yu-i9/HaSC
src/HaSC/Prim/Semantic.hs
mit
10,061
0
15
3,018
3,357
1,657
1,700
209
10
-- ------------------------------------------------------------------------------------- -- Author: Sourabh S Joshi (cbrghostrider); Copyright - All rights reserved. -- For email, run on linux (perl v5.8.5): -- perl -e 'print pack "H*","736f75726162682e732e6a6f73686940676d61696c2e636f6d0...
cbrghostrider/Hacking
codeJam/2009/alienLanguage/qual2.hs
mit
2,373
0
13
488
703
378
325
35
1
-- | {-# LANGUAGE TypeSynonymInstances #-} module Point where import Foreign.C.Types import Foreign.Ptr import Foreign.Storable data Point3D = P {-# UNPACK #-} !CDouble {-# UNPACK #-} !CDouble {-# UNPACK #-} !CDouble deriving (Show) in...
rabipelais/cloudpoint
src/Point.hs
mit
2,197
0
14
676
1,119
574
545
69
1
module Rebase.GHC.Stack ( module GHC.Stack ) where import GHC.Stack
nikita-volkov/rebase
library/Rebase/GHC/Stack.hs
mit
71
0
5
12
20
13
7
4
0
{-# htermination lookupWithDefaultFM :: FiniteMap () b -> b -> () -> b #-} import FiniteMap
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/FiniteMap_lookupWithDefaultFM_2.hs
mit
92
0
3
16
5
3
2
1
0
{-# htermination replicateM_ :: Int -> Maybe a -> Maybe () #-} import Monad
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Monad_replicateM__3.hs
mit
76
0
3
14
5
3
2
1
0
{-# LANGUAGE DataKinds, TypeOperators, FlexibleContexts, FlexibleInstances, GADTs, ScopedTypeVariables, ConstraintKinds #-} -- | Tools for binding vinyl records to GLSL program uniform -- parameters. The most common usage is to use the 'setUniforms' -- function to set each field of a 'PlainRec' to the GLSL...
spetz911/progames
vinyl-gl-master/src/Graphics/VinylGL/Uniforms.hs
mit
7,200
0
14
1,907
1,788
930
858
109
2
-- | Use persistent-mongodb the same way you would use other persistent -- libraries and refer to the general persistent documentation. -- There are some new MongoDB specific filters under the filters section. -- These help extend your query into a nested document. -- -- However, at some point you will find the normal ...
pseudonom/persistent
persistent-mongoDB/Database/Persist/MongoDB.hs
mit
60,699
0
21
14,575
15,348
8,003
7,345
-1
-1
module Euler89 (Numeral (..), minimalNumerals, parseNumerals, numeralValue) where --import qualified Data.Map as M (Map, fromList, lookup, elems) import qualified Data.List as L (sortBy) data Numeral = I | V | X | L | C | D | M deriving (Show) data Piece = Single Numeral | Subtractive Numeral Numeral deriving (Show)...
nlim/haskell-playground
src/Euler89.hs
mit
2,187
0
14
620
830
450
380
49
5
module Test.Example ( exampleTests ) where import Data.ByteString (ByteString) import Data.Text (Text) import Flow import Prelude hiding (read) import Shikensu (Definition(..), Dictionary(..), list, makeDefinition) import Shikensu.Contrib (clone, copyPropsToMetadata, permalink, renameExt, renderContent) import...
icidasset/shikensu
tests/Test/Example.hs
mit
1,851
0
12
400
483
260
223
54
1
elementAt a b =
axnion/playground
random/haskell/99questions/problem3.hs
mit
16
0
5
4
11
5
6
-1
-1
{-# LANGUAGE RecordWildCards #-} -- | TCP Specific connection handling for monitoring with Riemann module Network.Monitoring.Riemann.TCP ( module Network.Monitoring.Riemann.Types, TCPClient, makeTCPClientFromConnection, makeTLSClient, makeTCPClient, sendEventTCP, sendQueryTCP, sendEventTCP', sendQueryTCP' ) whe...
capital-match/riemann-hs
src/Network/Monitoring/Riemann/TCP.hs
mit
4,601
0
17
1,030
1,174
610
564
75
2
module Common ( parseBS , cursorFromElement ) where import Data.ByteString.Lazy (ByteString) import Text.XML import Text.XML.Cursor import Codec.Xlsx.Parser.Internal import Codec.Xlsx.Writer.Internal parseBS :: FromCursor a => ByteString -> [a] parseBS = fromCursor . fromDocument . parseLBS_ def cursorFromElem...
qrilka/xlsx
test/Common.hs
mit
418
0
7
58
110
64
46
12
1
module Crypto.Text where import Data.Monoid import Data.Foldable as F import Data.Vector as V import Prelude as P import Crypto -- | All subvectors in the vector of a specific length which could reappear. -- Provides constant time lookup for subvectors of the current length at every -- position. /O(n)/ repVe...
muesli4/crypto
src/Crypto/Text.hs
mit
2,845
3
17
822
1,154
616
538
42
2
module Streams where ------------------------------------------------------------ data Stream a = Stream a | Cons a (Stream a) instance Show a => Show (Stream a) where show = show . take 20 . streamToList ------------------------------------------------------------ streamToList :: Stream a -> [a] streamToList...
sajith/cis194
hw06/Streams.hs
mit
1,380
0
11
225
435
230
205
20
2
{-# OPTIONS_GHC -XTypeSynonymInstances -XOverloadedStrings -XRecursiveDo -pgmF dist/build/marxup/marxup -F #-} import MarXup import MarXup.Latex import MarXup.Latex.Math import MarXup.Math import MarXup.Tex import MarXup.LineUp.Haskell import MarXup.DerivationTrees import MarXup.PrettyPrint as PP hiding (width) import...
jyp/MarXup
examples/LaTeX.hs
gpl-2.0
5,744
69
23
1,300
2,260
1,167
1,093
-1
-1
module Types where import Control.Applicative import Control.Concurrent.Chan import Control.Monad import Graphics.UI.SDL.Types import Graphics.UI.SDL.Video import Graphics.UI.SDL.Rect import Graphics.UI.SDL.Color import Graphics.UI.SDL.Time import Graphics.UI.SDL.TTF.Management as TTFM import Graphics.UI.SDL.TTF.Rende...
hce/yanas
src/Types.hs
gpl-2.0
8,422
0
10
2,997
2,048
1,239
809
232
1
module DarkPlaces.Binary where import Control.Applicative import qualified Data.ByteString.Lazy as BL import Prelude hiding (getLine) import Data.Binary.Get import Data.Binary.IEEE754 import Data.Int import DarkPlaces.Types maxTrackLen :: Int64 maxTrackLen = 8 getQVector :: ProtocolVersion -> Get QVector getQVecto...
bacher09/darkplaces-demo
src/DarkPlaces/Binary.hs
gpl-2.0
3,269
0
12
621
971
519
452
80
2
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable #-} module Robots.Quiz where import Inter.Types import Autolib.ToDoc import Autolib.Reader import Data.Typeable data RC = RC { width :: Integer -- ^ feld geht von (-w.-w) .. (w,w) , num :: Int -- ^ of robots , at_least :: Int -- ^ req length of solution...
Erdwolf/autotool-bonn
src/Robots/Quiz.hs
gpl-2.0
595
4
9
145
137
86
51
17
1
module Tema_18e_TablaPropiedades_Spec (main, spec) where import Tema_18.TablaPropiedades import Test.Hspec import Test.QuickCheck main :: IO () main = hspec spec spec :: Spec spec = do describe "Propiedades de las tablas" $ do it "p1" $ property prop_modifica_modifica_1 it "p2" $ property prop_...
jaalonso/I1M-Cod-Temas
test/Tema_18e_TablaPropiedades_Spec.hs
gpl-2.0
442
0
11
97
117
56
61
17
1
{- Copyright (C) 2009-2012 John MacFarlane <jgm@berkeley.edu> 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 program is ...
jgm/texmath
src/Text/TeXMath.hs
gpl-2.0
2,633
0
5
602
112
78
34
21
0