code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
<?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="es-ES">
<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_es_ES/helpset_es_ES.hs | apache-2.0 | 968 | 77 | 67 | 157 | 413 | 209 | 204 | -1 | -1 |
module EKG.A169853 (a169853) where
import Helpers.EKGBuilder (buildEKG)
a169853 :: Int -> Integer
a169853 n = a169853_list !! (n - 1)
a169853_list :: [Integer]
a169853_list = buildEKG [11]
| peterokagey/haskellOEIS | src/EKG/A169853.hs | apache-2.0 | 191 | 0 | 7 | 29 | 68 | 39 | 29 | 6 | 1 |
-- x and y coodinates or lengths
data Cartesian2D = Cartesian2D Double Double
deriving (Eq,Show)
-- Angle and distance (magnitude)
data Polar2D = Polar2D Double Double
deriving (Eq,Show) | hungaikev/learning-haskell | AlgebraicVector.hs | apache-2.0 | 222 | 0 | 6 | 63 | 47 | 26 | 21 | 4 | 0 |
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
-- | Description: Extract and apply patches on JSON documents.
--
-- This module implements data types and operations to represent the
-- differences between JSON documents (i.e. a patch), to compare JSON documents... | thsutton/aeson-diff | lib/Data/Aeson/Diff.hs | bsd-2-clause | 14,552 | 0 | 18 | 4,482 | 4,277 | 2,187 | 2,090 | 273 | 15 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeOperators #-}
module Web.Twitter.Conduit.Status
(
-- * Timelines
StatusesMentionsTimeline
, mentionsTimeline
, StatusesUserTimeline
, userTimeline
, StatusesHomeTimeline
, homeTimeli... | Javran/twitter-conduit | Web/Twitter/Conduit/Status.hs | bsd-2-clause | 10,705 | 0 | 9 | 1,878 | 1,442 | 863 | 579 | 134 | 2 |
module Example where
import MixFix.Expr
import MixFix.Parser
import MixFix.Dic
import qualified Data.Map as Map
import Text.Parsec.Error (ParseError(..))
(=>>) :: String -> a -> Assump a
(=>>) = (,)
infoUnInt = ()
infoOpNum = ()
infoOpRel = ()
infoNum = ()
infoBool = ()
infoFun = ()
infoCont = ()
infoMVar = ()
inf... | pachopepe/mfxparser | Example.hs | bsd-3-clause | 3,996 | 15 | 13 | 745 | 1,247 | 690 | 557 | 58 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Minecraft.Format.Schematic.PrettyPrinting
-- Copyright : (c) Tamar Christina 2012
-- License : BSD3
--
-- Maintainer : tamar@zhox.com
-- Stability : experimental
-- Portability : portable
--
-- Pretty pri... | Mistuke/CraftGen | Minecraft/Format/Schematic/PrettyPrinting.hs | bsd-3-clause | 492 | 0 | 3 | 66 | 21 | 19 | 2 | 1 | 0 |
import System.Environment (getArgs)
moves :: [(Char -> Char, Char -> Char)]
moves = [(pred . pred, pred), (pred . pred, succ), (pred, pred . pred), (pred, succ . succ),
(succ, pred . pred), (succ, succ . succ), (succ . succ, pred), (succ . succ, succ)]
knigh :: Char -> Char -> [(Char -> Char, Cha... | nikai3d/ce-challenges | easy/knight_moves.hs | bsd-3-clause | 727 | 0 | 11 | 199 | 403 | 217 | 186 | 15 | 1 |
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.InstallSymlink
-- Copyright : (c) Duncan Coutts 2008
-- License : BSD-like
--
-- Maintainer : cabal-devel@haskell.org
-- Stability : provisional
-- Portability : po... | fugyk/cabal | cabal-install/Distribution/Client/InstallSymlink.hs | bsd-3-clause | 11,261 | 0 | 11 | 3,100 | 177 | 107 | 70 | 151 | 4 |
import BasicPrelude
import Test.Tasty
tests :: TestTree
tests = testGroup "Tests"
[
]
main :: IO ()
main = defaultMain tests
| mfine/template | test/Test.hs | bsd-3-clause | 131 | 0 | 6 | 27 | 44 | 23 | 21 | 7 | 1 |
import Distribution.ArchLinux.Report
import Distribution.ArchLinux.AUR
import Distribution.ArchLinux.PkgBuild
import System.FilePath
import Control.Monad
import Data.List
import Distribution.Text
import Distribution.Version
import System.Directory
import Text.Printf
import Control.DeepSeq
import GHC.Conc (numCapabi... | archhaskell/archlinux-web | scripts/distro-map.hs | bsd-3-clause | 6,756 | 0 | 23 | 1,516 | 1,360 | 727 | 633 | 105 | 4 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DoAndIfThenElse #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
module Main (main) where
import Data.Text
import Data.Set (Set)
import qualified Data.Set as Set
import System.Random
import System.IO
import Test.Tasty
import Test.Tasty.HUnit
import Test.Tast... | cjerdonek/formal-rcv | src/extracted/tests/ElectSONUnitTest.hs | bsd-3-clause | 1,577 | 0 | 11 | 322 | 404 | 219 | 185 | 46 | 1 |
{-# LANGUAGE RankNTypes #-}
module Llvm.Pass.Changer where
import Llvm.Hir.Data
data Changer g h = Changer { change_GlobalId :: g -> h
, change_LocalId :: Lname -> Lname
, change_Label :: Label -> Label
, change_Const :: Const h -> Const... | mlite/hLLVM | src/Llvm/Pass/Changer.hs | bsd-3-clause | 1,268 | 0 | 13 | 611 | 239 | 139 | 100 | 20 | 1 |
{-# LANGUAGE RankNTypes #-}
module Graphics.Gloss.Internals.Interface.Game
( playWithBackendIO
, Event(..) )
where
import Graphics.Gloss.Data.Color
import Graphics.Gloss.Data.Picture
import Graphics.Gloss.Data.ViewPort
import Graphics.Gloss.Rendering
import Graphics.Gloss.Internals.Interface.Event
impo... | ardumont/snake | deps/gloss/Graphics/Gloss/Internals/Interface/Game.hs | bsd-3-clause | 6,030 | 0 | 18 | 2,101 | 1,080 | 567 | 513 | 126 | 2 |
module Wikirick.Backends.URLMapper
( module Wikirick.URLMapper
, initURLMapper
, initURLReceiver
) where
import qualified Data.ByteString.Lens as BL
import qualified Heist.Interpreted as I
import Snap
import System.FilePath
import Wikirick.Repository
import Wikirick.Import
import Wikirick.URLMapper
initURLMa... | keitax/wikirick | src/Wikirick/Backends/URLMapper.hs | bsd-3-clause | 889 | 0 | 14 | 169 | 234 | 128 | 106 | -1 | -1 |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
-- | 'Cocoyoneda' gives a cofree cofunctor for any type constructor.
module Data.Cofunctor.Cocoyoneda
( Cocoyoneda(..)
, liftCocoyoneda
, lowerCocoyoneda
, hoistCocoyoneda
) where
import Data.Cofunctor (Cofunctor(..))
data Cocoyoneda f a where
... | jaspervdj/acme-cofunctor | src/Data/Cofunctor/Cocoyoneda.hs | bsd-3-clause | 774 | 0 | 9 | 160 | 260 | 137 | 123 | 18 | 1 |
module Config.Type(
Severity(..), Classify(..), HintRule(..), Note(..), Setting(..),
Restrict(..), RestrictType(..), RestrictIdents(..), SmellType(..),
defaultHintName, isUnifyVar, showNotes, getSeverity, getRestrictType, getSmellType
) where
import Data.Char
import Data.List.Extra
import Prelude
im... | ndmitchell/hlint | src/Config/Type.hs | bsd-3-clause | 6,459 | 0 | 14 | 1,240 | 1,165 | 659 | 506 | 110 | 2 |
-- | This module provides type synonyms used by models.
module Model.Types (
-- * SI units
Watt
, Second
, Joule
, KiloWattHour
, jouleToKiloWattHour
, kiloWattHourToJoule
) where
-- | Unit of time.
type Second = Rational
-- | Unit of power.
type Watt = Rational
-- | Unit of energy.... | redelmann/e-zimod-server | Model/Types.hs | bsd-3-clause | 654 | 0 | 5 | 144 | 94 | 63 | 31 | 15 | 1 |
--------------------------------------------------------------------
-- |
-- Module : Text.PDF.Document
-- Description : Functions for manipulating PDF content.
-- Copyright : (c) Dylan McNamee, 2008, 2009, 2011
-- License : BSD3
--
-- Maintainer: Dylan McNamee <dylan@galois.com>
-- Stability : provisional
-... | dylanmc/Haskell-PDF-Parsing-Library | Text/PDF/Document.hs | bsd-3-clause | 16,708 | 0 | 18 | 3,650 | 4,199 | 2,181 | 2,018 | 274 | 4 |
{-# LANGUAGE OverloadedStrings #-}
module Network.Cloudprint (
addPrintJob
)where
import Control.Monad.IO.Class
import Data.ByteString
import qualified Data.ByteString.Char8 as B8
import qualified Data.Either.Validation as V
import Data.Monoid
import ... | plow-technologies/cloudprint-api | src/Network/Cloudprint.hs | bsd-3-clause | 2,967 | 0 | 18 | 1,128 | 509 | 278 | 231 | 52 | 3 |
{-
(c) The University of Glasgow, 1994-2006
Core pass to saturate constructors and PrimOps
-}
{-# LANGUAGE BangPatterns, CPP #-}
module CorePrep (
corePrepPgm, corePrepExpr, cvtLitInteger,
lookupMkIntegerName, lookupIntegerSDataConName
) where
#include "HsVersions.h"
import OccurAnal
import HscType... | mcschroeder/ghc | compiler/coreSyn/CorePrep.hs | bsd-3-clause | 51,140 | 53 | 21 | 14,079 | 8,945 | 4,721 | 4,224 | 591 | 10 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE OverloadedStrings #-}
{-
This module is the primary interface for signing and verifying http-client
TSRP requests with zodiac and should provide everything needed to do so.
-}
module Zodiac.HttpClient(
KeyId
, TSRPKey
, Reque... | ambiata/zodiac | zodiac-http-client/src/Zodiac/HttpClient.hs | bsd-3-clause | 1,165 | 0 | 6 | 258 | 163 | 113 | 50 | 35 | 0 |
-- |
-- Module : Data.ASN1.Get
-- License : BSD-style
-- Maintainer : Vincent Hanquez <vincent@snarc.org>
-- Stability : experimental
-- Portability : unknown
--
-- Simple get module with really simple accessor for ASN1.
--
-- Original code is pulled from the Get module from cereal
-- which is covered by:
-... | mboes/hs-asn1 | encoding/Data/ASN1/Get.hs | bsd-3-clause | 6,288 | 0 | 19 | 1,722 | 1,852 | 974 | 878 | 118 | 3 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE FlexibleInstances #-}
-- | Generate HPC (Haskell Program Coverage) reports
module Stack.Coverage
( delet... | rvion/stack | src/Stack/Coverage.hs | bsd-3-clause | 19,985 | 0 | 28 | 6,387 | 4,575 | 2,322 | 2,253 | 341 | 9 |
import System.IO
import Data.Char(toUpper)
main =
do
inh <- openFile "input.txt" ReadMode
outh <- openFile "output.txt" WriteMode
str <- hGetContents inh
hPutStr outh (map toUpper str)
hClose inh
hClose outh
| zhangjiji/real-world-haskell | ch7/to-upper-lazy2.hs | mit | 241 | 0 | 9 | 63 | 83 | 37 | 46 | 10 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- Derived from AWS service descriptions, licensed under Apache 2.0.
-- |
-- Module : Network.AWS.Lambda.Waiters
-- Copyright : (c) 2013-2015 Brendan Hay
-- License : Mozilla Public License, ... | fmapfmapfmap/amazonka | amazonka-lambda/gen/Network/AWS/Lambda/Waiters.hs | mpl-2.0 | 621 | 0 | 4 | 122 | 39 | 31 | 8 | 7 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | kim/amazonka | amazonka-ssm/gen/Network/AWS/SSM/DescribeAssociation.hs | mpl-2.0 | 4,111 | 0 | 9 | 873 | 514 | 312 | 202 | 65 | 1 |
-- Compile this with 'ghc -o Game Game.hs' and run it with './Game'.
import Data.List
import Graphics.Gloss.Game
-- Window size
width = 600
height = 400
-- A sprite representing our character
slimeSprite = bmp "Slime.bmp"
slimeWidth = fst (snd (boundingBox (scale 0.5 0.5 slimeSprite)))
slimeHeight = snd (snd (bou... | mchakravarty/lets-program | step4/Game.hs | bsd-3-clause | 3,407 | 1 | 12 | 996 | 938 | 514 | 424 | 33 | 3 |
{-# LANGUAGE Trustworthy, BangPatterns #-}
{-# LANGUAGE CPP, NoImplicitPrelude #-}
{-# OPTIONS_GHC -funbox-strict-fields #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.IO.Buffer
-- Copyright : (c) The University of Glasgow 2008
-- License : see libr... | rahulmutt/ghcvm | libraries/base/GHC/IO/Buffer.hs | bsd-3-clause | 8,093 | 7 | 16 | 1,788 | 1,928 | 1,046 | 882 | -1 | -1 |
#!/usr/bin/env stack -- stack --install-ghc --resolver lts-5.13 runghc --package text --package foundation
module Main where
import qualified Foundation as F
import qualified Foundation.Collection as F
import Criterion.Main
import qualified Data.Text as T
textEnglish = "Set in the year 0 F.E. (\"Foundation Era\"), T... | vincenthz/hs-foundation | foundation/benchs/compare-libs/Text.hs | bsd-3-clause | 2,678 | 0 | 16 | 437 | 320 | 171 | 149 | 18 | 1 |
-- Copyright (c) 2015 Eric McCorkle. All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions
-- are met:
--
-- 1. Redistributions of source code must retain the above copyright
-- notice, this list of conditi... | emc2/saltlang | src/salt/Language/Salt/Surface/Common.hs | bsd-3-clause | 21,895 | 0 | 20 | 7,032 | 5,112 | 2,710 | 2,402 | 409 | 2 |
{-# LANGUAGE Haskell98, MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances #-}
{-# LINE 1 "Control/Monad/Reader/Class.hs" #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE UndecidableInstances #-}
-- Search for UndecidableInstances to see why this is needed
{- |
Module... | phischu/fragnix | tests/packages/scotty/Control.Monad.Reader.Class.hs | bsd-3-clause | 6,056 | 0 | 11 | 1,294 | 1,159 | 654 | 505 | 96 | 1 |
module Main where
main = print "Test"
------------------------ beta reduction ---------------------
beta_reduce_start :: Int
beta_reduce_start = f 1
where
f = \ x -> x + 2 :: Int -- is auto-inlined
beta_reduce_end :: Int
beta_reduce_end = 1 + 2
------------------------ case reduction ---------------------... | ku-fpg/hermit | tests/prims/Test.hs | bsd-2-clause | 1,128 | 0 | 8 | 264 | 276 | 156 | 120 | 29 | 2 |
{-# LANGUAGE PartialTypeSignatures, TypeFamilies, InstanceSigs #-}
module WildcardInTypeFamilyInstanceLHS where
class Foo k where
type Dual k :: *
instance Foo Int where
type Dual _ = Maybe Int
| urbanslug/ghc | testsuite/tests/partial-sigs/should_fail/WildcardInTypeFamilyInstanceLHS.hs | bsd-3-clause | 200 | 0 | 6 | 34 | 41 | 23 | 18 | 6 | 0 |
{-
(c) The GRASP/AQUA Project, Glasgow University, 1993-1998
\section[WwLib]{A library for the ``worker\/wrapper'' back-end to the strictness analyser}
-}
{-# LANGUAGE CPP #-}
module WwLib ( mkWwBodies, mkWWstr, mkWorkerArgs
, deepSplitProductType_maybe, findTypeShape
) where
#include "HsVersions.h"
... | acowley/ghc | compiler/stranal/WwLib.hs | bsd-3-clause | 32,112 | 0 | 15 | 9,621 | 3,879 | 2,115 | 1,764 | 268 | 2 |
{-# LANGUAGE LambdaCase #-}
module TcLambdaCase where
import Data.Bits ((.|.))
f1 :: (a -> a) -> (a -> a)
f1 = \case x -> x
f2 :: Num a => a -> a
f2 = \case x -> x + x
f3 :: Int -> (Int, Int)
f3 = (\case y -> (y + y, y * y)) . (.|. 12)
f4 = \case _ -> undefined
| urbanslug/ghc | testsuite/tests/typecheck/should_compile/TcLambdaCase.hs | bsd-3-clause | 269 | 0 | 11 | 74 | 152 | 87 | 65 | 10 | 1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
module Todo.App (
newTodoApp,
defaultTodo,
listTodos,
addTodo,
removeTodo,
updateTodo,
findTodoById,
clearTodos,
runTodoGrammar,
incrTodoAppCounter
) where
import Control.Lens
import ... | adarqui/todomvc-haskell-servant-purescript | haskell_src/Todo/App.hs | mit | 2,555 | 0 | 14 | 580 | 682 | 353 | 329 | 61 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE Strict #-}
{-# OPTIONS_GHC ... | achirkin/qua-view | src/Model/GeoJSON/Coordinates.hs | mit | 16,824 | 231 | 18 | 4,662 | 4,149 | 2,257 | 1,892 | -1 | -1 |
module Network.CryptoNote.P2P.Command.Chain.Response where
import Data.Word (Word64)
import Network.CryptoNote.Crypto.Hash (Hash, Id)
-- cryptonote_protocol_handler.h
-- cryptonote_protocol_defs.h
-- #define BC_COMMANDS_POOL_BASE 2000
-- const static int ID = BC_COMMANDS_POOL_BASE + 7;
data ResponseChainEntry = Res... | nvmd/hs-cryptonote | src/Network/CryptoNote/P2P/Command/Chain/Response.hs | mit | 449 | 0 | 10 | 71 | 83 | 54 | 29 | 8 | 0 |
{-# LANGUAGE TypeFamilies, GADTs #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Text.Regex.Applicative.Interface where
import Control.Applicative hiding (empty)
import qualified Control.Applicative
import Control.Arrow
import Data.Traversable
import Data.String
import Data.Maybe
import Text.Regex.Applicative.Types
im... | mitchellwrosen/regex-applicative | Text/Regex/Applicative/Interface.hs | mit | 11,316 | 0 | 19 | 3,044 | 2,868 | 1,529 | 1,339 | 176 | 8 |
{-# htermination maxBound :: Ordering #-}
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/Prelude_maxBound_6.hs | mit | 42 | 0 | 2 | 6 | 3 | 2 | 1 | 1 | 0 |
{-# LANGUAGE PatternSynonyms #-}
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.WebGPURenderPipelineColorAttachmentDescriptor
(setPixelFormat, getPixelFormat,
WebGPURenderPipelineColorA... | ghcjs/jsaddle-dom | src/JSDOM/Generated/WebGPURenderPipelineColorAttachmentDescriptor.hs | mit | 1,964 | 0 | 12 | 260 | 414 | 260 | 154 | 30 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleContexts #-}
module Data.Matrix.Dense
(DenseMatrix
,fromColMajorVector)
where
import Data.Tensor hiding (generate,generateM)
import Data.Tensor.Dense.VTensor (VTensor(..),MD_VTe... | lensky/hs-matrix | lib/Data/Matrix/Dense.hs | mit | 776 | 0 | 10 | 134 | 175 | 108 | 67 | 16 | 1 |
{-
Copyright (c) 2008, 2009
Russell O'Connor
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, publish, dist... | haasn/colour | Data/Colour.hs | mit | 7,228 | 0 | 16 | 1,531 | 932 | 546 | 386 | 55 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-security-group-ingress.html
module Stratosphere.Resources.RDSDBSecurityGroupIngress where
import Stratosph... | frontrowed/stratosphere | library-gen/Stratosphere/Resources/RDSDBSecurityGroupIngress.hs | mit | 4,153 | 0 | 15 | 405 | 552 | 313 | 239 | 45 | 1 |
module Utils
( handleArgs, chooseFileCreator, filterFiles, createOptions
) where
import DirTree (DirTree (..), filterDirTreeByFSO)
import FSO (CreateOptions, FSO (..), FileCreator)
import Options (Options (..), on')
import BasePrelude
import System.Directory (canonicalizePath, copyFile, doesDirectoryExist,
... | pavelkogan/transform-tree | Utils.hs | mit | 4,589 | 0 | 19 | 1,074 | 1,367 | 721 | 646 | 90 | 5 |
third :: String -> String
third "" = "Empty string, how fuggin lame"
third ltrs@(x:y:_) = [ltrs !! 2] ++ " is the 3rd letter of " ++ ltrs
fug :: (RealFloat a) => a -> a -> String
fug weight height
| weight / height ^ 2 <= 18.5 = "Shiiiiit you skinny"
| weight / height ^ 2 <= 25.0 = "Perfect, fuggin showoff"
| we... | onicrypt/noauth | noauth-hs/thlt.hs | gpl-2.0 | 757 | 19 | 10 | 179 | 273 | 139 | 134 | 19 | 1 |
{-# LANGUAGE FlexibleContexts #-}
module Yi.Users.JP.Experimental where
-- This is an attempt at a completely "normalized" keymap.
-- Choose your mode/unit with the left hand;
-- Perform commands with the right hand.
import Prelude (zipWith)
import Control.Monad.State
import Data.Char
import Yi.Keymap.Emacs.Utils
impo... | codemac/yi-editor | src/Yi/Users/JP/Experimental.hs | gpl-2.0 | 6,330 | 0 | 13 | 2,015 | 1,720 | 898 | 822 | 132 | 1 |
-- Copyright (c) 2011-14, Nicola Bonelli
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- * Redistributions of source code must retain the above copyright notice,
-- t... | pandaychen/PFQ | user/Haskell/Network/PFq/Default.hs | gpl-2.0 | 27,254 | 0 | 12 | 6,492 | 6,263 | 3,393 | 2,870 | 320 | 1 |
{-# LANGUAGE StandaloneDeriving, DeriveFunctor, DeriveFoldable, DeriveTraversable #-}
import Control.Applicative
import Control.Monad
import qualified Data.Foldable as F
import qualified Data.Traversable as T
import Data.List
import Data.Maybe
import System.Direct... | wavewave/hoodle-tools | exe/filerecurse.hs | gpl-2.0 | 3,048 | 0 | 13 | 688 | 1,051 | 534 | 517 | 63 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Lamdu.Sugar.Internal.EntityId
( EntityId
, bs
, ofValI, ofIRef
, ofLambdaParam
, ofLambdaTagParam
, ofInjectTag
, ofGetFieldTag
, ofRecExtendTag
, ofCaseTag
, ofTId
, randomizeExprAndParams
) where
import Data.... | rvion/lamdu | Lamdu/Sugar/Internal/EntityId.hs | gpl-3.0 | 1,961 | 0 | 11 | 396 | 551 | 311 | 240 | 55 | 1 |
{-# LANGUAGE CPP #-}
{- | UIState operations. -}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
module Hledger.UI.UIState
where
#if !MIN_VERSION_brick(0,19,0)
import Brick
#endif
import Brick.Widgets.Edit
import Data.List
import Data.Text.Zipper (gotoEOL)
import Data.Time.Calendar (Day)
impor... | ony/hledger | hledger-ui/Hledger/UI/UIState.hs | gpl-3.0 | 12,612 | 0 | 21 | 2,054 | 3,529 | 1,985 | 1,544 | 160 | 4 |
module Data.DotsAndBoxes.Test.StringsAndCoins where
andBack :: [(Int, Int)] -> [(Int, Int)]
andBack xs = xs ++ [(j, i) | (i, j) <- xs, j /= 0]
c1 = mkUGraph [0..1] $ andBack [(1, 0)] :: Gr () ()
c2 = mkUGraph [0..3] $ andBack [(1, 2), (2, 0), (2, 3)] :: Gr () ()
c3 = mkUGraph [0..2] $ andBack [(1, 2)] :: Gr () ()
c4... | mcapodici/dotsandboxes | test/Data/DotsAndBoxes/Test/StringsAndCoins.hs | gpl-3.0 | 719 | 0 | 9 | 166 | 567 | 330 | 237 | 12 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveGeneric #-}
module Network.Refraction.FairExchange.Types
( KeyPair
, Secret
, numSecrets
, numChallenges
, BobKeyMessage(..)
, AliceKeysMessage(..)
) where
import Data.Aeson (FromJSON, ToJSON)
import Data.Text (Text)
import GHC.Generics
... | hudon/refraction-hs | src/Network/Refraction/FairExchange/Types.hs | gpl-3.0 | 959 | 0 | 9 | 191 | 219 | 136 | 83 | 32 | 1 |
{-# LANGUAGE BangPatterns #-}
-----------------------------------------------------------------------------
-- |
-- Module :
-- Copyright : (c) 2013 Boyun Tang
-- License : BSD-style
-- Maintainer : tangboyun@hotmail.com
-- Stability : experimental
-- Portability : ghc
--
--
--
---------------------------------------... | tangboyun/miranda | src/MiRanda/CeRNA.hs | gpl-3.0 | 4,580 | 0 | 25 | 1,499 | 1,480 | 814 | 666 | 101 | 4 |
--- |
--- | type definitions for FixedQueue.hs to prevent circular imports
--- |
--- Copyright : (c) Florian Richter 2011
--- License : GPL
---
module FixedQueueTypes where
import qualified Data.Sequence as S
import Control.Concurrent.STM.TVar (TVar, newTVarIO)
type FixedQueue t = TVar (Int, S.Seq t)
-- | cre... | f1ori/hadcc | FixedQueueTypes.hs | gpl-3.0 | 433 | 0 | 8 | 76 | 86 | 55 | 31 | 6 | 1 |
module Pearl.SWB.Section03 where
newtype Lf v = In { insideI :: v (Lf v )}
newtype Gf x = OutO { insideO :: x (Gf x )}
data K = K
deriving (Ord, Eq)
data KList l = KNil
| KCons K l
data SList l = SNil
| SCons K l
fold :: (Functor f) => (f a -> a) ... | technogeeky/pearl-sorting-with-bialgebras | src/Pearl/SWB/Section03.hs | gpl-3.0 | 4,225 | 0 | 11 | 1,963 | 905 | 477 | 428 | 44 | 1 |
module Hive.Game.Board
-- (Board
-- , allOccupiedPositions
-- , isOccupiedAt
-- , isUnoccupiedAt
-- , occupiedNeighbors
-- , unoccupiedNeighbors
-- , topPieceAt
-- , piecesAt
-- , pieceIsFree
-- , removePiecesAt
-- , removeTopPieceAt
-- , example1
-- )
where
impo... | nathanic/hive-hs | src/Hive/Game/Board.hs | gpl-3.0 | 7,785 | 0 | 15 | 1,964 | 2,287 | 1,324 | 963 | 145 | 3 |
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-}
-----------------------------------------------------------------------------
--
-- Module : Math.IMM
-- Copyright : Christian Gosch
-- License : BSD3
--
-- Maintainer :
-- Stability :
-- Portability :
--
-- |
--
---------------------------... | cgo/jalla | Numeric/Jalla/IMM.hs | gpl-3.0 | 1,064 | 0 | 10 | 254 | 148 | 93 | 55 | 9 | 0 |
module PowerDivisibility.A004709 (a004709) where
import Helpers.Primes (primePowers)
a004709 :: Int -> Integer
a004709 n = a004709_list !! (n - 1)
a004709_list :: [Integer]
a004709_list = filter isCubefree [1..] where
isCubefree n = all ((<3) . snd) $ primePowers n
| peterokagey/haskellOEIS | src/PowerDivisibility/A004709.hs | apache-2.0 | 271 | 0 | 11 | 44 | 101 | 56 | 45 | 7 | 1 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QMimeData.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:32
Warning : this file is machine generated - do not... | uduki/hsQt | Qtc/Core/QMimeData.hs | bsd-2-clause | 15,006 | 0 | 14 | 2,630 | 5,003 | 2,543 | 2,460 | -1 | -1 |
{-# LANGUAGE UnicodeSyntax #-}
module Arith.Semantics (Term(..), isNumericVal, isVal, eval) where
data Term = TmTrue
| TmFalse
| TmIf Term Term Term
| TmZero
| TmSucc Term
| TmPred Term
| TmIsZero Term
digitize ∷ Term → Int
digitize TmZero = 0
digitize ... | ayberkt/TAPL | src/Arith/Semantics.hs | bsd-3-clause | 1,334 | 50 | 9 | 468 | 504 | 259 | 245 | 39 | 1 |
-- 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 Over... | rfranek/duckling | Duckling/TimeGrain/EN/Rules.hs | bsd-3-clause | 1,306 | 0 | 11 | 347 | 271 | 172 | 99 | 24 | 1 |
module Room where
import Rumpus
roomSize = 400
(roomW, roomH, roomD) = (roomSize,roomSize,roomSize)
wallD = 1
shelfH = 0.15
--roomOffset = (roomH/2 - wallD/2)
roomOffset = 0
start :: Start
start = do
let makeWall pos size hue extraProps = spawnChild $ do
myPose ==> position (pos... | lukexi/rumpus | pristine/Attraction/Room.hs | bsd-3-clause | 1,069 | 0 | 17 | 339 | 432 | 220 | 212 | 24 | 1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TemplateHaskell #-}
module GithubWebhook.Types.PullRequest
( PullRequest(..)
) where
import qualified Data.Char as Ch
import qualified Data.Text as T
import qualified Data.Aeson as A
import qualified Data.Aeson.TH as A
import GHC.Generics
import qualified Utils
data Pull... | bgwines/hueue | src/GithubWebhook/Types/PullRequest.hs | bsd-3-clause | 582 | 0 | 10 | 108 | 146 | 92 | 54 | 20 | 0 |
-- 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.UK.Tests
( tests ) where
import Data.String
import Prelude
import Test.Tasty
import Test.... | facebookincubator/duckling | tests/Duckling/Time/UK/Tests.hs | bsd-3-clause | 711 | 0 | 9 | 98 | 137 | 85 | 52 | 17 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE UnboxedTuples #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE PolyKinds #-}
module Data.Params.Vector.Unboxed
( Vector
, module Data.Params.Vector
)
where
import Control.Category
import Prelude hiding ((.),id)
i... | mikeizbicki/typeparams | src/Data/Params/Vector/Unboxed.hs | bsd-3-clause | 26,179 | 0 | 21 | 7,602 | 5,803 | 3,066 | 2,737 | -1 | -1 |
{-# LANGUAGE FlexibleContexts #-}
module Sync.GitLike (
GitLike(..),
enumGitLike, gitLike, remoteGitLike,
markGitLike, remoteMarkGitLike,
module Sync.Base,
module Sync.Repo
) where
import Prelude.Unicode
import Control.Arrow
import Control.Lens
import Control.Monad.Except
import Data.Either (partitionEithers)... | mvoidex/hsync | src/Sync/GitLike.hs | bsd-3-clause | 7,240 | 32 | 19 | 1,267 | 2,732 | 1,421 | 1,311 | -1 | -1 |
-- FIXME rename module
module Util.BufferedIOx
( BufferedIOx(..)
, runGetBuffered
, runPutBuffered
, module Util.Binary
) where
import Control.Monad.IO.Class
import Data.Binary
import qualified Data.ByteString as BS ( ByteString )
import qualified Data.ByteString.Lazy a... | LTI2000/hinterface | src/Util/BufferedIOx.hs | bsd-3-clause | 994 | 0 | 11 | 234 | 344 | 187 | 157 | 21 | 1 |
module Foreign.Mms.MappedVector
( MappedVector(..)
, null
, mappedVectorSize
, mappedVectorAlignment
, mappedVectorReadFields
, mappedVectorWriteFields
) where
import Prelude hiding(length, null)
import Control.Monad(liftM2)
import Foreign.Mms.Class(Mms(..), Storage(..))
import Foreign.Mms... | eeight/haskell-mms | src/Foreign/Mms/MappedVector.hs | bsd-3-clause | 1,748 | 0 | 14 | 358 | 577 | 316 | 261 | -1 | -1 |
module Agon.Agon where
import Agon.Types
import Control.Lens
import Control.Monad.Reader
type AgonM = ReaderT Agon
viewA lens = ask >>= return . view lens
runAgonM = runReaderT
| Feeniks/Agon | app/Agon/Agon.hs | bsd-3-clause | 183 | 0 | 6 | 32 | 55 | 31 | 24 | 7 | 1 |
{-# LANGUAGE DeriveDataTypeable, RankNTypes, FlexibleInstances, FlexibleContexts,
KindSignatures, ScopedTypeVariables #-}
module Game.DeckBuild.Dominion.Lib where
{-
Contains boilerplate / useful monadic state transformation Game operations, as well
as non-monadic helper functions for making queries ab... | cronburg/deckbuild | Game/DeckBuild/Dominion/Lib.hs | bsd-3-clause | 7,909 | 0 | 26 | 2,222 | 2,791 | 1,484 | 1,307 | 122 | 5 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
module Pages.BuildExistsPage where
import Aria.Types
import Aria.Routes
import HtmlTemplates
import Web.Routes.PathInfo (toPathInfo)
import Control.Lens
import Data.Maybe (fr... | theNerd247/ariaRacer | arweb/app/Pages/BuildExistsPage.hs | bsd-3-clause | 898 | 0 | 11 | 122 | 204 | 128 | 76 | 28 | 1 |
module Channel where
import qualified Prelude
import Feldspar.Data.Vector
import Feldspar.Multicore
primitives :: Multicore ()
primitives = do
c0 <- newChan hostId 0 one
c1 <- newChan 0 1 one
c2 <- newChan 1 hostId one
onHost $ do
onCore 0 (f c0 c1)
onCore 1 (g c1 c... | kmate/raw-feldspar-mcs | examples/Channel.hs | bsd-3-clause | 3,232 | 0 | 20 | 1,060 | 1,147 | 531 | 616 | -1 | -1 |
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
{-|
-}
module LivingFlame.Monad (
LivingFlameEnv (..), LivingFlame,
mkDefaultEnv,
runLivingFlame,
--
ask, asks,
--
putLog, rotateLog,
--
getConfig, getConfigDefault) where
import qualified Blaze.ByteString.Builder as BZ
import qualified B... | seagull-kamome/living-flame | src/LivingFlame/Monad.hs | bsd-3-clause | 3,414 | 4 | 14 | 688 | 927 | 519 | 408 | 77 | 1 |
{-# language CPP #-}
-- No documentation found for Chapter "ColorComponentFlagBits"
module Vulkan.Core10.Enums.ColorComponentFlagBits ( ColorComponentFlags
, ColorComponentFlagBits( COLOR_COMPONENT_R_BIT
... | expipiplus1/vulkan | src/Vulkan/Core10/Enums/ColorComponentFlagBits.hs | bsd-3-clause | 4,052 | 1 | 10 | 1,049 | 419 | 259 | 160 | -1 | -1 |
module FibLargeMod where
import Data.Char
import Control.Applicative
import System.IO
main :: IO ()
main =
hSetBuffering stdin NoBuffering >>= \_ ->
nextNum >>= \n ->
nextNum >>= \m ->
putStrLn $ show $ fibsModN n m
fibsModN n m =
let p = pisanoPeriod m
r = n `rem` p
in fibsMod m !! fromInteger r
... | msosnicki/algorithms | app/week2/FibLargeMod.hs | bsd-3-clause | 785 | 0 | 17 | 220 | 401 | 205 | 196 | 27 | 3 |
{-# LANGUAGE MagicHash, UnboxedTuples #-}
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, TypeFamilies, DataKinds #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -pgmP cpphs -optP-traditional -optP--cpp #-}
#if defined(ghcjs_HOST_OS)
{-# LANGUAGE ScopedTypeVariables, TypeOperators ... | achirkin/fastvec | src/Data/Geometry/Types.hs | bsd-3-clause | 20,783 | 154 | 9 | 9,189 | 1,942 | 1,038 | 904 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{- |
Module : Network.Mail.Mime.Parser.Util
Copyright : (c) 2015 Alberto Valverde
License : BSD3
Maintainer : alberto@toscat.net
Stability : provisional
Portability : unknown
This module provides accessors to Message parts
-}
module Network.M... | meteogrid/mime-mail-parser | Network/Mail/Mime/Parser/Util.hs | bsd-3-clause | 1,256 | 0 | 8 | 242 | 286 | 169 | 117 | 32 | 1 |
{-
- Hacq (c) 2013 NEC Laboratories America, Inc. All rights reserved.
-
- This file is part of Hacq.
- Hacq is distributed under the 3-clause BSD license.
- See the LICENSE file for more details.
-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasse... | ti1024/hacq | src/Control/Monad/Quantum/ApproxSequence/Counter.hs | bsd-3-clause | 1,358 | 0 | 9 | 185 | 264 | 156 | 108 | 22 | 0 |
module Main where
import Test.Framework.Providers.DocTest
import Test.Framework
main = docTest ["Test/Cucumber.hs"] [] >>= defaultMain . return
| Erkan-Yilmaz/haskell-cucumber | tests/MainDocTest.hs | bsd-3-clause | 146 | 0 | 8 | 18 | 39 | 23 | 16 | 4 | 1 |
{- |
Module : ./VSE/Fold.hs
Description : folding functions for VSE progams
Copyright : (c) Christian Maeder, DFKI Bremen 2008
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Christian.Maeder@dfki.de
Stability : provisional
Portability : portable
folding functions for VSE progams
-}
modu... | spechub/Hets | VSE/Fold.hs | gpl-2.0 | 2,867 | 0 | 13 | 766 | 1,309 | 681 | 628 | 58 | 9 |
import Distribution.PackageDescription
import Distribution.PackageDescription.Parse
import Distribution.Verbosity
import Distribution.System
import Distribution.Simple
import Distribution.Simple.Utils
import Distribution.Simple.Setup
import Distribution.Simple.Command
import Distribution.Simple.Program
import Distribut... | kathawala/symdiff | cublas/Setup.hs | gpl-3.0 | 5,068 | 0 | 16 | 1,310 | 1,191 | 624 | 567 | 98 | 3 |
main :: (Eq aap, Ord aap) => aap -> aap -> aap
main = undefined
| roberth/uu-helium | test/staticwarnings/SuperfluousPreds.hs | gpl-3.0 | 64 | 0 | 7 | 15 | 34 | 18 | 16 | 2 | 1 |
-- Copyright 2016 TensorFlow authors.
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agree... | cem3394/haskell | tensorflow/src/TensorFlow/Tensor.hs | apache-2.0 | 6,742 | 0 | 12 | 1,275 | 1,257 | 688 | 569 | -1 | -1 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QStyleOptionViewItemV3.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:15
Warning : this file is machine gener... | keera-studios/hsQt | Qtc/Gui/QStyleOptionViewItemV3.hs | bsd-2-clause | 3,961 | 0 | 12 | 523 | 881 | 458 | 423 | -1 | -1 |
{-# LANGUAGE BangPatterns, PatternGuards #-}
-- | The list version of the solver also builds the bounding box at every
-- node of the tree, which is good for visualisation.
module Solver.VectorBH.Solver
( MassPoint (..)
, BoundingBox (..)
, BHTree (..)
, calcAccels
, buildTree
, findBounds)
where
import Common... | mainland/dph | dph-examples/examples/real/NBody/Solver/VectorBH/Solver.hs | bsd-3-clause | 4,692 | 141 | 13 | 1,151 | 1,592 | 885 | 707 | 109 | 1 |
markup = <div>
<% insertComponent "Page" "List" [] %>
<div class="page-content">
<h1><% getViewDataValue_u "page-title" :: View String %></h1>
<% (getViewDataValue_u "page-content" :: View String) >>= (return . cdata) %>
</div>
</div>
| alsonkemp/turbinado-website | App/Views/Test/Showxml.hs | bsd-3-clause | 304 | 22 | 10 | 100 | 102 | 54 | 48 | -1 | -1 |
{-# LANGUAGE TemplateHaskell, OverloadedStrings #-}
module Monto.ProductDependency where
import Data.Aeson
import Data.Text (Text,unpack)
import Monto.Types
data ProductDependency
= Version (VersionID,Source,Language)
| Product (VersionID,ProductID,Source,Language,Product)
deriving... | svenkeidel/monto-broker | src/Monto/ProductDependency.hs | bsd-3-clause | 1,314 | 0 | 17 | 368 | 409 | 224 | 185 | 38 | 0 |
{-# LANGUAGE BangPatterns #-}
{-| Monitoring daemon backend
This module holds implements the querying of the monitoring daemons
for dynamic utilisation data.
-}
{-
Copyright (C) 2015 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted pro... | mbakke/ganeti | src/Ganeti/HTools/Backend/MonD.hs | bsd-2-clause | 11,551 | 0 | 23 | 2,849 | 2,552 | 1,346 | 1,206 | 194 | 3 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.FetchUtils
-- Copyright : (c) David Himmelstrup 2005
-- Duncan Coutts 2011
-- License : BSD-like
--
-- Maintainer : cabal-devel@gmail.com
-- Stability : provisional
--... | mydaum/cabal | cabal-install/Distribution/Client/FetchUtils.hs | bsd-3-clause | 10,919 | 0 | 19 | 2,606 | 2,053 | 1,057 | 996 | 186 | 6 |
<?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>SAML Support</title>
<maps>
<homeID>saml</homeID>
<mapref location="map... | thc202/zap-extensions | addOns/saml/src/main/javahelp/help_fil_PH/helpset_fil_PH.hs | apache-2.0 | 959 | 77 | 66 | 156 | 407 | 206 | 201 | -1 | -1 |
{-# LANGUAGE FlexibleContexts, TypeFamilies #-}
module T8978 where
import Data.Kind (Type)
type Syn a = Associated a
class Eq (Associated a) => Foo a where
type Associated a :: Type
foo :: a -> Syn a -> Bool
instance Foo () where
type Associated () = Int
foo _ x = x == x
| sdiehl/ghc | testsuite/tests/indexed-types/should_compile/T8978.hs | bsd-3-clause | 292 | 0 | 9 | 74 | 105 | 57 | 48 | -1 | -1 |
{-|
Purely functional top-down splay sets.
* D.D. Sleator and R.E. Rarjan,
\"Self-Adjusting Binary Search Tree\",
Journal of the Association for Computing Machinery,
Vol 32, No 3, July 1985, pp 652-686.
<http://www.cs.cmu.edu/~sleator/papers/self-adjusting.pdf>
-}
module Data.Set.Splay (
--... | mightymoose/liquidhaskell | benchmarks/llrbtree-0.1.1/Data/Set/Splay.hs | bsd-3-clause | 10,365 | 0 | 19 | 2,798 | 2,476 | 1,303 | 1,173 | 129 | 9 |
module Signature (plugin) where
-- This plugin replaces $SIG$ with the username and timestamp
-- of the last edit, prior to saving the page in the repository.
import Network.Gitit.Interface
import Data.DateTime (getCurrentTime, formatDateTime)
plugin :: Plugin
plugin = PreCommitTransform replacedate
replacedate :: ... | bergmannf/gitit | plugins/Signature.hs | gpl-2.0 | 745 | 0 | 13 | 162 | 225 | 116 | 109 | 16 | 2 |
{-# LANGUAGE TypeFamilies #-}
module T11381 where
-- ensure that this code does not compile without TypeFamilyDependencies and that
-- injectivity error is not reported.
type family F a = r | r -> a
type instance F Int = Bool
type instance F Int = Char
| sdiehl/ghc | testsuite/tests/driver/T11381.hs | bsd-3-clause | 255 | 0 | 4 | 49 | 41 | 28 | 13 | 5 | 0 |
import StackTest
main :: IO ()
main = stackErr ["build"]
| juhp/stack | test/integration/tests/drop-packages/Main.hs | bsd-3-clause | 58 | 0 | 6 | 11 | 25 | 13 | 12 | 3 | 1 |
{-
Counting Sundays
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 leap years, twent... | feliposz/project-euler-solutions | haskell/euler19original.hs | mit | 2,613 | 0 | 12 | 622 | 627 | 345 | 282 | 29 | 2 |
{-# OPTIONS #-}
-- ------------------------------------------------------------
module Holumbus.Crawler.URIs
where
import qualified Data.StringMap.Strict as S
-- ------------------------------------------------------------
-- | An URI is represented as a String
type URI = String
type URIWith... | ichistmeinname/holumbus | src/Holumbus/Crawler/URIs.hs | mit | 2,784 | 0 | 10 | 1,056 | 693 | 376 | 317 | 50 | 1 |
module Y2016.M08.D17.Exercise where
import Data.Aeson
import Data.Set (Set)
import qualified Data.Set as Set
-- the below imported modules are available on this github repository
import Data.MultiMap (MultiMap)
import qualified Data.MultiMap as MM
import Data.Twitter
import Graph.JSON.Cypher.Read.Graphs
import Graph... | geophf/1HaskellADay | exercises/HAD/Y2016/M08/D17/Exercise.hs | mit | 3,011 | 0 | 11 | 553 | 337 | 192 | 145 | 25 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.