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 MultiParamTypeClasses , FlexibleInstances , FlexibleContexts #-} module XMonad.Hooks.DynamicLog.Dzen2.Width where import XMonad hiding (Font, Status) import XMonad.Util.Font import XMonad.Util.Font.Width import XMonad.Hooks.DynamicLog.Dzen2.Content import XMonad.Hooks.DynamicL...
Fizzixnerd/xmonad-config
site-haskell/src/XMonad/Hooks/DynamicLog/Dzen2/Width.hs
gpl-3.0
2,044
0
10
435
253
157
96
20
0
module HW08.Employee where import Data.Tree -- Employee names are represented by Strings. type Name = String -- The amount of fun an employee would have at the party, represented -- by an Integer type Fun = Integer -- An Employee consists of a name and a fun score. data Employee = Emp { empName :: Name, ...
martinvlk/cis194-homeworks
src/HW08/Employee.hs
gpl-3.0
1,599
0
13
521
570
299
271
40
1
module Movie where import Data.Function import Data.List import Data.List.Split -- | Movie data type. Used to store, print and compare Movies. data Movie = Movie { movieId :: Int , title :: String , date :: String , url :: String , ...
Jiggins/CS210
Movie.hs
gpl-3.0
1,708
0
10
554
395
233
162
31
1
{-# LANGUAGE NoImplicitPrelude, OverloadedStrings, Rank2Types, RecordWildCards #-} module Main ( main ) where import Prelude.Compat import qualified Control.Exception as E import Control.Lens.Operators import Control.Monad (join, unless, replicateM_) import Data.IORef i...
rvion/lamdu
Lamdu/Main.hs
gpl-3.0
10,645
21
32
3,624
2,358
1,220
1,138
-1
-1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE ScopedTypeVariables #-} module EpsilonNFA where import Data.Set import qualified Data.List as L import Control.Monad import Control.Lens import qualified DFA as D (State(State), Input(Input), Rule(Rule), DFA, mkDFA) import qualified Debug.Trace as De data Epsilon = Epsilo...
pocket7878/mini-reg
src/EpsilonNFA.hs
gpl-3.0
4,941
0
18
1,389
2,222
1,165
1,057
86
3
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/AssociationSessions/Start.hs
mpl-2.0
5,067
0
17
1,150
648
381
267
103
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-spanner/gen/Network/Google/Resource/Spanner/Projects/Instances/Databases/GetDdl.hs
mpl-2.0
5,594
0
16
1,224
708
416
292
110
1
module Ledger.Application.Action (module Action) where import Ledger.Application.Action.Common as Action import Ledger.Application.Action.Entries as Action import Ledger.Application.Action.Keys as Action import Ledger.Application.Action.Root as Action
asm-products/ledger-backend
library/Ledger/Application/Action.hs
agpl-3.0
253
0
4
22
49
37
12
5
0
module Jaek.UI.ControlGraph ( jaekControlGraph ) where import Jaek.Base import Jaek.Tree import Jaek.UI.AllSources import Jaek.UI.Controllers import Jaek.UI.Focus import Jaek.UI.Views import Reactive.Banana jaekControlGraph :: Sources -> Discrete (Int,Int) -> Discrete Focus -> Discrete ViewMap -> Discre...
JohnLato/jaek
src/Jaek/UI/ControlGraph.hs
lgpl-3.0
1,170
0
17
280
338
165
173
33
1
--module Main where import Debug.Trace import Data.List palinize2 :: Integer -> Integer palinize2 x = read $ (show x) ++ (reverse $ show x) palinize3 :: Integer -> [Integer] palinize3 x = map (\i -> read $ ((show x)) ++ (i : reverse (show x))) "0123456789" palins2 = map palinize2 [1..] palins3 = [2..9] ++ concat (...
jdavidberger/project-euler
prob125.hs
lgpl-3.0
1,570
0
13
585
601
320
281
32
7
{-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE OverlappingInstances #-} {-# LANGUAGE TypeFamilies #-} ----------------------------------------------------------------------------- -- | -- Module : System.Log.Filter -- Copyright : (C) 2015 Flowbox -- License :...
wdanilo/haskell-logger
src/System/Log/Filter.hs
apache-2.0
1,094
0
8
148
184
112
72
-1
-1
module Sing where fstString :: [Char] -> [Char] fstString x = x ++ " in the rain" sndString :: [Char] -> [Char] sndString x = x ++ " over the rainbow" sing :: [Char] sing = if (x > y) then fstString x else sndString y where x = "Singin" y = "Somewhere"
OCExercise/haskellbook-solutions
chapters/chapter05/exercises/sing.hs
bsd-2-clause
292
0
7
92
104
59
45
10
2
module GTKUnit where import Debug import BattleContext import Force import Control.Monad import Control.Monad.Trans import Control.Monad.Trans.Reader import qualified Data.Text as DT import qualified GI.Gtk as Gtk import qualified GI.GdkPixbuf as GP data GTKUnit = GTKUnit { gunitSyncId :: Int , gunitEventBox :...
nbrk/ld
executable/GTKUnit.hs
bsd-2-clause
2,084
0
12
421
534
279
255
50
4
module MessStart where import Rumpus start :: Start start _entityID = do forM_ [1..20::Int] $ \_ -> do color <- liftIO $ randomRIO (0,1) traverseM_ (spawnEntity "MessyBall") $ setEntityColor (color & _w .~ 1) traverseM_ (spawnEntity "SoundCube") $ setEntityColor (c...
lukexi/rumpus
util/DevScenes/scenes-old/fountain/MessStart.hs
bsd-3-clause
355
0
15
105
129
64
65
11
1
module TNParser (parseTNGraphEdgesFile ) where import Text.ParserCombinators.Parsec import TNTypes import System.IO import qualified Data.ByteString as S import TNGraph as TNGraph import qualified Data.Map.Strict as M -- |Parses file contents into a TNGraph -- Look at test_picture.txt to see file format parseTNGra...
astarostap/cs240h_final_project
src/TNParser.hs
bsd-3-clause
1,451
8
15
258
475
235
240
45
3
{-# LANGUAGE OverloadedStrings #-} module Chess.PGN ( pgnParser , PGN(..) , GameResult(..)) where import Chess import Control.Applicative import Data.Attoparsec.ByteString.Char8 import Data.ByteString.Char8 (pack, unpack) import Data.Map (fromList, (!)) type Move = String data PGN =...
ArnoVanLumig/chesshs
Chess/PGN.hs
bsd-3-clause
3,005
0
17
1,179
911
459
452
109
4
{-# LANGUAGE UnicodeSyntax #-} module Tests.TicTacToe.Actions ( spec ) where import Test.HUnit import AXT.TicTacToe.Actions as GA(changeWorld) import TestData as TD (fields) import AXT.TicTacToe.Types as GT (CoorOnField, GameType(..), Field(F), State(..), StepResult(..), toCoorOnField) import Helper...
xruzzz/axt-tic-tac-toe-gl-haskell
test/Tests/TicTacToe/Actions.hs
bsd-3-clause
716
0
13
178
270
161
109
14
1
module Simulator (module Simulator) where import Graphics.Gloss import Control.Lens import Control.Arrow import Convenience import Numeric.FastMath() import Control.Monad.Random class CanRender a where simRender :: a Double -> Picture class Steppable a where simStep :: Floating f => a f -> a f class HasCos...
bmabsout/neural-swarm
src/Simulator.hs
bsd-3-clause
967
0
9
187
375
192
183
-1
-1
{- chris zipper.hs:24:5: "zipper.hs" (line 26, column 12): listDup([]) = {v | Set_emp v } ^ unexpected "]" expecting "forall", binder, "(", "{", "[", type variable, module qualifier, type constructor or type constructor operator -} {-# LANGUAGE QuasiQuotes #-} import LiquidHaskell ...
spinda/liquidhaskell
tests/gsoc15/unknown/pos/zipper.hs
bsd-3-clause
5,175
5
11
1,243
1,092
612
480
75
3
-- | -- Module : Data.Memory.Internal.Imports -- License : BSD-style -- Maintainer : Vincent Hanquez <vincent@snarc.org> -- Stability : experimental -- Portability : unknown -- {-# LANGUAGE CPP #-} module Data.Memory.Internal.Imports ( module X ) where import Data.Word as X impor...
NicolasDP/hs-memory
Data/Memory/Internal/Imports.hs
bsd-3-clause
515
0
5
140
78
57
21
8
0
{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE...
cchalmers/geometry
src/Geometry/BoundingBox.hs
bsd-3-clause
13,738
0
15
3,444
3,585
1,862
1,723
232
3
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -} {-# LANGUAGE CPP, DeriveDataTypeable, ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE UndecidableInstances #-} -- Note [Pass sensitive types] ...
snoyberg/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
95,708
0
20
26,779
15,737
8,360
7,377
1,056
10
{-# OPTIONS_GHC -Wall #-} {-# LANGUAGE OverloadedStrings #-} module File.Header ( Info(..) , readModule , readOneFile , readManyFiles , readSource ) where import Control.Monad.Except (liftIO) import qualified Data.ByteString as BS import Data.List.NonEmpty (NonEmpty((:|))) import qualified Data.Map as Ma...
evancz/builder
src/File/Header.hs
bsd-3-clause
4,995
0
19
1,141
1,573
825
748
122
6
module TCPConnection ( TCPConnection , openStream , getStreamStart ) where import Network import System.IO import Data.IORef import Control.Monad import XMLParse import XMPPConnection -- |An XMPP connection over TCP. data TCPConnection = TCPConnectio...
legoscia/hsxmpp
TCPConnection.hs
bsd-3-clause
2,247
0
14
724
557
274
283
60
2
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.Raw.ARB.TextureBorderClamp -- Copyright : (c) Sven Panne 2015 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : porta...
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/ARB/TextureBorderClamp.hs
bsd-3-clause
677
0
4
78
37
31
6
3
0
{-# LANGUAGE RankNTypes, FlexibleContexts, TypeFamilies #-} module Pipes.Process ( PipesProcess , closeStdin , withProcess , readProcess , writeProcess , flushProcess , start , stop ) where import Control.Concurrent (ThreadId, killThread, forkIO) import Control.Concurrent...
stepcut/pipes-process
Pipes/Process.hs
bsd-3-clause
7,097
0
26
3,360
1,610
817
793
135
8
{-# LANGUAGE GADTs #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module DataStore.Token where import Database.Persist i...
bgwines/hueue
src/DataStore/Token.hs
bsd-3-clause
540
0
7
134
53
34
19
11
0
module Util.Cabal ( prettyVersion , prettyPkgInfo , parseVersion , parsePkgInfo , executableMatchesCabal ) where import Distribution.Version (Version(..), withinRange) import Distribution.Package (PackageName(..), Dependency(..),...
Paczesiowa/hsenv
src/Util/Cabal.hs
bsd-3-clause
2,201
0
16
498
587
309
278
41
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeOperators #-} {-| Module : $Header$ Copyright : (c) 2015 Swinburne Software Innovation Lab License : BSD3 Maintainer : Shannon Pace <space@swin.edu.au> Stability : unstable Portability : portable Client for Aegle API consuming machine resource data. -...
futufeld/eclogues
eclogues-impl/app/api/Eclogues/Monitoring/Monitor.hs
bsd-3-clause
2,105
0
13
381
531
303
228
34
1
-- | This module provides the 'Processor' type. -- 'Processor' instances define transformations from problems to a (possible empty) set of subproblems. module Tct.Core.Data.Processor ( Processor (..) , Return (..) , Fork , ProofData , CertificateFn , apply -- * Proof node construction. , abortWith , s...
ComputationWithBoundedResources/tct-core
src/Tct/Core/Data/Processor.hs
bsd-3-clause
2,204
0
12
443
634
337
297
31
2
{-# LANGUAGE DeriveDataTypeable #-} module Message where import Data.Data import Data.Typeable import Network import Data.Aeson import System.IO(Handle, hFlush, hPutChar) import qualified Data.Aeson.Generic as GJ import Domain import Render import Log import Missile import MissileLogic import GameLogic import Json ...
timorantalaiho/pong11
src/Message.hs
bsd-3-clause
3,330
0
16
610
935
463
472
66
2
{-# LANGUAGE MultiParamTypeClasses #-} module Astro.Trajectory ( Trajectory, startTime, endTime, ephemeris, ephemeris', datum , Datum ) where import Astro.Time import Astro.Orbit.MEOE import Numeric.Units.Dimensional.Prelude import Data.Maybe (listToMaybe) import qualified Prelude -- | A @Trajectory@ is an ab...
bjornbm/astro
src/Astro/Trajectory.hs
bsd-3-clause
1,650
0
12
406
325
178
147
18
0
{-# LANGUAGE DeriveDataTypeable, OverloadedStrings #-} module Scoring ( UserScore(..), emptyScore, userScore, addScore, GroupScore(..), scoreGroup, groupScore, renderGroups, renderScores ) where import Data.Data (Data) import Data.Function (on) import Data.List (sort) import qualified Data.Map as ...
ronwalf/ba-winter-challenge
src/Scoring.hs
bsd-3-clause
3,950
0
18
1,006
1,244
669
575
107
4
{-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE DeriveDataTypeable #-} -- | This module provides 'CtlStream', a data type that is a wrapper -- around any 'ChunkData' type that allows control requests to be -- interspersed with data....
scslab/iterIO
Data/IterIO/CtlStream.hs
bsd-3-clause
3,987
0
11
1,117
979
509
470
60
4
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE QuasiQuotes #-} -------------------------------------------------------------------------------- -- | -- Module : Main -- Copyright : (C) 2014-2015 Samuli Thom...
HeavenlyAwe/opetussivut
main.hs
mit
51,932
0
26
16,935
5,087
2,721
2,366
399
4
-- -- Chapter 11, definitions from the book. -- module B'C'11 where import Prelude hiding (succ) -- Subchapter 11.1, forward composition ... infixl 9 >.> (>.>) :: (a -> b) -> (b -> c) -> (a -> c) g >.> f = f . g -- Subchapter 11.2, "mapFuns": mapFuns :: [a -> b] -> a -> [b] mapFuns fs x = map (\f -> f x...
pascal-knodel/haskell-craft
_/links/B'C'11.hs
mit
720
0
9
210
313
172
141
17
1
{-# LANGUAGE Arrows, OverloadedStrings, RecordWildCards #-} module Bot where import Control.Auto import Control.Concurrent (Chan, newChan, writeChan, forkIO, threadDelay) import Control.Auto.Run (runOnChanM) import Control.Auto.Serialize (serializing') import Control.Monad (void, forever) import Con...
urbanslug/nairobi-bot
src/Bot.hs
gpl-3.0
3,885
1
22
1,111
1,028
535
493
88
4
module Directive.Parser ( parseCommand, Command(..) ) where import Interface.Errors import Tools.Parser import Text.Parsec data Command = Replace String String | Exec String | PassThrough String | DoWrite | DoInclude deriving Show parseCommand :: FilePath -> String -> Either ...
kavigupta/SimplePreprocessor
src/Directive/Parser.hs
gpl-3.0
1,148
0
11
258
335
164
171
40
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- ...
fmapfmapfmap/amazonka
amazonka-s3/gen/Network/AWS/S3/DeleteBucketTagging.hs
mpl-2.0
2,930
0
9
550
348
212
136
49
1
----------------------------------------------------------------------------- -- | -- Module : Control.Monad.Indexed -- Copyright : (C) 2008 Edward Kmett -- License : BSD-style (see the file LICENSE) -- -- Maintainer : Edward Kmett <ekmett@gmail.com> -- Stability : experimental -- Portability : non-...
urska19/MFP---Samodejno-racunanje-dvosmernih-preslikav
Control/Monad/Indexed.hs
apache-2.0
1,265
4
11
286
489
261
228
26
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE EmptyCase #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE LambdaCase #-} ...
dorchard/camfort
src/Language/Fortran/Model/Op/High.hs
apache-2.0
2,415
0
13
506
416
226
190
46
0
module Main where import System.IO.Error import System.Process main :: IO () main = do test1 `catchIOError` \e -> putStrLn ("Exc: " ++ show e) test2 `catchIOError` \e -> putStrLn ("Exc: " ++ show e) test1 :: IO () test1 = do (_, _, _, commhand) <- runInteractiveProcess "true" [] (Just "/no/such/dir...
DavidAlphaFox/ghc
libraries/process/tests/process004.hs
bsd-3-clause
574
0
12
131
212
107
105
18
1
{-# LANGUAGE CPP, RankNTypes, ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-warn-orphans #-} ----------------------------------------------------------------------------- -- | -- Module : Haddock.InterfaceFile -- Copyright : (c) David Waern 2006-2009, -- Mateusz Kowalczyk 2013 -- Licens...
DavidAlphaFox/ghc
utils/haddock/haddock-api/src/Haddock/InterfaceFile.hs
bsd-3-clause
19,152
9
28
6,623
5,425
2,567
2,858
-1
-1
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module Lazyfoo.Lesson19 (main) where import Prelude hiding (any, mapM_) import Control.Applicative import Control.Monad hiding (mapM_) import Data.Foldable import Data.Int import Data.Maybe impor...
Velro/sdl2
examples/lazyfoo/Lesson19.hs
bsd-3-clause
5,232
10
25
1,730
1,504
762
742
121
15
{-# LANGUAGE LambdaCase #-} module Main where import Control.Concurrent import Control.Exception import Control.Monad import Data.IORef import Debug.Trace import System.Mem.Weak import System.Mem import GHCJS.Foreign.Export main :: IO () main = sequence_ [test1, test2, test3, test4] p :: Weak (IORef String) -> E...
seereason/ghcjs
test/ffi/export.hs
mit
1,788
0
15
433
676
312
364
-1
-1
{-# LANGUAGE QuasiQuotes, TypeFamilies, TemplateHaskell, MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleInstances #-} module YesodCoreTest.JsLoaderSites.Bottom ( B(..) , Widget , resourcesB -- avoid warning ) where import Yesod.Core data B = B mkYesod "B" [parseRoute...
s9gf4ult/yesod
yesod-core/test/YesodCoreTest/JsLoaderSites/Bottom.hs
mit
474
0
7
80
86
51
35
14
1
-- The simplifier changes the shapes of closures that we expect. {-# OPTIONS_GHC -O0 #-} {-# LANGUAGE MagicHash, UnboxedTuples, LambdaCase #-} import GHC.Exts.Heap import GHC.IORef import GHC.Weak import System.Mem main :: IO () main = do key <- newIORef "key" let val = "val" wk@(Weak w) <- mkWeak key val...
sdiehl/ghc
libraries/ghc-heap/tests/heap_weak.hs
bsd-3-clause
825
1
12
215
236
108
128
25
5
{-# LANGUAGE OverloadedStrings #-} -- | The pull requests API as documented at -- <http://developer.github.com/v3/pulls/>. module Github.PullRequests ( pullRequestsFor'' ,pullRequestsFor' ,pullRequest' ,pullRequestCommits' ,pullRequestFiles' ,pullRequestsFor ,pullRequest ,pullRequestCommits ,pullRequestFiles ,isPullRe...
adarqui/github
Github/PullRequests.hs
bsd-3-clause
5,684
0
12
846
1,053
580
473
64
1
module AsPatIn2 where f :: Either a b -> Either a b f x@(x_1) = case x of x@(Left b_1) -> x_1 x@(Right b_1) -> x_1 f x@(x_1) = x_1
SAdams601/HaRe
old/testing/introCase/AsPatIn2_TokOut.hs
bsd-3-clause
162
0
10
61
85
46
39
7
2
module B(f) where import C
forste/haReFork
tools/base/Modules/tests/3/B.hs
bsd-3-clause
27
0
4
5
12
8
4
2
0
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} module Main where import Data.Kind (Type) type family F a :: Type type instance F Int = (Int, ()) class C a instance C () instance (C (F a), C b) => C (a, b) f :: C (F a) => a -> Int f _ = 2 main :: IO () mai...
sdiehl/ghc
testsuite/tests/typecheck/should_run/T3500a.hs
bsd-3-clause
346
0
8
82
154
85
69
-1
-1
module App where import Data.Coerce foo :: Coercible (a b) (c d) => a b -> c d foo = coerce
urbanslug/ghc
testsuite/tests/typecheck/should_compile/T10494.hs
bsd-3-clause
94
0
8
23
50
26
24
4
1
{-# LANGUAGE OverloadedStrings #-} module Futhark.Doc.Generator (renderFile, indexPage) where import Control.Monad import Control.Monad.State import Control.Monad.Reader import Data.List (sort) import Data.Monoid import Data.Maybe (maybe,mapMaybe) import qualified Data.Map as M import System.FilePath (splitPath, (-<.>...
ihc/futhark
src/Futhark/Doc/Generator.hs
isc
14,144
0
18
3,333
5,254
2,583
2,671
316
7
main :: IO () main = putStrLn "Running with testing enabled"
KarimxD/Evolverbetert
test/Test.hs
mit
61
0
6
11
19
9
10
2
1
{-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- | -- Module : KD8ZRC.Mapview.Utility.Coordinates -- Copyright : (C) 2015 Ricky Elrod -- License : MIT (see LICENSE file) -- Maintainer : Ricky Elrod <ricky@elrod.me> -- Stability : experimental -- Portabi...
noexc/mapview
src/KD8ZRC/Mapview/Utility/Coordinates.hs
mit
707
0
7
74
50
36
14
5
1
{-# LANGUAGE ForeignFunctionInterface #-} module System.Time.Native( timeOpMicros , nowClocks , nowNanos , nowMicros , nowMillis , nowSeconds ) where import Control.Concurrent import Control.Exception import Data.Word import Text.Printf foreign import ccall unsafe "time_rdtsc" getRDTSC :: IO Word64 ...
trbauer/native-time
System/Time/Native.hs
mit
867
0
9
159
269
148
121
32
1
module Q19 where import Q17 rotate :: [a] -> Int -> [a] rotate p q = let (r, s) = split p (mod q (length p)) in s ++ r
cshung/MiscLab
Haskell99/q19.hs
mit
131
0
13
42
77
41
36
7
1
module Settings.Builders.GhcCabal ( ghcCabalBuilderArgs, ghcCabalHsColourBuilderArgs ) where import Hadrian.Haskell.Cabal import Context import Flavour import Settings.Builders.Common hiding (package) import Utilities ghcCabalBuilderArgs :: Args ghcCabalBuilderArgs = builder GhcCabal ? do verbosity <- ex...
izgzhen/hadrian
src/Settings/Builders/GhcCabal.hs
mit
9,977
0
17
4,267
1,795
983
812
280
9
import Data.Char (isAlphaNum) import Data.List (elemIndex, sortOn) import Data.Maybe (fromMaybe) import Data.Bits (xor, (.|.), (.&.), unsafeShiftL, unsafeShiftR, shift) import Data.Int (Int64) import Data.Hashable import qualified Data.Map.Strict as M import qualified Data.Sequence as S import qualified Data.HashSet as...
bno1/adventofcode_2016
d11/main.hs
mit
8,672
0
19
2,226
2,394
1,296
1,098
126
5
module Bitcoin.MerkleTree ( mtHash, mtLeft, mtRight, merkleTree ) where import Data.Tree import Bitcoin.Crypto import qualified Data.ByteString as B type MerkleTree = Tree Hash -- | get the hash from a node mtHash :: MerkleTree -> Hash mtHash = rootLabel -- | get the left child of a node mtLeft :: MerkleTr...
fhaust/bitcoin
src/Bitcoin/MerkleTree.hs
mit
2,190
0
11
406
393
220
173
27
3
import Data.Char main = do contents <- getContents putStrLn $ map toUpper contents
yhoshino11/learning_haskell
ch9/capslocker_success.hs
mit
88
0
8
18
30
14
16
4
1
module Data.CSV.Table.Email ( -- * Email representation Email (..) -- * Send function , sendMail ) where import Text.Printf (printf) import System.Process import Control.Monad (forM_) import Data.List (intercalate) import Data.CSV.Table.Types import Data.CSV.Table.Op...
ucsd-progsys/csv-table
src/Data/CSV/Table/Email.hs
mit
1,188
0
10
413
393
212
181
32
2
{-# LANGUAGE CPP #-} module Import.NoFoundation ( module Import , renderForm , submitButton ) where import ClassyPrelude.Yesod as Import import Model as Import import Settings as Import import Settings.StaticFiles as Import import Yesod.Auth as Import import Y...
ranjitjhala/gradr
Import/NoFoundation.hs
mit
972
0
9
370
199
117
82
25
1
--1.Mostre os resultados das seguintes expressões: --1.1 / > [1,2,3,4] ++ [9,10,11,12] con :: [Int] -> [Int] -> [Int] con x y = x++y --1.2 / > "hello" ++ " " ++ "world" sayhello :: String -> String -> String sayhello x y = x ++ y --1.3 / > 5:[1,2,3,4,5] incluir :: Int -> [Int] -> [Int] incluir x y = x:y --1.4 / > [...
hugonasciutti/Exercises
Haskell/Exercises/pratica2.hs
mit
3,380
0
9
656
504
285
219
26
1
collatz :: Int -> Int collatz n | n `mod` 2 == 0 = n `div` 2 | otherwise = 3 * n + 1 countStepsToOne :: Int -> Int countStepsToOne n = length (takeWhile (/=1) (iterate collatz n)) main = print $ countStepsToOne 10
kdungs/coursework-functional-programming
02/collatz.hs
mit
229
0
9
60
109
56
53
7
1
module Unison.Test.Common where import qualified Data.Map as Map import qualified Unison.Builtin as B import qualified Unison.FileParsers as FP import Unison.Symbol (Symbol) import Unison.Term (Term) import Unison.Type (Type) import qualified Unison.Typechecker as Typechecker import quali...
paulp/unison
parser-typechecker/tests/Unison/Test/Common.hs
mit
1,476
0
11
274
523
275
248
33
1
{- - Дадено е двоично наредено дърво, в което всеки връх съдържа цяло число и - разликата на височините на двете му поддървета. - Да се напише функция specialInsert x tree, която добавя връх със стойност - x в двоичното наредено дърво tree (като правилно обновява разликите във - височините за всеки връх). -} da...
fmi-lab/fp-elective-2017
exams/preparation/treeDifference.hs
mit
1,325
0
11
243
386
192
194
17
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicecatalog-tagoption.html module Stratosphere.Resources.ServiceCatalogTagOption where import Stratosphere....
frontrowed/stratosphere
library-gen/Stratosphere/Resources/ServiceCatalogTagOption.hs
mit
2,487
0
15
309
370
211
159
36
1
module Lazy F :: Bool -> () -> Bool f x = \_ -> x
ostera/asdf
haskell/Lazy.hs
mit
51
2
5
16
24
14
10
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-layer-lifecycleeventconfiguration-shutdowneventconfiguration.html module Stratosphere.ResourceProper...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/OpsWorksLayerShutdownEventConfiguration.hs
mit
2,764
0
12
206
265
152
113
27
1
module Yahtzee.ScoreCard where import Text.Printf import Text.Show.Functions import Data.Tuple.Select import Yahtzee.Scoring data Score = Score Int | NoValue instance Show Score where show NoValue = " -" show (Score n) = printf "%3d" n type CategoryName = String type CategoryId = Char type ScoreFn = [In...
kvalle/yahtzee.hs
src/Yahtzee/ScoreCard.hs
mit
1,505
0
9
300
550
319
231
39
1
# DataVisualization Data Visualization notes and exercises from the course in [Udacity](https://www.udacity.com/courses/ud507). I expect to finish this in February'16 and share all my exercises here. If you want some explanation or contribute something to this repository you're welcome. Why? -- I think sharing thi...
hectorip/DataVisualization
116113-68964-1vwzjm6.hs
cc0-1.0
477
0
15
76
188
93
95
-1
-1
{-# LANGUAGE ScopedTypeVariables, ExistentialQuantification, MultiParamTypeClasses #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} -- | This module defines implementations of syntax-awareness drivers. module Yi.Syntax.Driver where import qualified Data.Map as M import Data.Map (Map) import Yi.Buffer.Basic(WindowR...
atsukotakahashi/wi
src/library/Yi/Syntax/Driver.hs
gpl-2.0
2,750
0
15
875
887
482
405
48
3
{-- -- Natume -- an implementation of Kana-Kanji conversion in Haskell -- Copyright (C) 2006-2012 Takayuki Usui -- -- 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 th...
takayuki/natume
Lib.hs
gpl-2.0
4,832
0
17
934
1,233
655
578
85
1
module H28 where sort :: (Ord b) => (a -> b) -> [a] -> [a] sort _ [] = [] sort func xs = let k = func $ head xs as = [x' | x' <- xs, func x' < k] bs = [x' | x' <- xs, func x' == k] cs = [x' | x' <- xs, func x' > k] in sort func...
hsinhuang/codebase
h99/H28.hs
gpl-2.0
902
0
12
411
485
250
235
23
3
-------------------------------------------------------------------------------- -- ///////////////////////////////////////////////////////////////////////////// -------------------------------------------------------------------------------- -- Benchmarks --------------------------------------------------------------...
gennady-em/haskel
src/RS_Benchmark.hs
gpl-2.0
3,246
62
26
916
978
511
467
60
1
module Problem033 (answer) where answer :: Int answer = finalDenum `div` gcd finalDenum finalNum where (nums, denums) = unzip [(i, j) | j <- [2..99], i <- [1..j-1], isCurious i j] finalNum = product nums finalDenum = product denums isCurious :: Int -> Int -> Bool isCurious num denum = ((n1/=0) && (d1/=0...
geekingfrog/project-euler
Problem033.hs
gpl-3.0
663
0
15
169
350
191
159
15
1
module Language.Subleq.Assembly.Printer where import Language.Subleq.Assembly.Prim import Text.PrettyPrint import qualified Data.Map as M printId :: Id -> Doc printId = text printLoc :: Id -> Doc printLoc = text . (++ ":") printExpr :: Expr -> Doc printExpr (Identifier i) = printId i printExpr (Number n) = integer ...
Hara-Laboratory/subleq-toolchain
Language/Subleq/Assembly/Printer.hs
gpl-3.0
1,500
0
12
256
626
317
309
29
1
// Challenges // 1. Show the isomorphism between Maybe a and Either () a. maybeToEither :: Maybe a -> Either () a maybeToEither Nothing = Left () maybeToEither Just x = Right x eitherToMaybe :: Either () a -> Maybe a eitherToMaybe Left () = Nothing eitherToMaybe Right x = Just x
sujeet4github/MyLangUtils
CategoryTheory_BartoszMilewsky/PI_06_SimpleAlgebraicDataTypes/Maybe_Either.hs
gpl-3.0
285
5
8
57
123
58
65
-1
-1
{-# OPTIONS -Wall #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Graphics.UI.Bottle.Widgets.GridView( make, makeGeneric, makeFromWidgets) where import Control.Arrow (first, second) import Control.Applicative (liftA2) import Control.Monad (msum) import Data.List (transpose) import Data.Monoid (Monoid(..)) i...
alonho/bottle
src/Graphics/UI/Bottle/Widgets/GridView.hs
gpl-3.0
4,069
0
18
854
1,246
692
554
77
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-cloudkms/gen/Network/Google/Resource/CloudKMS/Projects/Locations/KeyRings/TestIAMPermissions.hs
mpl-2.0
7,029
0
16
1,455
793
468
325
125
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.AdSenseHost.Types -- Copyright : (c) 2015-2016 Brendan...
brendanhay/gogol
gogol-adsense-host/gen/Network/Google/AdSenseHost/Types.hs
mpl-2.0
4,030
0
7
1,136
498
342
156
145
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE TypeOperators #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-duplicate-exports #-} -- | -- Module : Network.Google.AppsCalendar -- Copyright : (c) 2015-2016 Brendan Hay -- License : Mozilla...
brendanhay/gogol
gogol-apps-calendar/gen/Network/Google/AppsCalendar.hs
mpl-2.0
16,189
0
40
3,659
2,049
1,472
577
458
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/Get.hs
mpl-2.0
3,077
0
14
732
421
249
172
63
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-jobs/gen/Network/Google/Resource/Jobs/Projects/Companies/Delete.hs
mpl-2.0
4,949
0
15
1,120
702
412
290
101
1
{-# LANGUAGE FlexibleContexts #-} import AdventOfCode (readInputFile) import AdventOfCode.Split (splitOnOne) import Control.Arrow ((***)) import Control.Monad (forM_) import Control.Monad.ST (ST) import Data.Array.Base (UArray) import Data.Array.IArray (IArray, elems) import Data.Array.MArray (newArray, readArray, wr...
petertseng/adventofcode-hs
bin/06_light_grid.hs
apache-2.0
2,600
0
16
564
1,045
566
479
69
4
{-# LANGUAGE FlexibleContexts, TypeOperators #-} module Codec.FFMpeg.Codec ( decodeVideoFrames ) where import Control.Eff import Control.Eff.Coroutine import Control.Eff.Exception import Control.Eff.Lift import Control.Eff.Reader.Strict import Foreign ( Ptr ) import Foreign.C.Types ( CInt(..) ) import Foreig...
waldheinz/ffmpeg-effects
src/Codec/FFMpeg/Codec.hs
apache-2.0
1,887
0
19
562
577
303
274
43
4
----------------------------------------------------------------------------- -- | -- Module : FFICXX.Generate.Code.Cabal -- Copyright : (c) 2011-2013 Ian-Woo Kim -- -- License : BSD3 -- Maintainer : Ian-Woo Kim <ianwookim@gmail.com> -- Stability : experimental -- Portability : GHC -- --------------------...
Gabriel439/fficxx
lib/FFICXX/Generate/Code/Cabal.hs
bsd-2-clause
1,385
0
15
223
324
184
140
17
1
{-# LANGUAGE ScopedTypeVariables #-} module Tersus.Database where --import Tersus import Control.Monad.IO.Class import Data.ByteString import qualified Data.ByteString as B import qualified Data.ByteString.Char8 as Char8 import Data.String import Data.Text import quali...
kmels/tersus
Tersus/Database.hs
bsd-2-clause
1,512
0
10
320
441
255
186
36
1
module FractalFlame.GLDisplay ( displayLoop ) where import Data.Array import qualified Foreign import GHC.Float import Graphics.UI.GLUT import System.Exit (exitWith, ExitCode(ExitSuccess)) import qualified FractalFlame.Histogram as H import qualified FractalFlame.Color as C import qualified FractalFlame.Types...
anthezium/fractal_flame_renderer_haskell
FractalFlame/GLDisplay.hs
bsd-2-clause
2,220
0
12
407
726
363
363
60
1
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QStyleOptionTabBarBase.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:15 Warning : this file is machine gener...
keera-studios/hsQt
Qtc/Gui/QStyleOptionTabBarBase.hs
bsd-2-clause
6,697
0
12
884
1,619
830
789
-1
-1
module Jerimum.Tests.Unit.PostgreSQL.Types.TypeTest ( tests ) where import Jerimum.PostgreSQL.Types.Type import Jerimum.Tests.Unit.PostgreSQL.Types.Helpers import Test.Tasty import Test.Tasty.HUnit import Test.Tasty.QuickCheck tests :: TestTree tests = testGroup "PostgreSQL.Types.Type" [testCodec, testParser, t...
dgvncsz0f/nws
test/Jerimum/Tests/Unit/PostgreSQL/Types/TypeTest.hs
bsd-3-clause
2,001
0
14
368
535
272
263
46
1
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE EmptyDataDecls #-} #include "kinds.h" #ifdef GenericDeriving {-# LANGUAGE DeriveGeneric #-} #endif #ifdef SafeHaskell #if __GLASGOW_HASKELL__ >= 704 {-# LANGUAGE Safe #-} #else {-# LANGUAGE Trustworthy #-} #endif #endif module Type.Meta.Void ...
duairc/symbols
types/src/Type/Meta/Void.hs
bsd-3-clause
2,091
3
7
331
238
140
98
-1
-1
module Game.TicTacToe.Client ( client ) where client :: IO () client = putStrLn "--- TicTacToe client ---" >> putStrLn "exiting ..."
peterson/hsttt
src/Game/TicTacToe/Client.hs
bsd-3-clause
136
0
6
24
37
20
17
5
1
----------------------------------------------------------------------------- -- | -- Module : Control.Monad.List -- Copyright : (c) Andy Gill 2001, -- (c) Oregon Graduate Institute of Science and Technology, 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : librar...
OS2World/DEV-UTIL-HUGS
libraries/Control/Monad/List.hs
bsd-3-clause
2,226
14
15
456
768
406
362
-1
-1
{-# LANGUAGE DeriveGeneric, DataKinds, OverloadedStrings, TypeOperators #-} module Htrans.Cli ( -- funcs cli, appName ) where import qualified Data.Text as T import Paths_htrans (version) import Data.Version (showVersion) import Options.Generic import Data.Maybe import Htrans.Types (Lang(..), LogLevel(..), Con...
johhy/htrans
src/Htrans/Cli.hs
bsd-3-clause
1,421
0
12
326
341
191
150
37
1
module ImplicitRefs.Parser ( expression , program , parseProgram ) where import Control.Monad (void) import Data.Maybe (fromMaybe) import ImplicitRefs.Data import Text.Megaparsec hiding (ParseError) import Text.Megaparsec.Expr import qualifi...
li-zhirui/EoplLangs
src/ImplicitRefs/Parser.hs
bsd-3-clause
7,780
0
13
1,881
2,029
1,057
972
205
2
{-# LANGUAGE FlexibleContexts #-} module Karamaan.Opaleye.Distinct where import Karamaan.Opaleye.QueryArr (Query, runSimpleQueryArr, simpleQueryArr) import Karamaan.Opaleye.Wire (Wire(Wire)) import Database.HaskellDB.PrimQuery (PrimQuery(Group),PrimExpr(AttrExpr)) import Karamaan.Opaleye.Operators2 (union) import Kar...
karamaan/karamaan-opaleye
Karamaan/Opaleye/Distinct.hs
bsd-3-clause
2,216
0
16
380
492
285
207
29
1
module BSPM where
schernichkin/BSPM
bsp/src/BSPM.hs
bsd-3-clause
19
0
2
3
4
3
1
1
0
{-# LANGUAGE PatternGuards #-} module Development.Shake.FilePattern( FilePattern, (?==), compatible, extract, substitute, directories, directories1 ) where import System.FilePath(pathSeparators) import Data.List import Control.Arrow -------------------------------------------------------------------...
nh2/shake
Development/Shake/FilePattern.hs
bsd-3-clause
5,466
16
15
1,212
1,753
984
769
69
4