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
{- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section[RnExpr]{Renaming of expressions} Basically dependency analysis. Handles @Match@, @GRHSs@, @HsExpr@, and @Qualifier@ datatypes. In general, all of these functions return a renamed thing, and a set of free variables. -} {-# LANGUAGE CPP #-} {-# LA...
sgillespie/ghc
compiler/rename/RnExpr.hs
Haskell
bsd-3-clause
79,391
-- Copyright (c) 2016-present, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. module Duckling.Time.ES.Tests ( tests ) where import Data.String import Prelude import Test.Tasty import Duck...
facebookincubator/duckling
tests/Duckling/Time/ES/Tests.hs
Haskell
bsd-3-clause
541
{-# LANGUAGE TemplateHaskell #-} -- | The @bounds@ element of a OSM file. module Data.Geo.OSM.Bounds ( Bounds , bounds ) where import Text.XML.HXT.Arrow.Pickle import Data.Geo.OSM.Lens.MinlatL import Data.Geo.OSM.Lens.MaxlatL import Data.Geo.OSM.Lens.MinlonL import Data.Geo.OSM.Lens.MaxlonL import Data.Geo.OSM.Lens....
tonymorris/geo-osm
src/Data/Geo/OSM/Bounds.hs
Haskell
bsd-3-clause
1,715
-- | Test standard RandomGen interface of Random123-backed generators. module TestTypeclasses (test_typeclasses) where import Data.Word import Test.Framework (testGroup) import Test.Framework.Providers.QuickCheck2 (testProperty) import System.Random.Random123.Types test_li1x32_bijection initial = initial == mapped...
fjarri/haskell-random123
test/TestTypeclasses.hs
Haskell
bsd-3-clause
4,086
{-# LANGUAGE QuasiQuotes #-} import LiquidHaskell import Language.Haskell.Liquid.Prelude [lq| data Pair a b <p :: x0:a -> x1:b -> Prop> = P (x :: a) (y :: b<p x>) |] data Pair a b = P a b [lq| mkP :: forall a <q :: y0:a -> y1:a -> Prop>. x: a -> y: a<q x> -> Pair <q> a a |] mkP :: a -> a -> Pair a a mkP x y = P...
spinda/liquidhaskell
tests/gsoc15/unknown/pos/deptupW.hs
Haskell
bsd-3-clause
493
{-# OPTIONS -fno-cse #-} {- From happstack-server License BSD3 Author Happstack team, HAppS LLC -} module Happstack.Server.Internal.Clock ( getApproximateTime , getApproximatePOSIXTime , getApproximateUTCTime , formatHttpDate ) where import Control.Applicative ((<$>)) import Control.Concurrent...
aslatter/happstack-wai
src/Happstack/Server/Internal/Clock.hs
Haskell
bsd-3-clause
1,835
{-# LANGUAGE OverloadedStrings #-} -- | A bunch of type classes representing common values shared between multiple -- CSS properties, like `Auto`, `Inherit`, `None`, `Normal` and several more. -- -- All the common value type classes have an instance for the Value type, -- making them easily derivable for custom value ...
bergmark/clay
src/Clay/Common.hs
Haskell
bsd-3-clause
1,643
{-# LANGUAGE OverloadedStrings #-} module Dalvik.AccessFlags ( AccessFlag(..) , AccessFlags , AccessType(..) , flagCode , codeFlag , flagString , flagsString , hasAccessFlag ) where import Data.Bits import Data.List import Data.Monoid import Data.String import Data.Word import Text.Printf import Pre...
travitch/dalvik
src/Dalvik/AccessFlags.hs
Haskell
bsd-3-clause
3,856
{-# LANGUAGE Arrows #-} module HN.MainPage where import HN.Parsing data SParse = Title String String | Info String deriving Show doc' = readDocument opts "../newest.html" nn = doc' /> hasName "html" /> hasName "body" /> hasName "center" /> hasName "table" /> hasName "tr" /> hasName "td" /> hasName "table" />...
llelf/hn
HN/MainPage.hs
Haskell
bsd-3-clause
879
-- | Some text utility functions. module Text where import Text.Regex.Posix import Data.Char nameOkay :: String -> Bool nameOkay = (=~ "^[-'a-zA-Z]{3,16}$") notEmpty :: String -> Bool notEmpty = not . all isSpace trim :: String -> String trim = f . f where f = reverse . dropWhile isSpace type MatchRes = (String, S...
MedeaMelana/custard
Text.hs
Haskell
bsd-3-clause
1,361
module Spec.Enum where import Data.Int(Int32) -- TODO: Parse the XML comments into here data Enum = Enum { eName :: String , eNamespace :: Maybe String , eExpand :: Maybe String , eComment :: Maybe String , eElements :: [EnumElement] ...
oldmanmike/vulkan
generate/src/Spec/Enum.hs
Haskell
bsd-3-clause
554
module Crawl where import Network.Browser( browse, setCookies, request) import Network.HTTP( rspBody, getRequest, rspBody, mkRequest, RequestMethod(..), ...
RayRacine/hs-word2vec
Crawl.hs
Haskell
bsd-3-clause
5,561
{-# LANGUAGE TemplateHaskell #-} module Main where import Test.Framework.Providers.HUnit import Test.Framework.Providers.QuickCheck2 import Test.Framework.TH import Test.HUnit --import Test.QuickCheck.Modifiers main :: IO () main = $(defaultMainGenerator) type Pro...
j-rock/4hire
tests/Tests.hs
Haskell
mit
436
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeOperators #-} modu...
qmuli/qmuli
library/Qi/Program/Lambda/Lang.hs
Haskell
mit
973
{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-missing-methods #-} {-# OPTIONS_GHC -fno-warn-incomplete-patterns #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module SubHask.Algebra.Array ( BArray (..) , UArray (..) , Unboxable ) where import Control.Monad import Control.Monad.Primitive import Data.Pr...
Drezil/subhask
src/SubHask/Algebra/Array.hs
Haskell
bsd-3-clause
18,638
import Control.Blub import Control.Monad f :: Int -> Int f = (+ 3)
jystic/hsimport
tests/goldenFiles/ModuleTest11.hs
Haskell
bsd-3-clause
67
{-# LANGUAGE Haskell2010 #-} {-# LINE 1 "Control/Concurrent/STM/TSem.hs" #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Concurrent.STM.TSem -- Copyright : (c) The University of Glasgow 2012 -- License : BSD-style (see the file libraries/base/LICE...
phischu/fragnix
tests/packages/scotty/Control.Concurrent.STM.TSem.hs
Haskell
bsd-3-clause
1,769
{-# LANGUAGE Haskell98 #-} {-# LINE 1 "Network/Wai/Handler/Warp/Date.hs" #-} {-# LANGUAGE CPP #-} module Network.Wai.Handler.Warp.Date ( withDateCache , GMTDate ) where import Control.AutoUpda...
phischu/fragnix
tests/packages/scotty/Network.Wai.Handler.Warp.Date.hs
Haskell
bsd-3-clause
953
{-# LANGUAGE CPP #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE DeriveDataTypeable #-} -- | Provides functionality for runtime Hamlet templates. Please use -- "Text.Hamlet.Runtime" instead. module Text.Hamlet.RT ( -- * Public API Ham...
fgaray/shakespeare
Text/Hamlet/RT.hs
Haskell
mit
8,307
{-# LANGUAGE PatternSignatures #-} module Test10255 where import Data.Maybe fob (f :: (Maybe t -> Int)) = undefined
christiaanb/ghc
testsuite/tests/ghc-api/annotations/Test10255.hs
Haskell
bsd-3-clause
120
{-# LANGUAGE StandaloneKindSignatures #-} {-# LANGUAGE TypeFamilies, GADTs, PolyKinds, DataKinds, ExplicitForAll #-} -- See also: saks007_fail.hs module SAKS_007 where import Data.Kind (Type, Constraint) type family F a where { F Type = True; F _ = False } type family G a where { G Type = False; G _ = True } type X...
sdiehl/ghc
testsuite/tests/saks/should_compile/saks007.hs
Haskell
bsd-3-clause
495
<?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>Server-Sent Events Add-on</title> <maps> <homeID>sse.introduction</homeID> ...
kingthorin/zap-extensions
addOns/sse/src/main/javahelp/org/zaproxy/zap/extension/sse/resources/help_ko_KR/helpset_ko_KR.hs
Haskell
apache-2.0
983
import Test.Cabal.Prelude main = cabalTest $ do -- Don't run this test unless the GHC is sufficiently recent -- to not ship boot old-time/old-locale skipUnless =<< ghcVersionIs (>= mkVersion [7,11]) -- Don't run this test on GHC 8.2, which ships with Cabal 2.0, -- which is not eligible for old-style...
mydaum/cabal
cabal-testsuite/PackageTests/NewBuild/T4375/cabal.test.hs
Haskell
bsd-3-clause
499
module Interp (runInterp) where import GenUtils import DataTypes import InterpUtils import Parser (pgnLexer) runInterp :: AbsGame -> RealGame runInterp (Game tags toks) = Game tags (pgnInterp toks initParState) initParState = (FirstBoard startBoard) type Par a = StoreBoard -> a thenP :: Par a -> (a ...
shlevy/ghc
testsuite/tests/programs/andy_cherry/Interp.hs
Haskell
bsd-3-clause
8,294
{-# LANGUAGE DeriveDataTypeable #-} module CostCentre ( CostCentre(..), CcName, IsCafCC(..), -- All abstract except to friend: ParseIface.y CostCentreStack, CollectedCCs, noCCS, currentCCS, dontCareCCS, noCCSAttached, isCurrentCCS, maybeSingletonCCS, ...
wxwxwwxxx/ghc
compiler/profiling/CostCentre.hs
Haskell
bsd-3-clause
10,877
module Trit (Trit, rationalToTrit, getIntegral, getFraction, getFraction', neg, addTrits, subTrits, shiftLeft, shiftRight, multiply ) where import Stream import Utilities import Data.Ratio type Mantissa = Stream type Fraction = Stream type Trit = (Mantissa, Fraction) -- Convert from a Rational number to its...
ghc-android/ghc
testsuite/tests/concurrent/prog001/Trit.hs
Haskell
bsd-3-clause
2,483
module HAD.Y2014.M03.D03.Exercise where import Data.List import Data.Function -- | Sort a list of list of elements by the maximum of each list, -- in ascending order -- -- Point-free: easy and readable -- Level: EASY -- -- Examples: -- >>> sortByMax [[1,10],[5,5]] -- [[5,5],[1,10]] -- >>> sortByMax [] -- [] -- -- so...
smwhr/1HAD
exercises/HAD/Y2014/M03/D03/Exercise.hs
Haskell
mit
472
{- | Module : MainWindow.hs Description : . Maintainer : Kelvin Glaß, Chritoph Graebnitz, Kristin Knorr, Nicolas Lehmann (c) License : MIT Stability : experimental The MainWindow-module depicts the main window of the editor. -} module MainWindow ( create ) where -- imports ...
SWP-Ubau-SoSe2014-Haskell/SWPSoSe14
src/RailEditor/MainWindow.hs
Haskell
mit
3,260
module Main where size :: [t] -> Integer size [] = 0 size (h:t) = 1 + size t
henryaddison/7-lang-7-weeks
week7-haskell/1/lists.hs
Haskell
mit
83
-- The information used in this module was pulled from the @Wikipedia article -- about ISO_3166-2:US@: <https://en.wikipedia.org/wiki/ISO_3166-2:US>. {-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE ...
acamino/state-codes
src/Data/StateCodes/ISO31662US.hs
Haskell
mit
12,401
module Handler.Home where import Init getHomeR :: Handler Html getHomeR = defaultLayout $ do setTitle "SomeBlog" -- change src URIs in production addStylesheetRemote "//rawgithub.com/mkrull/yesod-ember-skel/master/static/css/normalize.css" addStylesheetRemote "//rawgithub.com/mkrull/yesod-ember-s...
mkrull/yesod-ember-skel
src/Handler/Home.hs
Haskell
mit
984
import Test.DocTest main = doctest ["-isrc", "src/Data/ByteString/Read.hs"]
philopon/bytestring-read
tests/doctest.hs
Haskell
mit
76
{-# LANGUAGE CPP #-} -- | Various utilities pertaining to searching for files & directories. module Language.Haskell.GhcOpts.Utils where import Control.Exception import System.Process import Data.Char (isSpace) import System.FilePath import System.Directory getDirectoryContentsIfExists :: FilePath -> IO [FilePath]...
ranjitjhala/ghc-options
src/Language/Haskell/GhcOpts/Utils.hs
Haskell
mit
2,400
module Handler.ExampleXML where import Assets (getAllExams) import Import import Widgets (titleWidget, iconWidget, publicExamWidget, privateExamWidget) -- | Displays valid example XML getExampleXMLR :: Handler Html getExampleXMLR = do setUltDestCurrent memail <- lookupSession "_ID" (publicExams...
cirquit/quizlearner
quizlearner/Handler/ExampleXML.hs
Haskell
mit
4,316
-- Rock Paper Scissors! -- http://www.codewars.com/kata/5672a98bdbdd995fad00000f/ module Codewars.RockPaperScissors where rps :: String -> String -> String rps p1 p2 | p1 == p2 = "Draw!" | (p1, p2) `elem` [("rock", "scissors"), ("paper", "rock"), ("scissors", "paper")] = "Player 1 won!" | otherwis...
gafiatulin/codewars
src/8 kyu/RockPaperScissors.hs
Haskell
mit
340
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-app-datasource.html module Stratosphere.ResourceProperties.OpsWorksAppDataSource where import Strat...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/OpsWorksAppDataSource.hs
Haskell
mit
2,258
maximum' :: (Ord a) => [a] -> a maximum' [] = error "maximum of empty list" maximum' [x] = x maximum' (x:xs) | x > maxTail = x | otherwise = maxTail where maxTail = maximum' xs replicate' :: (Num i, Ord i)=> i -> a -> [a] replicate' n x | n <= 0 = [] | otherwise = x:replicate' (n-1) x take' :: ...
axnion/playground
random/haskell/recursion.hs
Haskell
mit
1,017
module Main where import System.IO import System.Process import Data.List main :: IO () main = do files <- readProcess "ls" ["Player"] [] let players = (takeWhile (/='.')) <$> lines files putStrLn ("Players registerd:\n\n" ++ unlines players) writeFile "Players.hs" (preamble ++ unlines (imported <$> play...
8Gitbrix/gomoku
src/MakePlayers.hs
Haskell
mit
841
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafregional-xssmatchset-fieldtomatch.html module Stratosphere.ResourceProperties.WAFRegionalXssMatchSetFieldT...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/WAFRegionalXssMatchSetFieldToMatch.hs
Haskell
mit
2,174
{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-missing-import-lists #-} {-# OPTIONS_GHC -fno-warn-implicit-prelude #-} module Paths_isogram ( version, getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir, getDataFileName, getSysconfDir ) where import qualified Control.Exception as Exception impo...
c19/Exercism-Haskell
isogram/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/autogen/Paths_isogram.hs
Haskell
mit
2,356
{- Copyright (C) 2012 Kacper Bak <http://gsd.uwaterloo.ca> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge,...
juodaspaulius/bclafer_old
src/Language/Clafer/Version.hs
Haskell
mit
1,152
double x = x + x quadruple x = double x + double x factorial n = product [1..n] average ns = sum ns `div` length ns
codingSteve/fp101x
20151019/test.hs
Haskell
cc0-1.0
131
{- | Module : Bio.Motions.Common Description : Common utility functions for working with common types. License : Apache Stability : experimental Portability : unportable -} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts...
Motions/motions
src/Bio/Motions/Common.hs
Haskell
apache-2.0
3,047
<?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="sl-SI"> <title>HTTPS Info Add-on</title> <maps> <homeID>httpsinfo</homeID> <mapref loca...
secdec/zap-extensions
addOns/httpsInfo/src/main/javahelp/org/zaproxy/zap/extension/httpsinfo/resources/help_sl_SI/helpset_sl_SI.hs
Haskell
apache-2.0
968
{- Scene.hs - Heirarchical Scene Description - - Timothy A. Chagnon - CS 636 - Spring 2009 -} module Scene where import Color import Math import Ray import Primitive import Mesh data Scene = Scene { outfile :: String, width :: Int, height :: Int, camera :: Came...
tchagnon/cs636-raytracer
a1/Scene.hs
Haskell
apache-2.0
3,310
-- {-# OPTIONS_GHC -package=ghc-7.10.1 #-} {-# LANGUAGE TypeFamilies, DataKinds, PolyKinds, StandaloneDeriving, TypeOperators, FlexibleInstances, ScopedTypeVariables #-} module TySet(plugin, Set, Union) where import TypeRep import Type import Kind import TcEvidence import CoAxiom import Name import OccName ...
k-bx/type-level-sets
TySet.hs
Haskell
bsd-2-clause
10,398
{-# LANGUAGE GeneralizedNewtypeDeriving, TypeSynonymInstances, FlexibleInstances #-} -- | Properties in this module ensure that things are currently mounted, -- but without making the mount persistent. Use `Propellor.Property.Fstab` -- to configure persistent mounts. module Propellor.Property.Mount where import Prop...
ArchiveTeam/glowing-computing-machine
src/Propellor/Property/Mount.hs
Haskell
bsd-2-clause
4,517
{-# LANGUAGE TypeFamilies #-} module Text.Grampa.Combinators (moptional, concatMany, concatSome, flag, count, upto, delimiter, operator, keyword) where import Control.Applicative(Applicative(..), Alternative(..)) import Data.List.NonEmpty (fromList) impo...
blamario/grampa
grammatical-parsers/src/Text/Grampa/Combinators.hs
Haskell
bsd-2-clause
2,039
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE ViewPatterns #-} {-| This library exports two utilities for compiling Dhall expressions to Bash: * `dhallToExpression`, which emits a Bash expression (i.e. a valid right-hand side f...
Gabriel439/Haskell-Dhall-Library
dhall-bash/src/Dhall/Bash.hs
Haskell
bsd-3-clause
14,370
, testGroup "AU: standard typeclasses" [ testCase "show" $ "AU 15.5" @=? show (AU 15.5) , testCase "showList" $ "[AU 15.3,AU 15.7]" @=? showList [AU 15.3, AU 15.7] "" , testCase "showsPrec" $ "AU 15.5" @=? showsPrec 0 (AU 15.5) "" , testCase "== (True)" ...
Alexander-Ignatyev/astro
test/Data/Astro/tmp.hs
Haskell
bsd-3-clause
1,720
{-# LANGUAGE OverloadedStrings, NegativeLiterals #-} module ETA.CodeGen.Prim where import ETA.Main.DynFlags import ETA.Types.TyCon import ETA.Types.Type import ETA.StgSyn.StgSyn import ETA.Prelude.PrimOp import ETA.Utils.Panic import ETA.Utils.FastString import Data.Maybe import Codec.JVM import ETA.CodeGen.ArgRep imp...
pparkkin/eta
compiler/ETA/CodeGen/Prim.hs
Haskell
bsd-3-clause
45,153
module Data.List.TypeLevel.Intersection where import Data.Constraint import Data.List.TypeLevel.Cmp import Data.List.TypeLevel.Subtraction (Subtraction) import qualified Data.List.TypeLevel.Subtraction as Subtraction import Data.List.TypeLevel.Union ...
andrewthad/vinyl-vectors
src/Data/List/TypeLevel/Intersection.hs
Haskell
bsd-3-clause
2,890
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Parsec (module AP, Parser, LineParser) where import Control.Applicative as AP hiding (many,optional,(<|>)) import qualified Data.Text.Lazy as L import Text.Parsec as AP hiding (satisfy, ParseError, errorPos) import ...
kazu-yamamoto/piki
src/Parsec.hs
Haskell
bsd-3-clause
413
module Sudoku.Control.MoveSpec (main, spec) where import Data.Set(singleton) import Test.Hspec import Sudoku.Control.Move import Sudoku.Data.Board.Internal main :: IO () main = hspec spec spec :: Spec spec = do describe "Move properties:" $ do let set = Set "0" "1" "1" let set2 = Set "3" "4" ...
andrewmichaud/JustSudoku
test/Sudoku/Control/MoveSpec.hs
Haskell
bsd-3-clause
3,362
{-# language CPP #-} -- | = Name -- -- VK_NV_shader_subgroup_partitioned - device extension -- -- == VK_NV_shader_subgroup_partitioned -- -- [__Name String__] -- @VK_NV_shader_subgroup_partitioned@ -- -- [__Extension Type__] -- Device extension -- -- [__Registered Extension Number__] -- 199 -- -- [__Revisio...
expipiplus1/vulkan
src/Vulkan/Extensions/VK_NV_shader_subgroup_partitioned.hs
Haskell
bsd-3-clause
4,234
{-# LANGUAGE ConstraintKinds, KindSignatures, DataKinds, ScopedTypeVariables, DeriveFunctor, RankNTypes, ViewPatterns, MultiParamTypeClasses, FlexibleInstances, FlexibleContexts, DeriveDataTypeable, DeriveGeneric, TupleSections #-} module BlobStore where import TypedBinary import qualified Data.ByteString.Lazy as L i...
aristidb/datastorage
src/BlobStore.hs
Haskell
bsd-3-clause
6,103
module Main (main) where import Graphics.UI.Gtk import Graphics.UI.Gtk.WebKit.WebView import System.FilePath import System.Environment(getArgs) main = do [url, path] <- getArgs webSnap url path webSnap :: String -> FilePath -> IO () webSnap url output = do initGUI w <- offscreenWindowNew wv <- webVi...
jrb/websnap
src/Main.hs
Haskell
bsd-3-clause
756
module Main where import Interpreter (interpret) import Tokens (tokenize) import Parser (parse) import System.Environment (getArgs) import Text.Show.Pretty (ppShow) main :: IO () main = getArgs >>= run run :: [String] -> IO () run ("c":args) = c args run ("jit":args) = jit args run ("i":args) = i args run ("ast":ar...
tcsavage/rumex
src/Main.hs
Haskell
bsd-3-clause
876
{-# OPTIONS -fno-warn-type-defaults #-} {-# LANGUAGE ExtendedDefaultRules #-} {-# LANGUAGE OverloadedStrings #-} -- | Foundation layout elements. See -- <http://foundation.zurb.com/> for more information. module Lucid.Foundation ( module Lucid.Foundation.Structure , module Lucid.Foundation.Navigation , module L...
athanclark/lucid-foundation
src/Lucid/Foundation.hs
Haskell
bsd-3-clause
888
----------------------------------------------------------------------------- -- | -- Module : Plugins.Monitors.Batt -- Copyright : (c) 2010, 2011, 2012, 2013 Jose A Ortega -- (c) 2010 Andrea Rossato, Petr Rockai -- License : BSD-style (see LICENSE) -- -- Maintainer : Jose A. Ortega Ruiz ...
apoikos/pkg-xmobar
src/Plugins/Monitors/Batt.hs
Haskell
bsd-3-clause
7,148
{-| Module : Pipeline Description : Pipeline worker logic Not working - needs refactor after last changes in Worker module. -} module Pipeline where import Protocol import Reader import Task as T import qualified Worker as W import qualified Data.List as DL import qualified Data.Set as Set import System.Dire...
zuzia/haskell_worker
src/Pipeline.hs
Haskell
bsd-3-clause
3,020
{-# LANGUAGE TemplateHaskell #-} module Pinchot.SyntaxTree.Wrappers where import qualified Control.Lens as Lens import Data.List.NonEmpty (NonEmpty) import Data.Maybe (catMaybes) import qualified Language.Haskell.TH as T import Pinchot.Names import Pinchot.Rules import Pinchot.Types -- # Wrapped -- | Creates a 'Len...
massysett/pinchot
pinchot/lib/Pinchot/SyntaxTree/Wrappers.hs
Haskell
bsd-3-clause
4,267
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeSynonymInstances #-} import Prelude import qualified Control.Exception as E import Control.Monad imp...
adunning/pandoc-citeproc
tests/test-citeproc.hs
Haskell
bsd-3-clause
10,230
{-# LANGUAGE ImplicitParams #-} module Data.Macho.Types where import Data.Int import Data.Word import Data.Bits import Data.Binary.Get import Data.Binary.Put import Data.Bimap (Bimap) import qualified Data.Bimap as Bimap import Control.Monad import Control.Applicative import qualified Data.ByteString as B imp...
copumpkin/macho
src/Data/Macho/Types.hs
Haskell
bsd-3-clause
33,246
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section[TcMonoType]{Typechecking user-specified @MonoTypes@} -} {-# LANGUAGE CPP, TupleSections, MultiWayIf #-} module TcHsType ( -- Type signatures kcHsSigType, tcClassSigType, tcHsSigType, tcHsS...
tjakway/ghcjvm
compiler/typecheck/TcHsType.hs
Haskell
bsd-3-clause
94,245
-- module Practice where times3PlusY = x * 3 + y where x = 3 y = 1000 times5 = x * 5 where y = 10 x = 10 * 5 + y divideProblem = z / x + y where x = 7 y = negate x z = y * 10 mult1 = x * y where x = 5 y = 6
brodyberg/Notes
ProjectRosalind.hsproj/LearnHaskell/lib/HaskellBook/Practice.hs
Haskell
mit
278
module Pos.Crypto.Signing.Types.Tag ( SignTag(..) ) where import Universum import Formatting (bprint, shown) import qualified Formatting.Buildable -- | To protect agains replay attacks (i.e. when an attacker intercepts a -- signed piece of data and later sends it again), we add a ta...
input-output-hk/pos-haskell-prototype
crypto/Pos/Crypto/Signing/Types/Tag.hs
Haskell
mit
1,594
<?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="fil-PH"> <title>Gabay sa pagsisimula</title> <maps> <homeID>top</homeID> <mapref locat...
veggiespam/zap-extensions
addOns/gettingStarted/src/main/javahelp/org/zaproxy/zap/extension/gettingStarted/resources/help_fil_PH/helpset_fil_PH.hs
Haskell
apache-2.0
980
import qualified Tuura.PGminer.Main main :: IO () main = Tuura.PGminer.Main.main
tuura/process-mining
pgminer/Main.hs
Haskell
bsd-3-clause
82
module Web.Types where import Web.Spock.Safe import Formalize.Types type SessionVal = Maybe SessionId type FormalizeApp ctx = SpockCtxM ctx () SessionVal AppState () type FormalizeAction ctx a = SpockActionCtx ctx () SessionVal AppState a data AppConfig = AppConfig { cPort :: Int , cPath...
Lepovirta/Crystallize
app/Web/Types.hs
Haskell
bsd-3-clause
443
-- | Contains actions for voting on posts and comments. There are functions -- for upvoting ('upvotePost', 'upvoteComment'), downvoting ('downvotePost', -- 'downVoteComment') as well as removing votes that have already been cast -- ('unvotePost', 'unvoteComment'). -- -- Please note that automated voting (i.e. b...
intolerable/reddit
src/Reddit/Actions/Voting.hs
Haskell
bsd-2-clause
1,573
-- | This module reexports the modules that every program using SubHask will need. -- You should import it instead of Prelude. module SubHask ( module SubHask.Algebra , module SubHask.Category , module SubHask.Compatibility.Base , module SubHask.Internal.Prelude , module SubHask.Monad , module S...
abailly/subhask
src/SubHask.hs
Haskell
bsd-3-clause
505
{-# OPTIONS_GHC -fwarn-incomplete-patterns #-} module Idris.Core.DeepSeq where import Idris.Core.TT import Idris.Core.CaseTree import Idris.Core.Evaluate import Control.DeepSeq instance NFData Name where rnf (UN x1) = rnf x1 `seq` () rnf (NS x1 x2) = rnf x1 `seq` rnf x2 `seq` () rnf (MN x1 x...
osa1/Idris-dev
src/Idris/Core/DeepSeq.hs
Haskell
bsd-3-clause
9,370
{-# LANGUAGE TemplateHaskell #-} module System.Taffybar.DBus.Client.UPower where import DBus.Generation import System.FilePath import System.Taffybar.DBus.Client.Params import System.Taffybar.DBus.Client.Util generateClientFromFile defaultRecordGenerationParams { recordName = Just "UPowerInfo" ...
teleshoes/taffybar
src/System/Taffybar/DBus/Client/UPower.hs
Haskell
bsd-3-clause
515
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="bs-BA"> <title>Code Dx | ZAP Extension</title> <maps> <homeID>top</homeID> <mapref loca...
thc202/zap-extensions
addOns/codedx/src/main/javahelp/org/zaproxy/zap/extension/codedx/resources/help_bs_BA/helpset_bs_BA.hs
Haskell
apache-2.0
968
module B2 where import Control.Parallel.Strategies (rseq, rpar, runEval) qsort ((x : xs)) = lsort_2 ++ ([x] ++ hsort) where lsort = qsort (filter (<) x xs) hsort = qsort (filter (>=) x xs) lsort_2 = runEval (do lsort_2...
RefactoringTools/HaRe
old/testing/evalMonad/B2AST.hs
Haskell
bsd-3-clause
374
module Main where import Criterion.Main import Algo.ListRank (listRank) import Algo.Rootfix (rootfix) import Algo.Leaffix (leaffix) import Algo.AwShCC (awshcc) import Algo.HybCC (hybcc) import Algo.Quickhull (quickhull) import Algo.Spectral ( spectral ) import Algo.Tridiag ( tridiag ) import TestData....
dolio/vector
benchmarks/Main.hs
Haskell
bsd-3-clause
1,686
{- | Module : Numeric.GSL Copyright : (c) Alberto Ruiz 2006-7 License : GPL-style Maintainer : Alberto Ruiz (aruiz at um dot es) Stability : provisional Portability : uses -fffi and -fglasgow-exts This module reexports all available GSL functions. The GSL special functions are in the separate pa...
abakst/liquidhaskell
benchmarks/hmatrix-0.15.0.1/lib/Numeric/GSL.hs
Haskell
bsd-3-clause
1,190
{-# LANGUAGE FlexibleContexts #-} module PostgREST.App (app, sqlError, isSqlError) where import Control.Monad (join) import Control.Arrow ((***), second) import Control.Applicative import Data.Text hiding (map) import Data.Maybe (fromMaybe, mapMaybe) import Text.Regex.TDFA ((=~)) import Data.Ord (comparing) import Da...
nayosx/postgrest
src/PostgREST/App.hs
Haskell
mit
12,040
----------------------------------------------------------------------------- -- | -- Module : Distribution.Client.Reporting -- Copyright : (c) David Waern 2008 -- License : BSD-like -- -- Maintainer : david.waern@gmail.com -- Stability : experimental -- Portability : portable -- -- Anonymous build ...
DavidAlphaFox/ghc
libraries/Cabal/cabal-install/Distribution/Client/BuildReports/Anonymous.hs
Haskell
bsd-3-clause
11,532
module Main where data Suit = Spades | Hearts deriving (Show) data Rank = Ten | Jack | Queen | King | Ace deriving (Show) type Card = (Rank, Suit) type Hand = [Card] value :: Rank -> Integer value Ten = 1 value Jack = 2 value Queen = 3 value King = 4 value Ace = 5 cardValue :: Card -> Integer ...
mtraina/seven-languages-seven-weeks
week-7-haskell/day3/cards_with_show.hs
Haskell
mit
357
module PPL2.VM.ALU.Types where import PPL2.Prelude import PPL2.VM.Types import PPL2.VM.Control.Types (MicroInstr) import Data.IntMap (IntMap) import qualified Data.IntMap as I import Data.Map (Map) import qualified Data.Map as M import qualified Data.List as L -- -------------------------...
UweSchmidt/ppl2
src/PPL2/VM/ALU/Types.hs
Haskell
mit
1,989
import System.IO import System.Random import Control.Monad main = do gen <- getStdGen askForNumber gen askForNumber :: StdGen -> IO () askForNumber gen = do let (randNumber, newGen) = randomR (1, 10) gen :: (Int, StdGen) putStr "What is the secret number (1-10)? " hFlush stdout numberStrin...
feliposz/learning-stuff
haskell/guess2.hs
Haskell
mit
587
{-| Module : Control.Monad.Bayes.Traced.Common Description : Numeric code for Trace MCMC Copyright : (c) Adam Scibior, 2015-2020 License : MIT Maintainer : leonhard.markert@tweag.io Stability : experimental Portability : GHC -} module Control.Monad.Bayes.Traced.Common ( Trace, singleton, output, ...
adscib/monad-bayes
src/Control/Monad/Bayes/Traced/Common.hs
Haskell
mit
2,461
-- | Controls and helpers for changing slides in a deck. module Haste.Deck.Control ( forward, back, goto, skip, present, present_, enableDeck, disableDeck ) where import Control.Monad import Control.Monad.IO.Class import Data.IORef import Haste import Haste.Concurrent import Haste.DOM import Haste.Events impo...
valderman/haste-deck
Haste/Deck/Control.hs
Haskell
mit
5,211
{-# LANGUAGE DataKinds #-} {-# OPTIONS_GHC -fdefer-type-errors -Wwarn #-} module Servant.Server.Internal.ContextSpec (spec) where import Data.Proxy (Proxy (..)) import Test.Hspec (Spec, context, describe, it, shouldBe) import Test.ShouldNotTypecheck ...
zoomhub/zoomhub
vendor/servant/servant-server/test/Servant/Server/Internal/ContextSpec.hs
Haskell
mit
2,432
module Mockups.Elements.Txt where import qualified Data.ByteString.Char8 as BS import Mockups.Elements.Common data TxtAttr = TxtContent BS.ByteString | TxtColor Color deriving (Eq, Show)
ostapneko/tiny-mockups
src/main/Mockups/Elements/Txt.hs
Haskell
mit
211
-- Модуль для тестирования библиотеки import Text.Parsec import qualified Address.Number as N import qualified Address.String as S import Address.Main import Address.Types main = do -- TODO: Тут хорошо было бы сделать модульное тестирование print $ parseAddr "строение 1-A/2" print $ parseAddr "стр 1-A/2...
kahless/russian-address-parser
src/Address/_Test.hs
Haskell
mit
2,988
module Plumbing ( hashObject , writeTree , setRef ) where import qualified App import qualified Data.ByteString as B import Control.Monad.Trans.State (evalStateT) import System.Directory ( doesDirectoryExist, getDirectoryContents ) import System.FilePath ( (</>) ) import System.Log.Logger import Control.Exc...
danstiner/clod
src/Plumbing.hs
Haskell
mit
2,747
module Data.Multimap.Tests ( runTests ) where import qualified Data.Multimap as Multimap import qualified Data.Set as Set import Test.Dwergaz testKey1 :: String testKey1 = "one" testKey2 :: String testKey2 = "two" empty :: Multimap.Multimap String Int empty = Multimap.empty inserter :: (Ord k, ...
henrytill/hecate
tests/Data/Multimap/Tests.hs
Haskell
apache-2.0
2,477
module Graham.A328045 (a328045, a328045_list) where import Data.List (genericIndex, subsequences) import Graham.A006255 (a006255_list) import Graham.A300518 (a300518) import Math.NumberTheory.Powers.Squares (isSquare') import Math.NumberTheory.Powers.Fourth (isFourthPower') a328045 :: Integer -> Integer a328045 n | ...
peterokagey/haskellOEIS
src/Graham/A328045.hs
Haskell
apache-2.0
1,146
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QGroupBox_h.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:26 Warning : this file is machine generated - do n...
keera-studios/hsQt
Qtc/Gui/QGroupBox_h.hs
Haskell
bsd-2-clause
56,487
----------------------------------------------------------------------------- -- | -- Module : XMonad.Actions.Eval -- Copyright : (c) 2009 Daniel Schoepe -- License : BSD3-style (see LICENSE) -- -- Maintainer : Daniel Schoepe <daniel.schoepe@gmail.com> -- Stability : unstable -- Portability : unport...
eb-gh-cr/XMonadContrib1
XMonad/Actions/MyEval.hs
Haskell
bsd-3-clause
4,233
{-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} module Web.Bugzilla.Search ( -- * Search operators (.==.) , (./=.) , (.<.) , (.<=.) , (.>.) , (.>=.) , (.=~.) , (./=~.) , equalsAny , contains , containsCase , containsAny , containsAll , changedBefore , changedAfter , changedFrom , changedTo , changedBy ,...
sethfowler/hsbugzilla
src/Web/Bugzilla/Search.hs
Haskell
bsd-3-clause
3,132
{-# LANGUAGE TemplateHaskell, DeriveGeneric, RankNTypes #-} module MinIR.OrderedIndex ( OrderedIndex , fromTerms , termsScore ) where import Data.HashMap.Strict (HashMap) import qualified Data.HashMap.Strict as HM import qualified...
bgamari/minir
MinIR/OrderedIndex.hs
Haskell
bsd-3-clause
3,422
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} module Web.Tumblr.Types where import Control.Applicative (empty) import Data.Aeson import Data.Time (UTCTime) import Data.Time.Format (parseTimeM, defaultTimeLocale) import Data.Time.LocalTime (zonedTimeToUTC) impor...
Taneb/humblr
src/Web/Tumblr/Types.hs
Haskell
bsd-3-clause
7,462
{-# LANGUAGE OverloadedStrings #-} module Commands ( Command(..) , commands ) where import Data.Aeson import qualified Data.Text as T import qualified Data.Map as M import HQStatus (getHQStatusString) data Command = Command { help :: T.Text , reply :: [T.Text] -> IO T.Text , inGroupChat ::...
astro/l-bot
src/Commands.hs
Haskell
bsd-3-clause
1,042
-- Advent of Code ---- Day 25: Let It Snow module AOC2015.Day25 where import Math.NumberTheory.Powers {- Right-to-left binary method https://en.wikipedia.org/wiki/Modular_exponentiation#Right-to-left_binary_method -} coord :: Int -> Int -> Int coord n m = div (k*(k+1)) 2 + m where k = n + m answers :: IO () ...
bitrauser/aoc
src/AOC2015/Day25.hs
Haskell
bsd-3-clause
629
module Web.Dash.Fetch ( fetch , fetch' ) where import Data.Maybe import Network.URL import Network.Curl import Text.JSON type PeriodOptions = [(String, String)] -- | @fetch'@ fetches the data for the given API Token, @token@, -- and metric name, @metric@, in the time window, @opts@ fe...
bruce/dash-haskell
Web/Dash/Fetch.hs
Haskell
bsd-3-clause
1,748
module TestDirScanner (tests) where import Definitions import DirScanner import Fixtures import System.FilePath import Test.Hspec.HUnit() import Test.Hspec.Monadic import Test.HUnit tests = describe "dir scanner:" $ do it "finds html files recursively" $ withTmpDir $ \tmpDir -> do createEmptyFile $ tmpDi...
rickardlindberg/alldoc
tests/TestDirScanner.hs
Haskell
bsd-3-clause
898