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
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE DeriveGeneric #-} module Models.ComicList (ComicList(..)) where import BasicPrelude import Data.Aeson (FromJSON(..), ToJSON(..)) import GHC.Generics (Generic) import Models.ComicSummary (ComicSummary) data ComicList = ComicList { available :: Int , items :: [Comi...
nicolashery/example-marvel-haskell
Models/ComicList.hs
Haskell
mit
414
module Language.UHC.JScript.Assorted where import Language.UHC.JScript.ECMA.String import Language.UHC.JScript.Types import Language.UHC.JScript.Primitives alert :: String -> IO () alert = _alert . toJS foreign import js "alert(%*)" _alert :: JSString -> IO ()
kjgorman/melchior
Language/UHC/JScript/Assorted.hs
Haskell
mit
266
module Settings.Packages.Cabal where import GHC import Expression cabalPackageArgs :: Args cabalPackageArgs = package cabal ? -- Cabal is a rather large library and quite slow to compile. Moreover, we -- build it for stage0 only so we can link ghc-pkg against it, so there is -- little reason to spend the ...
izgzhen/hadrian
src/Settings/Packages/Cabal.hs
Haskell
mit
380
module Language.Brainfuck.Py2Bf.Bfprim ( Bfprim (..) , isBfprimNonIO , isBfWhile , BfState , runPrim , runPrimIO ) where import Data.Word (Word8) import Data.Functor ((<$>)) import Codec.Binary.UTF8.String (decode, encode) data Bfprim = BfIncr | BfDecr | BfNext | BfPr...
itchyny/py2bf.hs
Language/Brainfuck/Py2Bf/Bfprim.hs
Haskell
mit
4,210
module Control.Flower.Functor ( module Control.Flower.Functor.Lazy, module Control.Flower.Functor.Strict ) where import Control.Flower.Functor.Lazy import Control.Flower.Functor.Strict
expede/flower
src/Control/Flower/Functor.hs
Haskell
mit
190
module Chattp.Relay.Config where import System.Environment (getEnv, lookupEnv) import qualified Data.ByteString.Lazy.Char8 as BS data Family = Inet | Unix deriving (Show,Eq) data RelayConfig = RelayConfig { publishHost :: String, publishPort :: Int, publishBasePath :: String, publishChanIdParam :: S...
Spheniscida/cHaTTP
mesg-relay/Chattp/Relay/Config.hs
Haskell
mit
2,842
{-# LANGUAGE TemplateHaskell #-} module Parser where import Control.Monad import Control.Monad.State import Control.Lens import Data.List import Data.Map as M hiding (map) type RuleName = String type RulePair = (RuleName, Pattern) type RuleMap = M.Map RuleName Pattern data RepTime = RTInt Integer -- n-times ...
shouya/gximemo
GxiMemo/Parser.hs
Haskell
mit
5,934
module Hitly.Map ( appMap, mkMap, atomicIO, newLink, getLink, getAndTickCounter ) where import BasePrelude hiding (insert, lookup, delete) import Control.Monad.IO.Class import STMContainers.Map import Hitly.Types appMap :: STM AppMap appMap = new mkMap :: MonadIO m => m AppMap mkMap = liftIO $ atomi...
buckie/hitly
src/Hitly/Map.hs
Haskell
mit
1,044
{-# OPTIONS_GHC -Wall -} {- - Module to parse .emod files - - - Copyright 2013 -- name removed for blind review, all rights reserved! Please push a git request to receive author's name! -- - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the Lice...
DatePaper616/code
EParser.hs
Haskell
apache-2.0
13,249
-- | Schedule program for execution. At the moment it schedule for -- exact number of threads module DNA.Compiler.Scheduler where import Control.Monad import Data.Graph.Inductive.Graph import qualified Data.IntMap as IntMap import Data.IntMap ((!)) import DNA.AST import DNA.Actor import DNA.Compiler.Type...
SKA-ScienceDataProcessor/RC
MS1/dna/DNA/Compiler/Scheduler.hs
Haskell
apache-2.0
2,911
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TemplateHaskell #-} ---------------------------------------------------------------------------- -- | -- Module : Web.Skroutz.Model.Base.SkuReview -- Copyright : (c) 2016 Remous-Aris Kout...
ariskou/skroutz-haskell-api
src/Web/Skroutz/Model/Base/SkuReview.hs
Haskell
apache-2.0
1,492
----------------------------------------------------------------------------- -- -- Module : Graphics.UI.Hieroglyph.Cache -- Copyright : -- License : BSD3 -- -- Maintainer : J.R. Heard -- Stability : -- Portability : -- -- | -- ---------------------------------------------------------------------------...
JeffHeard/Hieroglyph
Graphics/UI/Hieroglyph/Cache.hs
Haskell
bsd-2-clause
3,561
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QGradient.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:16 Warning : this file is machine generated - do not...
keera-studios/hsQt
Qtc/Gui/QGradient.hs
Haskell
bsd-2-clause
3,662
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QUdpSocket_h.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 ...
uduki/hsQt
Qtc/Network/QUdpSocket_h.hs
Haskell
bsd-2-clause
38,699
module Data.Drasil.Concepts.PhysicalProperties where import Language.Drasil import Utils.Drasil import Data.Drasil.Concepts.Documentation (material_, property) import Data.Drasil.Concepts.Math (centre) physicalcon :: [ConceptChunk] physicalcon = [gaseous, liquid, solid, ctrOfMass, density, specWeight, mass, len, d...
JacquesCarette/literate-scientific-software
code/drasil-data/Data/Drasil/Concepts/PhysicalProperties.hs
Haskell
bsd-2-clause
1,681
{-# LANGUAGE OverloadedStrings #-} module Network.WebSockets.Protocol.Hybi10.Internal ( Hybi10_ (..) , encodeFrameHybi10 ) where import Control.Applicative (pure, (<$>)) import Data.Bits ((.&.), (.|.)) import Data.Maybe (maybeToList) import Data.Monoid (mempty, mappend, mconcat) import Data.Attoparsec (an...
0xfaded/websockets
src/Network/WebSockets/Protocol/Hybi10/Internal.hs
Haskell
bsd-3-clause
5,497
module Hchain.Client (start) where import qualified Control.Distributed.Backend.P2P as P2P import Control.Distributed.Process as DP import Control.Distributed.Process.Node as DPN import Data.Binary import Data.Typeable import ...
jesuspc/hchain
src/hchain/Client.hs
Haskell
bsd-3-clause
1,163
-- | A module that implements a dictionary/hash table module Text.Regex.Deriv.Dictionary where import qualified Data.IntMap as IM import Data.Char import Prelude hiding (all, words) class Key a where hash :: a -> [Int] instance Key Int where hash i = [i] instance Key Char where hash c = [(ord c)] in...
awalterschulze/xhaskell-regex-deriv
Text/Regex/Deriv/Dictionary.hs
Haskell
bsd-3-clause
4,562
module Publish where import Control.Monad.Error.Class (throwError) import qualified Data.Maybe as Maybe import qualified Bump import qualified Catalog import qualified CommandLine.Helpers as Cmd import qualified Docs import qualified Elm.Docs as Docs import qualified Elm.Package.Description as Desc import qualified E...
laszlopandy/elm-package
src/Publish.hs
Haskell
bsd-3-clause
3,146
module Algebra.Structures.PID ( module Algebra.Structures.UFD , PID(..) ) where import Algebra.Structures.UFD class UFD a => PID a
Alex128/abstract-math
src/Algebra/Structures/PID.hs
Haskell
bsd-3-clause
148
{- Find things that are unsafe <TEST> {-# NOINLINE entries #-}; entries = unsafePerformIO newIO entries = unsafePerformIO Multimap.newIO -- {-# NOINLINE entries #-} ; entries = unsafePerformIO Multimap.newIO entries = unsafePerformIO $ f y where foo = 1 -- {-# NOINLINE entries #-} ; entries = unsafePerformIO $ f ...
ndmitchell/hlint
src/Hint/Unsafe.hs
Haskell
bsd-3-clause
3,600
module Hhhhoard.Creds ( userEmail , userPassword) where userEmail :: String; userEmail = "example@gmail.com" userPassword :: String; userPassword = "password"
yan/hhhhoard
Hhhhoard/Creds.hs
Haskell
bsd-3-clause
168
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.Raw.EXT.DebugLabel -- Copyright : (c) Sven Panne 2015 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : portable -- -...
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/EXT/DebugLabel.hs
Haskell
bsd-3-clause
923
-- The Timber compiler <timber-lang.org> -- -- Copyright 2008-2009 Johan Nordlander <nordland@csee.ltu.se> -- 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 sour...
UBMLtonGroup/timberc
src/Lexer.hs
Haskell
bsd-3-clause
18,665
{-# LANGUAGE CPP, TypeFamilies, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts, UndecidableInstances #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Monad.Array.Class -- Copyright : (C) 2011 Edward Kmett -- License : BSD-style (see the...
ekmett/monadic-arrays
Control/Monad/Array/Class.hs
Haskell
bsd-3-clause
7,851
{-# LANGUAGE CPP #-} module Language.Sh.Glob ( expandGlob, matchPattern, removePrefix, removeSuffix ) where import Control.Monad.Trans ( MonadIO, liftIO ) import Control.Monad.State ( runState, put ) import Data.Char ( ord, chr ) import Data.List ( isPrefixOf, partition ) import Data.Maybe ( ...
MgaMPKAy/language-sh
Language/Sh/Glob.hs
Haskell
bsd-3-clause
8,582
-- {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeOperators #-} -- we are deriving Monoid instance for Config type -- {-# OPTIONS_GHC -fno-warn-missing-methods #-} module System.EtCetera.Redis.V2_8 ...
paluh/et-cetera
src/System/EtCetera/Redis/V2_8.hs
Haskell
bsd-3-clause
17,130
{-# OPTIONS_GHC -fno-warn-name-shadowing #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TupleSections #-} module DFAMin (minimizeDFA) where import AbsSyn import Data.Map (Map) import qualified Data.Map as Map import Data.IntSet (IntSet) import qualified Data.IntSet ...
simonmar/alex
src/DFAMin.hs
Haskell
bsd-3-clause
8,226
module Main where eight = 1 + ( 2 * 2 ) + 3
YoshikuniJujo/toyhaskell_haskell
examples/eight.hs
Haskell
bsd-3-clause
45
{-# language CPP #-} -- | = Name -- -- VK_GOOGLE_surfaceless_query - instance extension -- -- == VK_GOOGLE_surfaceless_query -- -- [__Name String__] -- @VK_GOOGLE_surfaceless_query@ -- -- [__Extension Type__] -- Instance extension -- -- [__Registered Extension Number__] -- 434 -- -- [__Revision__] -- 1 ...
expipiplus1/vulkan
src/Vulkan/Extensions/VK_GOOGLE_surfaceless_query.hs
Haskell
bsd-3-clause
3,978
module Language.Asdf.Lexer ( symbol , parens , brackets , natural , naturalOrFloat , rational , stringLiteral , operator ...
sw17ch/Asdf
src/Language/Asdf/Lexer.hs
Haskell
bsd-3-clause
2,688
module Main where fibs = 0 : 1 : zipWith (+) fibs (tail fibs) fib 0 = 0 fib 1 = 1 fib n = fib (n-1) + fib (n-2) f :: Int -> Int f x = if fib 100 > 10 then f (x + 1) else 0 main :: IO () main = if fib 10 == fibs !! 10 then putStrLn "Yay!" else putStrLn "Boo!"
yav/sequent-core
examples/Example.hs
Haskell
bsd-3-clause
264
module NestedIO where import Data.Time.Calendar import Data.Time.Clock import System.Random huehue :: IO (Either (IO Int) (IO ())) huehue = do t <- getCurrentTime let (_, _, dayOfMonth) = toGregorian (utctDay t) case even dayOfMonth of True -> return $ Left randomIO False -> return $ Right (putStrLn "no...
chengzh2008/hpffp
src/ch29-IO/nestedIO.hs
Haskell
bsd-3-clause
385
{-| Module : $Header$ Description : Adapter for communicating with Slack via its real time messaging API Copyright : (c) Justus Adam, 2016 License : BSD3 Maintainer : dev@justus.science Stability : experimental Portability : POSIX See http://marvin.readthedocs.io/en/latest/adapters.html#real-time-messagi...
JustusAdam/marvin
src/Marvin/Adapter/Slack/RTM.hs
Haskell
bsd-3-clause
5,717
{-#LANGUAGE ScopedTypeVariables, NoImplicitPrelude#-} module Base ( -- Classes Eq (..), Ord (..), Bounded (..), Num (..), Real (..), Integral (..), Fractional (..), Floating (..), RealFrac (..), RealFloat (..), Enum (..), Funct...
rodrigogribeiro/mptc
src/Libs/Base.hs
Haskell
bsd-3-clause
50,296
-- | -- Scalpel is a web scraping library inspired by libraries like parsec and -- Perl's <http://search.cpan.org/~miyagawa/Web-Scraper-0.38/ Web::Scraper>. -- Scalpel builds on top of "Text.HTML.TagSoup" to provide a declarative and -- monadic interface. -- -- There are two general mechanisms provided by this library ...
sulami/scalpel
src/Text/HTML/Scalpel.hs
Haskell
apache-2.0
5,333
module L01.Validation.Tests where import Test.Framework import Test.Framework.Providers.QuickCheck2 (testProperty) import L01.Validation import Test.QuickCheck import Test.QuickCheck.Function instance Arbitrary a => Arbitrary (Validation a) where arbitrary = fmap (either Error Value) arbitrary main :: IO ()...
juretta/course
test/src/L01/Validation/Tests.hs
Haskell
bsd-3-clause
1,117
{-# LANGUAGE Haskell2010, CPP, Rank2Types, DeriveDataTypeable, StandaloneDeriving #-} {-# LINE 1 "lib/Data/Time/Clock/UTC.hs" #-} {-# OPTIONS -fno-warn-unused-imports #-} {-# LANGUAGE Trustworthy #-} -- #hide module Data.Time.Clock.UTC ( -- * UTC -- | UTC is time...
phischu/fragnix
tests/packages/scotty/Data.Time.Clock.UTC.hs
Haskell
bsd-3-clause
4,906
{-# OPTIONS_HADDOCK hide #-} {-# LANGUAGE CPP, UndecidableInstances, ParallelListComp #-} -- Undeciable instances only need for derived Show instance #include "fusion-phases.h" -- | Parallel array types and the PR class that works on the generic -- representation of array data. module Data.Array.Parallel.PArray.PDat...
mainland/dph
dph-lifted-vseg/Data/Array/Parallel/PArray/PData/Base.hs
Haskell
bsd-3-clause
10,584
{-# LANGUAGE Haskell98 #-} {-# LINE 1 "Control/Applicative/Lift.hs" #-} {-# LANGUAGE CPP #-} {-# LANGUAGE Safe #-} {-# LANGUAGE AutoDeriveTypeable #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Applicative.Li...
phischu/fragnix
tests/packages/scotty/Control.Applicative.Lift.hs
Haskell
bsd-3-clause
5,157
-- Thanks to Bryan O'Sullivan for this test case. -- hexpat will spawn zillions of threads (which is seen as huge virtual memory -- usage in top). This is now fixed in 0.19.1. import Control.Concurrent import Control.Monad import qualified Data.ByteString as B import Text.XML.Expat.Tree import System.Environment mai...
the-real-blackh/hexpat
test/hexpat-leak/Parse.hs
Haskell
bsd-3-clause
727
{-# LANGUAGE FlexibleInstances, UndecidableInstances, GADTs #-} module Bind(Fresh(..),Freshen(..),Swap(..),Name,Perm ,Bind,bind ,swapM, swapsM, swapsMf ,M,runM ,unsafeUnBind,reset,name1,name2,name3,name4,name5,name2Int,integer2Name) where import Control.Monad.Fix(MonadFix(.....
cartazio/omega
src/Bind.hs
Haskell
bsd-3-clause
4,137
{- main = 1; {-# ANN module ("HLint: ignore Use camelCase" :: String) #-} main = 1; {-# ANN module (1 + (2)) #-} -} module Comment00006 where
charleso/intellij-haskforce
tests/gold/parser/Comment00006.hs
Haskell
apache-2.0
143
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...
JoeyEremondi/elm-summer-opt
src/Docs/AST.hs
Haskell
bsd-3-clause
850
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1993-1998 -} {-# LANGUAGE CPP #-} module IfaceSyn ( module IfaceType, IfaceDecl(..), IfaceFamTyConFlav(..), IfaceClassOp(..), IfaceAT(..), IfaceConDecl(..), IfaceConDecls(..), IfaceEqSpec, IfaceExpr(...
wxwxwwxxx/ghc
compiler/iface/IfaceSyn.hs
Haskell
bsd-3-clause
71,979
module A4 where import B4 import C4 import D4 main :: (Tree Int) -> Bool main t = isSameOrNot (sumSquares (fringe t)) ((sumSquares (B4.myFringe t)) + (sumSquares (C4.myFringe t)))
kmate/HaRe
old/testing/renaming/A4_AstOut.hs
Haskell
bsd-3-clause
197
module SPARC.AddrMode ( AddrMode(..), addrOffset ) where import GhcPrelude import SPARC.Imm import SPARC.Base import Reg -- addressing modes ------------------------------------------------------------ -- | Represents a memory address in an instruction. -- Being a RISC machine, the SPARC addr...
ezyang/ghc
compiler/nativeGen/SPARC/AddrMode.hs
Haskell
bsd-3-clause
1,120
{-# OPTIONS -fwarn-incomplete-patterns #-} -- Test for incomplete-pattern warnings -- None should cause a warning module ShouldCompile where -- These ones gave bogus warnings in 6.2 data D = D1 { f1 :: Int } | D2 -- Use pattern matching in the argument f :: D -> D f d1@(D1 {f1 = n}) = d1 { f1 = f1 d1 + n } -- War...
urbanslug/ghc
testsuite/tests/deSugar/should_compile/ds059.hs
Haskell
bsd-3-clause
778
{-# LANGUAGE OverloadedStrings #-} module Cirrus.Deploy (runDeploy) where import Cirrus.Encode (encode) import Control.Exception.Lens (catching_) import Control.Lens ((&), (?~), (.~)) import Control.Monad (void) import Data.ByteString.Lazy (toStrict) import Data.Text.Encoding (decodeUtf8) import Data.Text (Text) impo...
ags/cirrus
src/Cirrus/Deploy.hs
Haskell
mit
1,101
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Protop.Logic.Builder ( M , evalM' , evalM , popM , lftM , objM , morM , prfM , lamSM , sgmSM , varM , lamM , appM , sgmM ) where import qualified Control.Monad.Identity a...
brunjlar/protop
src/Protop/Logic/Builder.hs
Haskell
mit
1,983
module LasmConverter where import Control.Monad.State import Data.Map hiding (map, foldr) import Prelude hiding (lookup) import Debug.Trace import AbsLasm import AbsJavalette --Environment monad data LEnv = Env Integer Integer Integer [Context] Context type EnvState = State LEnv data Pointer = Val Integer | Ref Int...
davidsundelius/JLC
src/LasmConverter.hs
Haskell
mit
21,425
-- | A data type representing the game map at a particular frame, and functions that operate on it. module Hlt.GameMap where import qualified Data.Either as Either import qualified Data.Maybe as Maybe import qualified Data.Map as Map import Hlt.Entity -- | A GameMap contains the current frame of a Halite game. data G...
HaliteChallenge/Halite-II
airesources/Haskell/Hlt/GameMap.hs
Haskell
mit
1,567
{- Problem 19 You are given the following information, but you may prefer to do some research for yourself. 1 Jan 1900 was a Monday. Thirty days has September, April, June and November. All the rest have thirty-one, Saving February alone, Which has twenty-eight, rain or shine. And on lea...
RossMeikleham/Project-Euler-Haskell
19.hs
Haskell
mit
1,266
{-# LANGUAGE ScopedTypeVariables #-} module Main where import Sound.PortAudio.Base import Sound.PortAudio import qualified Sound.File.Sndfile as SF import qualified Sound.File.Sndfile.Buffer as BSF import qualified Sound.File.Sndfile.Buffer.Vector as VSF import Data.List (transpose) import qualified Data.Vector as ...
sw17ch/portaudio
examples/Example3.hs
Haskell
mit
6,545
import Samba import System.Process (createProcess, shell) import Control.Monad (when) main = do putStrLn $ unlines [ "################################################################" , "Instructions: " , "" , "Firstly, ensure your smb.conf have this section:" , "[homes]" , " comment = Hom...
felipexpert/sambaHaskell
defineSambaUser.hs
Haskell
mit
1,353
module Main where import Barcode import System.Environment import qualified Data.Vector as V import qualified Data.List as DL main :: IO () main = do -- get input arg [inFile, maxSnps'] <- getArgs >>= return . take 2 let maxSnps = read maxSnps' :: Int samples <- parseBarcode inFile let samples' = uniq...
ndaniels/strain-assay-minimization
Main.hs
Haskell
mit
788
------------- --LIBRARIES-- ------------- import Graphics.UI.WXCore import GUI_Player import GUI_Cpu ----------- --METHODS-- ----------- main :: IO() main = do putStrLn "Enter game mode (player or cpu): " gameMode <- getLine case gameMode of "player" -> run createPlayerWindow "cpu" -> run c...
BrunoAltadill/Bloxorz_2D
code/Main.hs
Haskell
mit
372
#!/usr/bin/env runhaskell {-# LANGUAGE FlexibleInstances #-} import Control.Monad.Reader hiding (when) import Data.Decimal import qualified Data.List as L hiding (and) import DSL import FinancialArithmetic import Models import Graphics.EasyPlot ------------------------------------------------------------------...
AlexanderAA/haskell-contract-valuation
Examples.hs
Haskell
mit
2,230
-- -- This code was created by Jeff Molofee '99 (ported to Haskell GHC 2005) -- module Main where import qualified Graphics.UI.GLFW as GLFW -- everything from here starts with gl or GL import Graphics.Rendering.OpenGL.Raw import Graphics.Rendering.GLU.Raw ( gluPerspective ) import Data.Bits ( (.|.) ) import System.Ex...
spetz911/progames
nehe-tuts-master/lesson04.hs
Haskell
mit
3,972
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} module Network.Network ( Network(..) ) where import Network.Layer import Numeric.LinearAlgebra import System.Random -- | A network is c...
mckeankylej/hwRecog
Network/Network.hs
Haskell
mit
490
module Data.IntSet.Data where import qualified Data.IntSet as I isetTo :: Int -> I.IntSet isetTo n = I.fromList [1..n] iset1 :: I.IntSet iset1 = isetTo 10 iset2 :: I.IntSet iset2 = isetTo 20 iset3 :: I.IntSet iset3 = isetTo 30 iset4 :: I.IntSet iset4 = isetTo 40 iset5 :: I.IntSet iset5 = isetTo 50
athanclark/sets
bench/Data/IntSet/Data.hs
Haskell
mit
307
import Criterion.Main import Control.DeepSeq import qualified Data.Maybe as B import qualified MapMaybe as F main = do rnf ints `seq` return () defaultMain [ bgroup "simple" [ bench "base" $ nf (B.mapMaybe half) ints , bench "fold" $ nf (F.mapMaybe half) ints ] , bgroup "after map" ...
takano-akio/mapmaybe-benchmarks
main.hs
Haskell
cc0-1.0
928
{-# LANGUAGE OverloadedStrings, CPP #-} module FormStructure.Chapter7 (ch7Roles) where #ifndef __HASTE__ --import Data.Text.Lazy (pack) #endif import FormEngine.FormItem import FormStructure.Common ch7Roles :: FormItem ch7Roles = Chapter { chDescriptor = defaultFIDescriptor { iLabel ...
DataStewardshipPortal/ds-elixir-cz
FormStructure/Chapter7.hs
Haskell
apache-2.0
3,323
import Data.Matrix (matrix, inverse, nrows, multStd, toList) import Data.Ratio ((%)) recursionMatrix n integerSequence = matrix n n (\(i,j) -> integerSequence !! (i + j - 2) % 1) solutionMatrix n integerSequence = matrix n 1 (\(i,_) -> integerSequence !! (i + n - 1) % 1) targetInverse integerSequence = (case biggestI...
peterokagey/haskellOEIS
src/Sandbox/RecursionFinder.hs
Haskell
apache-2.0
984
import Data.Char (toUpper) main :: IO Bool main = putStrLn "Is green your favorite color?" >> getLine >>= (\input -> return ((toUpper . head $ input) == 'Y'))
EricYT/Haskell
src/real_haskell/chapter-7/return1.hs
Haskell
apache-2.0
174
module Data.GitParser (module Data.GitParser.Parser ,module Data.GitParser.Types ,module Data.GitParser.Repo) where import Data.GitParser.Repo import Data.GitParser.Types import Data.GitParser.Parser
jamessanders/gitparser
src/Data/GitParser.hs
Haskell
bsd-2-clause
212
-- -- Copyright (c) 2013, Carl Joachim Svenn -- 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...
karamellpelle/MEnv
source/Game/Run/Iteration.hs
Haskell
bsd-2-clause
3,701
{-# LANGUAGE OverloadedStrings #-} module Main where import Data.Text (pack, strip) import STC main :: IO () main = do token <- readFile "telegram.token" telegramBotServer . strip $ pack token
EleDiaz/StoryTellerChat
app/Main.hs
Haskell
bsd-3-clause
220
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GL.Antialiasing -- Copyright : (c) Sven Panne 2002-2005 -- License : BSD-style (see the file libraries/OpenGL/LICENSE) -- -- Maintainer : sven.panne@aedion.de -- Stability : pr...
FranklinChen/hugs98-plus-Sep2006
packages/OpenGL/Graphics/Rendering/OpenGL/GL/Antialiasing.hs
Haskell
bsd-3-clause
1,563
{-# LANGUAGE TypeOperators #-} -- | -- Module : Data.OI.IO -- Copyright : (c) Nobuo Yamashita 2011-2016 -- License : BSD3 -- Author : Nobuo Yamashita -- Maintainer : nobsun@sampou.org -- Stability : experimental -- module Data.OI.IO ( -- * Interaction enable to handle I/O error (:~>) -- * I/...
nobsun/oi
src/Data/OI/IO.hs
Haskell
bsd-3-clause
1,278
{-# LANGUAGE UnicodeSyntax #-} module DB.Create where import Database.HDBC (run, commit) import DB.Base createDb ∷ FilePath → IO () createDb dbName = do conn ← connect dbName run conn ("CREATE TABLE IF NOT EXISTS tags " ++ "(id INTEGER PRIMARY KEY," ++ ...
marklar/TagFS
src/DB/Create.hs
Haskell
bsd-3-clause
1,115
{-# LANGUAGE FlexibleContexts #-} module DataAnalysis04 where import Data.Convertible (Convertible) import Data.List (genericIndex, genericLength, genericTake) import Database.HDBC (SqlValue, disconnect, fromSql, quickQuery') import Database.HDBC.Sqlite3 (connectSqlite3) import DataAnalysis02 (average) readSqlColum...
mrordinaire/data-analysis
src/DataAnalysis04.hs
Haskell
bsd-3-clause
2,145
module Graphics.UI.Font ( module Graphics.UI.Font.TextureAtlas , module Graphics.UI.Font.TextureFont , module Graphics.UI.Font.TextureGlyph , module Graphics.UI.Font.Markup , module Graphics.UI.Font.FontManager ) where import Graphics.UI.Font.TextureAtlas import Graphics.UI.Font.TextureFont impo...
christiaanb/glfont
src/Graphics/UI/Font.hs
Haskell
bsd-3-clause
423
{-# LANGUAGE ForeignFunctionInterface, CPP #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.Raw.EXT.DirectStateAccess -- Copyright : (c) Sven Panne 2013 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> --...
mfpi/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/EXT/DirectStateAccess.hs
Haskell
bsd-3-clause
34,735
module Plots ( -- * Core Library -- | Definitions of bounds, axis scale, orientation, -- legend, generic plot ,plot spec and so on. module Plots.Types -- | Definitions of theme, plots style, common themes, -- marker shapes, colour maps and sample maps. , module Plots.Themes -- * API ...
bergey/plots
src/Plots.hs
Haskell
bsd-3-clause
2,909
module Diag.Util.Timer where import System.CPUTime import Text.Printf timeItMsg :: String -> IO a -> IO a timeItMsg msg ioa = do t1 <- getCPUTime a <- ioa t2 <- getCPUTime let t :: Double t = fromIntegral (t2-t1) * 1e-12 printf "CPU time for %s: %6.5fs\n" msg t return a
marcmo/hsDiagnosis
src/Diag/Util/Timer.hs
Haskell
bsd-3-clause
293
module Ivory.Language.Sint where import Ivory.Language.BoundedInteger import Ivory.Language.Type import qualified Ivory.Language.Syntax as I import Data.Int (Int8,Int16,Int32,Int64) -- Signed Types ---------------------------------------------------------------- -- | 8-bit integers. newtype Sint8 = Sint8 { getSint8...
GaloisInc/ivory
ivory/src/Ivory/Language/Sint.hs
Haskell
bsd-3-clause
2,936
{-# LANGUAGE FlexibleContexts, NoMonomorphismRestriction, ViewPatterns, FlexibleInstances #-} module Language.Lisk.Parser where import Data.List import Data.Either import Control.Monad.Reader import Control.Monad.Error import Control.Arrow import Control.Applicative import Control.Monad.Identity import Da...
aculich/lisk
src/Language/Lisk/Parser.hs
Haskell
bsd-3-clause
6,812
module Chap7Arith4 where --id :: a -> a --id x = x roundTrip :: (Show a, Read a) => a -> a roundTrip a = read (show a) -- 5. roundTrip' :: (Show a, Read a) => a -> a roundTrip' = read . show -- 6. -- Probably not be what the exercise is looking for roundTrip'' :: (Show a, Read b, Integral b) => a -> b roundTrip'...
tkasu/haskellbook-adventure
app/Chap7Arith4.hs
Haskell
bsd-3-clause
431
import Test.Hspec import System.Directory import Lib main :: IO () main = hspec $ do describe "Foo" $ do it "Return a foo file" $ do m res <- doesFileExist "foo" res `shouldBe` True
lpaulmp/shake-ansible
test/Spec.hs
Haskell
bsd-3-clause
208
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -} {-# LANGUAGE CPP #-} module VarSet ( -- * Var, Id and TyVar set types VarSet, IdSet, TyVarSet, CoVarSet, TyCoVarSet, -- ** Manipulating these sets emptyVarSet, unitVarSet, mkVarSet, ...
vikraman/ghc
compiler/basicTypes/VarSet.hs
Haskell
bsd-3-clause
11,246
module System.Win32.DHCP.SUBNET_ELEMENT_INFO_ARRAY_V4 ( SUBNET_ELEMENT_INFO_ARRAY_V4 (..) , infoArray ) where import System.Win32.DHCP.DhcpStructure import System.Win32.DHCP.LengthBuffer import System.Win32.DHCP.SUBNET_ELEMENT_DATA_V4 -- typedef struct _DHCP_SUBNET_ELEMENT_INFO_ARRAY_V4 { -- DWORD ...
mikesteele81/Win32-dhcp-server
src/System/Win32/DHCP/SUBNET_ELEMENT_INFO_ARRAY_V4.hs
Haskell
bsd-3-clause
883
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE RankNTypes #-} module Text.Markdown ( -- * Functions markdown -- * Settings , MarkdownSettings , msXssProtect , msStandaloneHtml , msFencedHandlers , msBlockCodeRenderer , msLinkNewTab ...
thefalconfeat/markdown
Text/Markdown.hs
Haskell
bsd-3-clause
6,541
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="ko-KR"> <title>Tips and Tricks | ZAP Extension</title> <maps> <homeID>top</homeID> <ma...
veggiespam/zap-extensions
addOns/tips/src/main/javahelp/org/zaproxy/zap/extension/tips/resources/help_ko_KR/helpset_ko_KR.hs
Haskell
apache-2.0
977
{-# OPTIONS_GHC -fno-implicit-prelude #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.Dotnet -- Copyright : (c) sof, 2003 -- License : see libraries/base/LICENSE -- -- Maintainer : cvs-ghc@haskell.org -- Stability : internal -- Portability : no...
FranklinChen/hugs98-plus-Sep2006
packages/base/GHC/Dotnet.hs
Haskell
bsd-3-clause
1,819
-- | -- Module : Crypto.ConstructHash.MiyaguchiPreneel -- License : BSD-style -- Maintainer : Kei Hibino <ex8k.hibino@gmail.com> -- Stability : experimental -- Portability : unknown -- -- Provide the hash function construction method from block cipher -- <https://en.wikipedia.org/wiki/One-way_compression_fu...
vincenthz/cryptonite
Crypto/ConstructHash/MiyaguchiPreneel.hs
Haskell
bsd-3-clause
2,286
module Control.Concurrent.Timer.Types ( Timer(..) , TimerImmutable(..) ) where ------------------------------------------------------------------------------ import Control.Concurrent (ThreadId) import Control.Concurrent.MVar (MVar) import Control.Concurrent.Suspend (Delay) ---...
Palmik/timers
src/Control/Concurrent/Timer/Types.hs
Haskell
bsd-3-clause
938
-- | -- Module: Network.FastIRC.Users -- Copyright: (c) 2010 Ertugrul Soeylemez -- License: BSD3 -- Maintainer: Ertugrul Soeylemez <es@ertes.de> -- Stability: alpha -- -- This module includes parsers for IRC users. module Network.FastIRC.Users ( UserSpec(..), userIsServer, showUserSpec, userPars...
chrisdone/hulk
fastirc-0.2.0/Network/FastIRC/Users.hs
Haskell
bsd-3-clause
1,522
{-# LANGUAGE DeriveFunctor #-} module Distribution.Solver.Modular.Flag ( FInfo(..) , Flag , FlagInfo , FN(..) , QFN , QSN , SN(..) , WeakOrTrivial(..) , mkFlag , showFBool , showQFN , showQFNBool , showQSN , showQSNBool ) where import Data.Map as M import Pre...
kolmodin/cabal
cabal-install/Distribution/Solver/Modular/Flag.hs
Haskell
bsd-3-clause
2,796
{-# LANGUAGE CPP, MagicHash, UnboxedTuples #-} {-# LANGUAGE FlexibleInstances #-} {-# OPTIONS_GHC -O -funbox-strict-fields #-} -- We always optimise this, otherwise performance of a non-optimised -- compiler is severely affected -- -- (c) The University of Glasgow 2002-2006 -- -- Binary I/O library, with special twea...
AlexanderPankiv/ghc
compiler/utils/Binary.hs
Haskell
bsd-3-clause
29,290
{-# LANGUAGE CPP #-} #if __GLASGOW_HASKELL__ {-# LANGUAGE MagicHash #-} #endif #if !defined(TESTING) && __GLASGOW_HASKELL__ >= 703 {-# LANGUAGE Trustworthy #-} #endif ----------------------------------------------------------------------------- -- | -- Module : Data.BitUtil -- Copyright : (c) Clark Gaebel 2012...
ariep/psqueues
src/Data/BitUtil.hs
Haskell
bsd-3-clause
2,071
yes = mapMaybe id
mpickering/hlint-refactor
tests/examples/Default72.hs
Haskell
bsd-3-clause
17
<?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-CS"> <title>Encode/Decode/Hash Add-on</title> <maps> <homeID>encoder</homeID> <mapre...
thc202/zap-extensions
addOns/encoder/src/main/javahelp/org/zaproxy/addon/encoder/resources/help_sr_CS/helpset_sr_CS.hs
Haskell
apache-2.0
974
module Options.Phases where import Types phaseOptions :: [Flag] phaseOptions = [ flag { flagName = "-F" , flagDescription = "Enable the use of a :ref:`pre-processor <pre-processor>` "++ "(set with ``-pgmF``)" , flagType = DynamicFlag } , flag { flagName = "-E" ...
ml9951/ghc
utils/mkUserGuidePart/Options/Phases.hs
Haskell
bsd-3-clause
1,021
{-# LANGUAGE Unsafe #-} {-# LANGUAGE NoImplicitPrelude #-} ----------------------------------------------------------------------------- -- | -- Module : Foreign.ForeignPtr -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : ...
lukexi/ghc
libraries/base/Foreign/ForeignPtr.hs
Haskell
bsd-3-clause
1,306
{-# LANGUAGE FunctionalDependencies, PolyKinds, FlexibleInstances #-} module T10570 where import Data.Proxy class ConsByIdx2 x a m cls | x -> m where consByIdx2 :: x -> a -> m cls instance ConsByIdx2 Int a Proxy cls where consByIdx2 _ _ = Proxy
urbanslug/ghc
testsuite/tests/polykinds/T10570.hs
Haskell
bsd-3-clause
257
{-# LANGUAGE NamedWildCards, ScopedTypeVariables #-} module WildcardsInPatternAndExprSig where bar (Just ([x :: _a] :: _) :: Maybe [_b]) (z :: _c) = [x, z] :: [_d]
urbanslug/ghc
testsuite/tests/partial-sigs/should_fail/WildcardsInPatternAndExprSig.hs
Haskell
bsd-3-clause
165
{-# LANGUAGE UnicodeSyntax #-} module Pixs.Operations.PointOperations where import Pixs.Information.Histogram (colorCount) import Codec.Picture (Image, PixelRGBA8(..), pixelAt, generateImage, ...
ayberkt/pixs
src/Pixs/Operations/PointOperations.hs
Haskell
mit
2,041
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} module LDAP.Classy.Types where import Control...
benkolera/haskell-ldap-classy
LDAP/Classy/Types.hs
Haskell
mit
689
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE CPP #-} -- | Various utilities used in the scaffolded site. module Yesod.Default.Util ( addStaticContentExternal , globFile , widgetFileNoReload , widgetFileReload , TemplateLanguage (..) , defaultTemplateLanguages ...
tolysz/yesod
yesod/Yesod/Default/Util.hs
Haskell
mit
5,460