code
stringlengths
2
1.05M
repo_name
stringlengths
5
101
path
stringlengths
4
991
language
stringclasses
3 values
license
stringclasses
5 values
size
int64
2
1.05M
module Language.Ptlish.Simplify (simplify) where import Language.Ptlish.AST import Control.Monad.State import qualified Data.Map as Map import Data.Maybe type SimplifyM = State SimplifyState data SimplifyState = SimplifyState { stNextExprId :: Int, stExtra :: [(Name,Expr)], stExprMa...
tlaitinen/ptlish
Language/Ptlish/Simplify.hs
Haskell
bsd-2-clause
4,544
{-# LANGUAGE OverloadedStrings #-} import System.Directory import System.Time import System.IO import qualified Data.List as L import Text.ParserCombinators.Parsec import Text.Blaze.Html5 as H import Text.Blaze.Html5.Attributes as A import Text.Blaze.Html.Renderer.Pretty import qualified Text.Blaze.Internal as I impor...
adrienhaxaire/adrienhaxaire.org
update.hs
Haskell
bsd-3-clause
12,406
--------------------------------------------------------------------------- -- | -- module : Control.Monad.Trans.Cont -- Copyright : (c) Evgeniy Permyakov 2010 -- License : BSD-style (see the LICENSE file in the distribution) -- -- Maintainer : permeakra@gmail.com -- Stability : experimental -- Port...
permeakra/yamtl
Control/Monad/Trans/Invoke.hs
Haskell
bsd-3-clause
1,150
-- | Bookstore Example -- example from Realworld Haskell Chapter 03 module Week02.BookStore where data BookInfo = Book Integer String [String] deriving (Show) data MagazineInfo = Magazine Integer String [String] deriving (Show) -- Type synonyms type CustomerID = Int type CardHo...
emaphis/Haskell-Practice
cis194/src/Week02/BookStore.hs
Haskell
bsd-3-clause
1,484
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 Pattern-matching bindings (HsBinds and MonoBinds) Handles @HsBinds@; those at the top level require different handling, in that the @Rec@/@NonRec@/etc structure is thrown away (whereas at lower levels it is preserved with...
spinda/liquidhaskell
src/Language/Haskell/Liquid/Desugar710/DsBinds.hs
Haskell
bsd-3-clause
46,621
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Network.EasyBitcoin.BitcoinUnits ( btc , mBTC , satoshis , asBtc , asMbtc , asSatoshis , showAsBtc , showAsMbtc , showAsSatoshis , BTC() )where import Network.EasyBitcoin.NetworkParams import Network.EasyBitcoin.Internal.InstanciationHelpers import Contro...
vwwv/easy-bitcoin
Network/EasyBitcoin/BitcoinUnits.hs
Haskell
bsd-3-clause
2,212
module Tunagui.Widget.Component.Part ( ClickableArea (..) , mkClickableArea , TextContent (..) , mkTextContent ) where import Control.Monad (void) import Control.Monad.IO.Class (liftIO) import Control.Concurrent (forkIO) import Control.Concurrent.MVar import ...
masatoko/tunagui
src/Tunagui/Widget/Component/Part.hs
Haskell
bsd-3-clause
2,600
import Language.Mira.RegExpParser as Parser import Control.Monad import System.Environment main = liftM head getArgs >>= print . Parser.regex . Parser.lexer
AidanDelaney/Mira
src/examples/ParserExample.hs
Haskell
bsd-3-clause
158
{-# LANGUAGE ViewPatterns #-} module Lib ( someFunc , Point , LineSegment , distance , perpendicularDistance , splitAtMaxDistance , douglasPeucker ) where import Data.Sequence as D type Point = (Double,Double) type LineSegment = (Point,Point) distance :: Point -> Point -> D...
newmana/simplify
src/Lib.hs
Haskell
bsd-3-clause
2,067
import qualified Data.List is_int x = x == fromInteger (round x) calc_min_path :: Integer -> Integer -> Integer -> Double calc_min_path w l h = (sqrt . fromInteger . minimum) [ l^2 + (w+h)^2, w^2 + (l+h)^2, h^2 + (l+w)^2] calc_n_int_min_paths_up_to :: Integer -> Integer calc_n_int_min_paths_up_to m = ...
bgwines/project-euler
src/solved/problem86.hs
Haskell
bsd-3-clause
2,525
{-# LANGUAGE UnicodeSyntax #-} module Shake.It.Rust ( module Rust ) where import Shake.It.Rust.Cargo as Rust
Heather/Shake.it.off
src/Shake/It/Rust.hs
Haskell
bsd-3-clause
125
{-# LANGUAGE OverloadedLists #-} {-# LANGUAGE TemplateHaskell #-} module Test.Examples.IArraySpec ( spec ) where import Test.Hspec (Spec, describe, it) import Test.QuickCheck (NonNegative (..), Property, Small (..), property, (==>)) import Universum import Test.Ar...
Martoon-00/toy-compiler
test/Test/Examples/IArraySpec.hs
Haskell
bsd-3-clause
4,920
-- | -- Module : Crypto.Hash.MD2 -- License : BSD-style -- Maintainer : Vincent Hanquez <vincent@snarc.org> -- Stability : experimental -- Portability : unknown -- -- module containing the binding functions to work with the -- MD2 cryptographic hash. -- {-# LANGUAGE ForeignFunctionInterface #-} module Crypt...
nomeata/cryptonite
Crypto/Hash/MD2.hs
Haskell
bsd-3-clause
1,139
module LibrarySpec where import qualified Data.Matrix as Mx import qualified Data.Vector as Vec import Library import Test.Hspec suite :: SpecWith () suite = describe "Library" $ do it "compares 0.1 + 0.2 = 0.3" $ nearZero (0.3 - (0.1 + 0.2)) `shouldBe` True it "finds correct L∞ ...
hrsrashid/nummet
tests/LibrarySpec.hs
Haskell
bsd-3-clause
913
{-# LANGUAGE FlexibleInstances #-} {-| Module : $Header$ CopyRight : (c) 8c6794b6, 2011, 2012 License : BSD3 Maintainer : 8c6794b6@gmail.com Stability : experimental Portability : portable Benchmark for comparing FFT with repa-fftw to repa-algorithms. -} module Main where import Control.DeepSeq (NFData(...
8c6794b6/repa-fftw
exec/bench.hs
Haskell
bsd-3-clause
1,499
module CradleSpec where import Control.Applicative import Data.List (isSuffixOf) import Language.Haskell.GhcMod.Cradle import Language.Haskell.GhcMod.Types import System.Directory (canonicalizePath,getCurrentDirectory) import System.FilePath ((</>), pathSeparator) import Test.Hspec import Dir spec :: Spec spec = do ...
carlohamalainen/ghc-mod
test/CradleSpec.hs
Haskell
bsd-3-clause
2,487
-- | This module provides automatic differentiation for Quantities. {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} module Numeric.Units.Dimensional.AD (FAD, diff, Lift (lift), undim, todim) ...
bjornbm/dimensional-experimental
src/Numeric/Units/Dimensional/AD.hs
Haskell
bsd-3-clause
1,353
----------------------------------------------------------------------------- -- Kind: Kinds -- -- Part of `Typing Haskell in Haskell', version of November 23, 2000 -- Copyright (c) Mark P Jones and the Oregon Graduate Institute -- of Science and Technology, 1999-2000 -- -- This program is distributed as Free...
elben/typing-haskell-in-haskell
Kind.hs
Haskell
bsd-3-clause
1,053
{-# LANGUAGE Rank2Types, TypeFamilies, FlexibleContexts, UndecidableInstances #-} import Data.Reflection -- from reflection import Data.Monoid -- from base import Data.Proxy -- from tagged -- | Values in our dynamically constructed monoid over 'a' newtype M a s = M { runM :: a } deriving (Eq,Ord) -- | A dict...
ehird/reflection
examples/Monoid.hs
Haskell
bsd-3-clause
849
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} -- | Test interaction between parsing output and logstash module Logstash where import Control.Monad import Control.Monad.Logger import Control.Monad.Reader import qualified Data.Aeson as Aeson import quali...
nejla/nejla-common
tests/Logstash.hs
Haskell
bsd-3-clause
4,103
{-# LANGUAGE StandaloneDeriving,DeriveFunctor #-} module Main where import GameDSL hiding (Rule,Action) import qualified GameDSL as GameDSL (Rule,Action) import Graphics.Gloss import Control.Monad (guard) data Tag = Selected | Stone deriving instance Eq Tag deriving instance Ord Tag deriving instance Show Tag dat...
phischu/game-dsl
peg-solitaire/Main.hs
Haskell
bsd-3-clause
2,856
----------------------------------------------------------------------------- -- | -- Module : Control.Lens.Operators -- Copyright : (C) 2012-14 Edward Kmett -- License : BSD-style (see the file LICENSE) -- Maintainer : Edward Kmett <ekmett@gmail.com> -- Stability : experimental -- Portability : non...
hvr/lens
src/Control/Lens/Operators.hs
Haskell
bsd-3-clause
2,242
{-# LANGUAGE FlexibleInstances #-} -- Algorithm for tiling the diagram with diamond calissons. module Hexagrid.Tiling where import Control.Arrow (first, (&&&)) import Core.Function import Core.Math (l1dist) import Data.Color import Data.Entropy impo...
misterbeebee/calisson-hs
src/Hexagrid/Tiling.hs
Haskell
bsd-3-clause
11,889
module Main where import Control.Applicative import Control.Monad import qualified System.Environment import Path import Run import qualified Paths_runstaskell getBinDir :: IO (Path Bin) getBinDir = Path <$> Paths_runstaskell.getBinDir getProgName :: IO (Path ProgName) getP...
soenkehahn/runstaskell
src/Main.hs
Haskell
bsd-3-clause
532
#!/usr/bin/env stack -- stack runghc --package universum --package lens --package lens-aeson --package time --package cassava --package split --package text --package fmt --package directory --package filepath --package megaparsec {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE Multi...
input-output-hk/cardano-sl
scripts/analyze/logs.hs
Haskell
apache-2.0
5,696
module SubPatternIn1 where data T = C1 [Int] Int [Float] | C2 Int g :: Int -> T -> Int g z (C1 x b c) = case c of c@[] -> b c@(b_1 : b_2) -> b g z (C1 x b c) = b g z (C2 x) = x f :: [Int] -> Int f x@[] = (hd x) + (hd (tl x)) f x@((y : ys)) = (hd x) + (hd (tl x)) hd x = head x t...
mpickering/HaRe
old/testing/introCase/SubPatternIn1AST.hs
Haskell
bsd-3-clause
334
{-# LANGUAGE ScopedTypeVariables, TypeSynonymInstances, FlexibleInstances #-} -- |Binary serialization/deserialization utilities for types used in -- ROS messages. This module is used by generated code for .msg types. -- NOTE: The native byte ordering of the host is used to support the -- common scenario of same-machin...
bitemyapp/roshask
src/Ros/Internal/RosBinary.hs
Haskell
bsd-3-clause
4,152
module T15723A where {-# INLINE foo #-} foo :: Int -> Int foo x = {-# SCC foo1 #-} bar x {-# NOINLINE bar #-} bar :: Int -> Int bar x = x
sdiehl/ghc
testsuite/tests/codeGen/should_compile/T15723A.hs
Haskell
bsd-3-clause
140
{-# LANGUAGE CPP #-} module Vectorise.Utils.Base ( voidType , newLocalVVar , mkDataConTag, dataConTagZ , mkWrapType , mkClosureTypes , mkPReprType , mkPDataType, mkPDatasType , splitPrimTyCon , mkBuiltinCo , wrapNewTypeBodyOfWrap , unwrapNewTypeBodyOfWrap , wrapNewTypeBodyOfPDataWrap , unw...
spacekitteh/smcghc
compiler/vectorise/Vectorise/Utils/Base.hs
Haskell
bsd-3-clause
8,068
{-# LANGUAGE ImplicitParams, TypeSynonymInstances, FlexibleInstances, ConstrainedClassMethods #-} -- Similar to tc024, but cross module module TcRun025_B where import Data.List( sort ) -- This class has no tyvars in its class op context -- One uses a newtype, the other a data type cl...
ezyang/ghc
testsuite/tests/typecheck/should_run/TcRun025_B.hs
Haskell
bsd-3-clause
998
{-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fwarn-duplicate-exports #-} module T2436( C(..), T(..), module T2436a, S(..) ) where import T2436a class C a where data T a instance C Int where data T Int = TInt Int data instance S Int = SInt
snoyberg/ghc
testsuite/tests/rename/should_compile/T2436.hs
Haskell
bsd-3-clause
250
module T10233 where import T10233a( Constraint, Int )
urbanslug/ghc
testsuite/tests/module/T10233.hs
Haskell
bsd-3-clause
54
{-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -ddump-splices #-} module T3600 where import T3600a $(test)
siddhanathan/ghc
testsuite/tests/th/T3600.hs
Haskell
bsd-3-clause
109
module Language.Tiger.AST ( module AST) where import Language.Tiger.AST.Declaration as AST
zeling/tiger
src/Language/Tiger/AST.hs
Haskell
mit
99
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.SubtleCrypto (js_encrypt, encrypt, js_decrypt, decrypt, js_sign, sign, js_verify, verify, js_digest, digest, js_generateKey, generateKey, js_importKey, importKey, js_exportKey, exportKey, js...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/JSFFI/Generated/SubtleCrypto.hs
Haskell
mit
9,991
import Control.Monad filter' _ [] = [-1] filter' _ (_:xs) = xs main = do n <- readLn :: IO Int replicateM_ n $ do line <- getLine arrLine <- getLine let k = read (words line !! 1) :: Int let arr = map (\x -> read x :: Int) (words arrLine) putStrLn $ unwords (map show (filter' k arr))
ahavrylyuk/hackerrank
haskell/filter-elements.hs
Haskell
mit
312
{-# LANGUAGE GeneralizedNewtypeDeriving, TemplateHaskell #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE FlexibleInstances #-} module IRC.Types where import Control.Lens import CAH.Cards.Types import Data.Set (Set) import Data.Map (Map) import Data.Bimap (Bimap) im...
EXio4/ircah
src/IRC/Types.hs
Haskell
mit
6,577
{-# LANGUAGE TemplateHaskell , TypeFamilies, OverloadedStrings #-} module Main where import System.Environment import Generics.BiGUL.TH import GHC.Generics import Data.Aeson import Data.Text import Control.Applicative import Control.Monad import qualified Data.ByteString.Lazy as B import SourceModel import qualified ...
prl-tokyo/MAPE-knowledge-base
Haskell/Main.hs
Haskell
mit
6,424
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} module Main where import Data.Int (Int32) import Database.HDBC.PostgreSQL (Connection) import Database.HDBC.Session (handleSqlError', withConnectionIO) import HRR.Commands ...
charlydagos/haskell-sql-edsl-demo
code/hrr/src/Main.hs
Haskell
mit
3,975
import Data.Array.IArray import Data.Char import Data.Maybe import Data.List -------------------------------------------------------------------------------- data Cell = Value Int | Values (Array Int Bool) Int deriving Show isCellSet :: Cell -> Bool isCellSet (Value _) = True isCellSet (Values _ _) = ...
dpieroux/euler
0/0096_array.hs
Haskell
mit
5,755
module SyntaxParser where import LexicalParser import Text.Parsec import Text.Parsec.String import Data.List data CompilationUnit = PackageDecl TypeName | ImportDecls [ImportDecl] | TypeDecls [TypeDecl] deriving (Eq,Ord,Show) data ImportDecl = ImportDecl TypeName deriving (Eq,Ord,...
dimsuz/java-ast
src/SyntaxParser.hs
Haskell
mit
4,581
module FieldMarshal.Marshal where import qualified FieldMarshal.CSharp as CSharp import qualified FieldMarshal.Cpp as Cpp data MarshalType = MarshalDefault Cpp.Type CSharp.Type | MarshalAs Cpp.Type CSharp.Type UnmanagedType | MarshalWrap Cpp.Type CSharp.Type [CppTypeWrapper] | MarshalPlatform Cpp.Type CSharp...
scott-fleischman/field-marshal
FieldMarshal.Marshal.hs
Haskell
mit
793
module Handler.Frontend where import Import -- will redirect to login page if not authenticated getFrontendR :: [Text] -> Handler Html getFrontendR _ = do _ <- requireAuth defaultLayout $ do setTitle "happy scheduler" $(widgetFile "frontend")
frt/happyscheduler
Handler/Frontend.hs
Haskell
mit
269
module Data.NGH.Formats.FastQ ( fastQConduit , fastQparse , fastQread , fastQwrite ) where import Data.Word import qualified Data.ByteString as B import qualified Data.ByteString as S import qualified Data.ByteString.Char8 as S8 import qualified Data.ByteString.Lazy as L import qualified Data.ByteS...
luispedro/NGH
Data/NGH/Formats/FastQ.hs
Haskell
mit
1,996
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} module PresentDrop ( initialModel , update , view ) where import Control.Distributed.Process import Control.Lens (...
topliceanu/learn
elm/Cloud-Haskell-Game/server/src/PresentDrop.hs
Haskell
mit
5,315
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Preprocessor (PreprocessorState, preprocessProg, resolveExpr) where import Expr import Program import Control.Monad.State import Text.Printf (printf) import qualified Data.Map.Strict as Map type Offset = Int type ConstExprMap = Map.Map String Expr data Preprocess...
nyaxt/dmix
nkmd/as/Preprocessor.hs
Haskell
mit
2,042
module PlasmaCutter where import BasicTypes import LineSintaticScanner import BoolExprSintaticScanner extractCode :: [String] -> Environment -> [String] extractCode [] _ = [] extractCode (x:xs) env = extr ++ (extractCode xs newEnv) where extr = [snd $ extractLine (parseLine x) env] newEnv = fst $ extractLine (pa...
hephaestus-pl/hephaestus
willian/hephaestus-parser-only/PlasmaCutter.hs
Haskell
mit
1,212
import Data.List.Split type State = [[Int]] type Pos = (Int, Int) main :: IO () main = do print $ lightsOn $ iterate nextState (lightCorners initialState) !! 100 return () prettifyState :: State -> String prettifyState = concatMap ((++"\n") . show) lightsOn :: State -> Int lightsOn s = length $ filter (=...
Dr-Horv/Advent-of-code
day18/day18.hs
Haskell
mit
23,798
module Chapter5 where import Chapter4 (rjustify) -- 5.1.3 binom :: Int -> Int -> Int binom n k | n < 0 = 0 | k == 0 = 1 | otherwise = binom (n - 1) k + binom (n - 1) (k - 1) binomSum :: Int -> Int binomSum n = sum [binom n k | k <- [0..n]] pascal :: Int -> [[Int]] pascal x = [map (uncurry b...
futtetennista/IntroductionToFunctionalProgramming
itfp/src/Chapter5.hs
Haskell
mit
3,207
module Language.Tiny.Analysis.Grammar where data Program = Program [Declaration] deriving (Eq, Show) data Declaration = FunctionDeclaration Annotation String [Parameter] Block | VariableDeclaration Variable deriving (Eq, Show) data Variable = Variable Annotation String deriving (Eq, Show) data Paramet...
dmeysman/tiny-compiler
src/Language/Tiny/Analysis/Grammar.hs
Haskell
mit
1,505
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ec2fleet-tagrequest.html module Stratosphere.ResourceProperties.EC2EC2FleetTagRequest where import Strat...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/EC2EC2FleetTagRequest.hs
Haskell
mit
1,756
{-# LANGUAGE OverloadedStrings #-} {- Custom prettyprinter for JMacro AST - uses the jmacro prettyprinter for most of the work - fixme: need a better way to make a customized prettyprinter, without duplicating 5 cases -} module Gen2.Printer where import Data.Char (isAlpha, isDigit) i...
ghcjs/ghcjs
src/Gen2/Printer.hs
Haskell
mit
6,578
import Data.List import Data.Function import Control.Applicative import Control.Monad import Control.Arrow getGrid :: String -> IO [[Float]] getGrid filename = map (map read . filter ((>0) . length) . filter (',' `notElem`) . groupBy ((==) `on` (== ','))) . lines <$> readFile filename getMod3 :: Int -> [a] -> [a] get...
betaveros/probabilistic-poliwraths
mod3.hs
Haskell
mit
1,156
module WordNumber where import Data.List (intersperse, intercalate) digitToWord :: Int -> String digitToWord n | n == 1 = "one" | n == 2 = "two" | n == 3 = "three" | n == 4 = "four" | n == 5 = "five" | n == 6 = "six" | n == 7 = "seven" | n == 8 = "eight" | n == 9 = "nine" digits :: Int -> [Int] {- ...
Numberartificial/workflow
haskell-first-principles/haskell-from-first-principles-master/08/08.06.05-numbers-into-words.hs
Haskell
mit
781
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances #-} module Language.C.Obfuscate.CPS where import Data.Char import Data.List (nubBy) import Data.Maybe import qualified Data.Map as M import qualified Data.Set as S import qualified Language.C.Syntax.AST as AST import qualified Languag...
luzhuomi/cpp-obs
Language/C/Obfuscate/CPS.hs
Haskell
apache-2.0
92,814
module Main ( main ) where import Protolude import Test.Tasty (defaultMain, testGroup) import qualified Spake2 import qualified Groups import qualified Integration main :: IO () main = sequence tests >>= defaultMain . testGroup "Spake2" where tests = [ Spake2.tests , Groups.tests , Integ...
jml/haskell-spake2
tests/Tasty.hs
Haskell
apache-2.0
341
-- | Domain of terms. module Akarui.FOL.Domain where import Data.Set (Set) import Akarui.Parser import Text.Parsec import Text.Parsec.String (Parser) import qualified Data.Set as Set -- | Domain of variables and constants. data Domain = Any | Interval Double Double | Finite (Set String) -- | Parse a clause (...
PhDP/Manticore
Akarui/FOL/Domain.hs
Haskell
apache-2.0
763
module Reddit.Routes.Search where import Reddit.Types.Options import Reddit.Types.Post import Reddit.Types.Subreddit import qualified Reddit.Types.SearchOptions as Search import Data.Maybe import Data.Text (Text) import Network.API.Builder.Routes searchRoute :: Maybe SubredditName -> Options PostID -> Search.Order -...
intolerable/reddit
src/Reddit/Routes/Search.hs
Haskell
bsd-2-clause
723
{-# LANGUAGE FlexibleContexts #-} module Application.DiagramDrawer.Coroutine where import Control.Monad.Coroutine import Control.Monad.State import Control.Monad.Coroutine.SuspensionFunctors import Data.IORef import Application.DiagramDrawer.Type bouncecallback :: IORef (Await DiagramEvent (Iteratee DiagramEvent Di...
wavewave/diagdrawer
lib/Application/DiagramDrawer/Coroutine.hs
Haskell
bsd-2-clause
852
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QFileInfo.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:31 Warning : this file is machine generated - do not...
keera-studios/hsQt
Qtc/Core/QFileInfo.hs
Haskell
bsd-2-clause
15,873
module Main (main) where import Paths_eclogues_impl (getDataFileName) import Language.Haskell.HLint (hlint) import System.Exit (exitFailure, exitSuccess) paths :: [String] paths = [ "app" , "test" ] arguments :: IO [String] arguments = go <$> getDataFileName "HLint.hints" where go p = ("--hint=" ++...
futufeld/eclogues
eclogues-impl/test/HLint.hs
Haskell
bsd-3-clause
442
module Database.Riak ( M.RiakException(..), M.VClock(..), M.BucketName(..), M.Key(..), M.ClientId(..), M.Quorum(..), B.Riak, B.Basic(..), B.Pong(..), B.ping, B.getClientId, B.setClientId, B.getServerInfo, B.get, B.put, B.delete, B.listBuckets, B.listKeys, B.getBucket, B.setBucket, B.mapReduce, B.i...
iand675/hiker
Database/Riak.hs
Haskell
bsd-3-clause
9,059
{-# LANGUAGE TypeFamilies #-} -- | Number representations that are not part of the grammar. -- -- To convert these types to 'Penny.Decimal.Decimal' and the like, -- functions are available in "Penny.Copper.Decopperize". module Penny.Rep where import qualified Control.Lens as Lens import qualified Control.Lens.Extras a...
massysett/penny
penny/lib/Penny/Rep.hs
Haskell
bsd-3-clause
10,925
test_disassembler :: IO () test_disassembler = let table = [ (Mov (Register 12) (Register 14), "\xce\x2c"), (Cli, "\xf8\x94"), (Sei, "\x78\x94"), (Clc, "\x88\x94"), (Clh, "\xd8\x94"), (Cln, "\xa8\x94"), (Cls, "\xc8\x94"), (Clv, "\xb8\x94"), (Clz,...
MichaelBurge/stockfighter-jailbreak
test/Spec.hs
Haskell
bsd-3-clause
3,047
{-# LANGUAGE MagicHash #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE DisambiguateRecordFields, NamedFieldPuns #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE ViewPatterns #-...
pepeiborra/bytestring-xml
src/Text/Xml/Tiny/Internal.hs
Haskell
bsd-3-clause
6,677
module FP.Pretty.HTML where import FP.Prelude import FP.Pretty.Color import FP.Pretty.Pretty htmlFGCode :: Color -> 𝕊 -> 𝕊 htmlFGCode c s = "<span style='color:" ⧺ (htmlColorFrom256 #! c) ⧺ "'>" ⧺ s ⧺ "</span>" htmlBGCode :: Color -> 𝕊 -> 𝕊 htmlBGCode c s = "<span style='background-color:" ⧺ (htmlColorFrom256 #!...
davdar/darailude
src/FP/Pretty/HTML.hs
Haskell
bsd-3-clause
7,055
module GL.Types ( V2FL, V3FL, Coor2(..), Coor3(..), fromDegrees ) where import Graphics.Rendering.OpenGL as GL type V2FL = Vertex2 GLfloat type V3FL = Vertex3 GLfloat data Coor2 = D2 {x,y::GLfloat} deriving Show data Coor3 = D3 {xx,yy,zz::GLfloat} deriving (Show) fromDegr...
xruzzz/ax-fp-gl-haskell
src/GL/Types.hs
Haskell
bsd-3-clause
346
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE ScopedTypeVariables #-} module ZM.Types ( module Data.Model.Types ,...
tittoassini/typed
src/ZM/Types.hs
Haskell
bsd-3-clause
9,975
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE Undecida...
ku-fpg/sunroof-active
Language/Sunroof/Active.hs
Haskell
bsd-3-clause
4,089
module More.MonadTs where import Control.Monad.Trans.Class import Control.Monad.Trans.Reader import Control.Monad.Trans.State import Control.Monad.Trans.Maybe import Control.Monad.Identity import Control.Monad.IO.Class import Control.Monad rDec :: Num a => Reader a a rDec = ReaderT $ return . ((+) (-1)) rShow :: Sho...
stites/composition
src/MoreReaderT.hs
Haskell
bsd-3-clause
1,133
-- 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/Time/PT/Rules.hs
Haskell
bsd-3-clause
40,248
----------------------------------------------------------------------------- -- -- GHCi Interactive debugging commands -- -- Pepe Iborra (supported by Google SoC) 2006 -- -- ToDo: lots of violation of layering here. This module should -- decide whether it is above the GHC API (import GHC and nothing -- else) or belo...
ekmett/ghc
compiler/ghci/Debugger.hs
Haskell
bsd-3-clause
9,338
{-# LANGUAGE MultiParamTypeClasses, GeneralizedNewtypeDeriving #-} {-# LANGUAGE FlexibleInstances, UndecidableInstances, Rank2Types #-} module Control.Monad.Launcher ( Launcher , setVersion, checkVersion , withThreadIdDo, putThreadId, clunkTag , withFileDo, withoutFileDo, putFile, clunkFile ) where ...
Elemir/network-ninep
src/Control/Monad/Launcher.hs
Haskell
bsd-3-clause
2,446
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE MagicHash #-} module Blip.Interpreter.HashTable.IntArray ( IntArray , Elem , elemMask , primWordToElem , elemToInt , elemToInt# , newArray , readArray , writeArray , length , toPtr ) where -----------------------------...
bjpop/blip
blipinterpreter/src/Blip/Interpreter/HashTable/IntArray.hs
Haskell
bsd-3-clause
3,680
{-| Module : Idris.IBC Description : Core representations and code to generate IBC files. Copyright : License : BSD3 Maintainer : The Idris Community. -} {-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-} {-# OPTIONS_GHC -fwarn-incomplete-patterns #-} module Idris.IBC (loadIBC, loadPkgIndex, ...
markuspf/Idris-dev
src/Idris/IBC.hs
Haskell
bsd-3-clause
102,813
{-# LANGUAGE DeriveDataTypeable #-} module Latex ( texString , writeTexStdOut , writeTexToFile , writeTemplateToFile ) where import Data.List import System.IO import System.Directory import System.FilePath.Posix import Args import Lib texString :: Arguments -> String texString (Install {}) = error "Cannot f...
bkushigian/makeltx
src/Latex.hs
Haskell
bsd-3-clause
2,932
{-# LANGUAGE MultiParamTypeClasses, FlexibleContexts, FlexibleInstances, TypeFamilies, Rank2Types, FunctionalDependencies #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Matrix.Banded.Base -- Copyright : Copyright (c) , Pa...
patperry/hs-linear-algebra
lib/Data/Matrix/Banded/Base.hs
Haskell
bsd-3-clause
37,697
-------------------------------------------------------------------------------- -- | -- Module : Test.Connection -- Copyright : (C) 2017 Yorick Laupa -- License : (see the file LICENSE) -- -- Maintainer : Yorick Laupa <yo.eight@gmail.com> -- Stability : provisional -- Portability : non-portable -- --------------------...
YoEight/eventstore
tests/Test/Connection.hs
Haskell
bsd-3-clause
1,708
-- 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. ------------------...
rfranek/duckling
Duckling/Ranking/Classifiers/RO.hs
Haskell
bsd-3-clause
14,669
module Main where import File import Git main :: IO () main = do pullFilesToDisk addCommitPush "Feeling hard working today!"
gaoyuan/CodeThief
src/Main.hs
Haskell
bsd-3-clause
131
{-# LANGUAGE TemplateHaskell, RankNTypes, ScopedTypeVariables #-} {-# LANGUAGE ViewPatterns, DeriveGeneric #-} -- | This analysis identifies the addRef and decRef functions for a library, -- along with the set of types that is reference counted. This analysis is -- unsound and incomplete, but still useful. -- -- It fi...
travitch/foreign-inference
src/Foreign/Inference/Analysis/RefCount.hs
Haskell
bsd-3-clause
24,835
{-# LANGUAGE OverloadedStrings #-} module Juno.Monitoring.EkgSnap ( startServer ) where import Control.Exception (throwIO) import Control.Monad.IO.Class (liftIO) import qualified Data.ByteString as S import qualified Data.ByteString.Char8 as S8 import Data.Function (on) import qualified Data.HashMap.Strict as...
buckie/juno
src/Juno/Monitoring/EkgSnap.hs
Haskell
bsd-3-clause
5,304
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE LambdaCase #-} module Pusher where import Network.Google.Logging.Types import Data.Scientific (fromFloatDigits) import Data.Bifunctor (second) import Data.Bits (shiftR, xor, (.&.)) import Data.Word (Word32) import GHC.Int (Int32, Int64) i...
dp-cylme/labourer
src/Pusher.hs
Haskell
bsd-3-clause
8,865
{-# LANGUAGE OverloadedStrings #-} {- | Module : Network.MPD.Applicative.ClientToClient Copyright : (c) Joachim Fasting 2013 License : MIT Maintainer : joachim.fasting@gmail.com Stability : stable Portability : unportable Client to client communication. -} module Network.MPD.Applicative.ClientToClient...
beni55/libmpd-haskell
src/Network/MPD/Applicative/ClientToClient.hs
Haskell
mit
2,070
import qualified Data.Map as Map import qualified Protein as P -- | The prefix spectrum of a weighted string is the collection of all its -- prefix weights. Given a list L of n (n≤100) positive real numbers, -- return a protein string of length n−1 whose prefix spectrum is equal to L. -- -- Notes: -- If multiple solu...
mitochon/hoosalind
src/problems/spec.hs
Haskell
mit
1,153
yes = [(foo bar)]
bitemyapp/apply-refact
tests/examples/Bracket10.hs
Haskell
bsd-3-clause
17
{-# LANGUAGE Unsafe #-} {-# LANGUAGE ExistentialQuantification, NoImplicitPrelude #-} module GHC.Event.Internal ( -- * Event back end Backend , backend , delete , poll , modifyFd , modifyFdOnce -- * Event type , Event , evtRead , evtWrite , evtClose , eventIs ...
sdiehl/ghc
libraries/base/GHC/Event/Internal.hs
Haskell
bsd-3-clause
6,918
module Docs.AST where import qualified Data.Map as Map import qualified Elm.Compiler.Type as Type import qualified Reporting.Annotation as A -- FULL DOCUMENTATION data Docs t = Docs { comment :: String , aliases :: Map.Map String (A.Located Alias) , types :: Map.Map String (A.Located Union) , value...
pairyo/elm-compiler
src/Docs/AST.hs
Haskell
bsd-3-clause
848
module Fail2 where f = let g xs = map (+1) xs in g list where list = [1,1,2,3,4]
kmate/HaRe
old/testing/letToWhere/Fail2_TokOut.hs
Haskell
bsd-3-clause
101
{-# htermination addListToFM_C :: (b -> b -> b) -> FiniteMap Char b -> [(Char,b)] -> FiniteMap Char b #-} import FiniteMap
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/FiniteMap_addListToFM_C_3.hs
Haskell
mit
123
module Text.ParserCombinators.TagWiki where import Control.Applicative hiding ( many, (<|>) ) import Data.List import Text.ParserCombinators.Parsec class Parseable a where parser :: GenParser Char st a -- Parses and reads one or more digits number :: GenParser Char st Int number = read <$> many1 digit real :: (R...
Soares/tagwiki
src/Text/ParserCombinators/TagWiki.hs
Haskell
mit
2,500
module Y2018.M08.D15.Exercise where {-- Today we have a list of the top 5000 English language words (by frequency) from https://www.wordfrequency.info. We are going to parse this file and answer a question. --} import Prelude hiding (Word) import Data.Array import Data.Map -- below modules available via 1HaskellADay...
geophf/1HaskellADay
exercises/HAD/Y2018/M08/D15/Exercise.hs
Haskell
mit
1,475
{-# LANGUAGE Rank2Types #-} module Battle ( ix, ixM, ixIM, BattleState(..), Board (Board), Tactic, TacticList, addTactic, runBoard, player, enemy, turn, tacticList, battleState, module Character ) where import Control.Arrow import Control.Monad.State import Data.List import qualified Da...
myuon/OoP
src/Battle.hs
Haskell
mit
3,968
{-# LANGUAGE OverloadedStrings #-} module BigTable.TypeOfHtml where import Criterion.Main (Benchmark, bench, nf) import Data.Text.Lazy (Text) import Html import Weigh (Weigh, func) -- | Render the argument matrix as an HTML table. -- bigTable :: [[Int]] -- ^ Matrix. ...
TransportEngineering/nice-html
benchmarks/BigTable/TypeOfHtml.hs
Haskell
mit
1,874
-- a program for testing the alignment algorithm {-# LANGUAGE OverloadedStrings #-} import System.Environment import Data.Text as ST import Data.Text.IO as STIO import Data.Text.Lazy as LT import FastA import Alignment import NucModel import PWMModel import Align smallprob = 0.0001 scale = 1000 main = do [mod, s...
tjunier/mlgsc
src/alntoy.hs
Haskell
mit
583
{-# LANGUAGE NoImplicitPrelude #-} module Nix ( module Nix.Expr, module Nix.Parser, module Nix.LicenseType ) where import Nix.Common import Nix.Expr import Nix.Parser import Nix.LicenseType
adnelson/simple-nix
src/Nix.hs
Haskell
mit
205
{-# LANGUAGE Arrows, TupleSections #-} module Server.Simulation( mainWire ) where import Control.DeepSeq import Core import Data.Text (Text) import FRP.Netwire import Prelude hiding (id, (.)) import Server.Game.Player import Server.Game.World mainWire :: GameMonad (GameWire () ()) mainWire = do logInfo ...
NCrashed/sinister
src/server/Server/Simulation.hs
Haskell
mit
1,030
module BankAccount ( BankAccount , closeAccount , getBalance , incrementBalance , openAccount ) where import Control.Concurrent.STM (TVar, atomically, modifyTVar, newTVarIO, readTVarIO, writeTVar) data BankAccount = BankAccount { balance :: TVar (Maybe Integer) } openAccount :: IO BankAccount openAccount = do st...
tfausak/exercism-solutions
haskell/bank-account/BankAccount.hs
Haskell
mit
781
{-# OPTIONS -Wall #-} import Helpers.Grid (Grid, (!)) import qualified Helpers.Grid as Grid main :: IO () main = do heightMap <- Grid.fromDigits <$> getContents let lowestPoints = findLowestPoints heightMap print $ sum $ map succ lowestPoints findLowestPoints :: Grid Int -> [Int] findLowestPoints heightMap = ...
SamirTalwar/advent-of-code
2021/AOC_09_1.hs
Haskell
mit
495
-- | Specification for the exercises of Chapter 2. module Chapter02Spec where import Chapter02 (myInit, myInit', myLast, myLast') import Test.Hspec (Spec, describe, it) import Test.QuickCheck (Property, property, (==>)) checkLastDef :: ([Int] -> Int) -> Property checkLastDef ...
EindhovenHaskellMeetup/meetup
courses/programming-in-haskell/pih-exercises/test/Chapter02Spec.hs
Haskell
mit
886