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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{- |
Module : Src
Description : Abstract syntax and pretty printer for the source language.
Copyright : (c) 2014—2015 The F2J Project Developers (given in AUTHORS.txt)
License : BSD3
Maintainer : Zhiyuan Shi <zhiyuan.shi@gmail.com>
Stability : experimental
Portability : portable
-}
{-# LANGUAGE D... | hkuplg/fcore | frontend/abstractsyntax/Src.hs | bsd-2-clause | 26,758 | 1 | 19 | 6,938 | 9,325 | 4,909 | 4,416 | 473 | 3 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QStatusBar.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 no... | uduki/hsQt | Qtc/Gui/QStatusBar.hs | bsd-2-clause | 49,742 | 0 | 14 | 8,112 | 16,395 | 8,317 | 8,078 | -1 | -1 |
module Reddit.Actions.PostSpec where
import Reddit
import Reddit.Types.Post
import Reddit.Types.Subreddit (SubredditID(..))
import Utils
import Test.Hspec
isRight :: Either a b -> Bool
isRight = const False `either` const True
isLeft :: Either a b -> Bool
isLeft = const True `either` const False
main :: IO ()
main... | intolerable/reddit | test-anon/Reddit/Actions/PostSpec.hs | bsd-2-clause | 1,954 | 0 | 17 | 478 | 597 | 288 | 309 | 50 | 4 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
-----------------------------------------------------------------------------
-- |
-- Module : Haddock.InterfaceFile
-- Copyright : (c) David Waern 2006-2009
-- License : BSD-like
--
-- Maintainer : haddock@projects.haskell.org
-- Stability : experimental
-- Port... | nominolo/haddock2 | src/Haddock/InterfaceFile.hs | bsd-2-clause | 15,359 | 0 | 17 | 5,022 | 4,224 | 1,995 | 2,229 | -1 | -1 |
{-# LANGUAGE CPP,TemplateHaskell,DeriveDataTypeable #-}
module Data.Encoding.Base
(Encoding(..)
,EncodeState(..)
,encodeMultibyte
,encodeMultibyteLazy
,decodeMultibyte
,decodeMultibyteLazy
,encodeSinglebyte
,encodeSinglebyteLazy
,decodeSinglebyte
,EncodingException(..)
,DecodingException(..)
,decodingArray... | abuiles/turbinado-blog | tmp/dependencies/encoding-0.4.1/Data/Encoding/Base.hs | bsd-3-clause | 5,222 | 18 | 20 | 904 | 1,722 | 939 | 783 | 121 | 5 |
{-# LANGUAGE ScopedTypeVariables #-}
import Data.Convertible
import Data.Prizm.Color
import Data.Prizm.Color.CIE as CIE
main :: IO ()
main = do
-- Convert RGB colors to the CIE.LCH color space
let green :: CIE.LCH = convert $ mkRGB 102 255 0
pink :: CIE.LCH = convert $ mkRGB 2... | ixmatus/prizm | tests/readme-example.hs | bsd-3-clause | 784 | 0 | 11 | 202 | 174 | 94 | 80 | 13 | 1 |
{-# LANGUAGE CPP, DeriveDataTypeable, NoImplicitPrelude #-}
--------------------------------------------------------------------------------
-- |
-- Module : Control.Concurrent.Lock
-- Copyright : (c) 2010-2011 Bas van Dijk & Roel van Dijk
-- License : BSD3 (see the file LICENSE)
-- Maintainer : Bas van Dijk ... | cornell-pl/HsAdapton | src/Control/Concurrent/Lock/Exts.hs | bsd-3-clause | 8,199 | 4 | 19 | 1,551 | 1,156 | 665 | 491 | 83 | 2 |
module RW.Chap5.Prettify
where
import Data.Bits (shiftR, (.&.))
import Data.Char (ord)
import Data.List (intercalate)
import Numeric (showHex)
data Doc = Empty
| Char Char
| Text String
| Line
| Concat Doc Doc
| Union Doc Doc
deriving (Show... | ChrisCoffey/rwh | src/RW/Chap5/Prettify.hs | bsd-3-clause | 5,711 | 0 | 16 | 2,204 | 2,519 | 1,300 | 1,219 | 157 | 7 |
{-# LANGUAGE MultiParamTypeClasses #-}
module Evil.Spaces (
Domain(..), CoDomain(..)
) where
-- mwc-random
import qualified System.Random.MWC as R
-- primitive
import Control.Monad.Primitive
class Domain x where
mkDomain :: (PrimMonad m) => R.Gen (PrimState m) -> m x
class CoDomain x y where
fitnes... | kgadek/evil-pareto-tests | src_old/Evil/Spaces.hs | bsd-3-clause | 332 | 0 | 11 | 68 | 101 | 59 | 42 | 9 | 0 |
{-# LANGUAGE RecordWildCards,DeriveDataTypeable,FlexibleInstances #-}
module Api.Stockfighter.Jailbreak.Decompiler.Print where
import Api.Stockfighter.Jailbreak.Types
import Api.Stockfighter.Jailbreak.Decompiler.AST
import Control.Lens hiding (elements)
import Control.Monad.Trans.Reader
import Data.Char
import Text.... | MichaelBurge/stockfighter-jailbreak | src/Api/Stockfighter/Jailbreak/Decompiler/Print.hs | bsd-3-clause | 6,648 | 0 | 20 | 1,937 | 2,375 | 1,120 | 1,255 | 195 | 1 |
{-# OPTIONS_GHC -w #-}
module LF_Parser (
parseThenCall
, parseTermThenCall
, SimpleTerm
, SyntaxInfo(..)
) where
import IOExts_(trace)
import Data.Array
import Control.Monad (ap)
import Data.Char(isSpace)
import BaseClasses(OkF(..), Embeddable(..), Fallible(..))
import BaseTypes(isOk, fromFail, fromOk,... | part-xx/hott-plastic | LF_Parser.hs | bsd-3-clause | 149,504 | 5,003 | 78 | 22,270 | 45,509 | 24,810 | 20,699 | 4,315 | 72 |
{-# LANGUAGE OverloadedStrings #-}
module Network.TLDR.Client (
Client (), PublicKey, PrivateKey, mkClient, mkDebugClient, getAd,
Ad (), adTitle, adThumbnailURL, adCaption, adUpvotes, adDownvotes,
adPageviews, adMediaType, adEmbedCode, adFullImageURL, adArticleBody
) where
import Control.Applicative
impor... | ThoughtLeadr/TLDR-Client-Haskell | Network/TLDR/Client.hs | bsd-3-clause | 3,913 | 0 | 27 | 932 | 1,236 | 678 | 558 | 99 | 6 |
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Hooks.Script
-- Description : Simple interface for running a ~\/.xmonad\/hooks script with the name of a hook.
-- Copyright : (c) Trevor Elliott <trevor@galois.com>
-- License : BSD3-style (see LICENSE)
--
-... | xmonad/xmonad-contrib | XMonad/Hooks/Script.hs | bsd-3-clause | 1,494 | 0 | 10 | 281 | 118 | 79 | 39 | 8 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Servant.Server.ErrorSpec (spec) where
import Control.Monad.Trans.Exce... | zerobuzz/servant | servant-server/test/Servant/Server/ErrorSpec.hs | bsd-3-clause | 10,104 | 0 | 32 | 2,840 | 2,426 | 1,286 | 1,140 | 192 | 2 |
module Parse.TestHelpersTest where
import Test.Tasty
import Test.Tasty.HUnit
import Parse.TestHelpers
test_tests :: TestTree
test_tests =
testGroup "TestHelpers"
[ testGroup "generateReplacements"
[ testCase "empty" $
assertEqual "" [] $ generateReplacements "a" "b" ""
, testCas... | avh4/elm-format | elm-format-lib/test/Parse/TestHelpersTest.hs | bsd-3-clause | 580 | 0 | 12 | 147 | 140 | 73 | 67 | 14 | 1 |
module Serve.Responses where
import Network.Wai
import Control.Monad.Trans.Resource (ResourceT)
import qualified Data.Text as T
staticFile :: T.Text -> T.Text -> ResourceT IO Response
staticFile subDir name =
| stites/serve | src/Serve/Responses.hs | bsd-3-clause | 211 | 1 | 8 | 28 | 61 | 36 | 25 | -1 | -1 |
-- https://www.schoolofhaskell.com/school/starting-with-haskell/libraries-and-frameworks/text-manipulation/attoparsec
-- http://haddocks.fpcomplete.com/fp/7.8/20140916-162/attoparsec/Data-Attoparsec-Types.html#t:Parser
module Main where
import System.IO
import Data.Char (isSpace)
import Data.List
-- import Data.Attopar... | timerg/parser | data/Mainold.hs | bsd-3-clause | 3,305 | 0 | 8 | 834 | 445 | 262 | 183 | 27 | 1 |
import Control.DeepSeq
import Data.Word
import qualified Data.ByteString as BS
import qualified Data.ByteString.Internal as BS
import qualified Data.Array.Unboxed as UA
import qualified Data.SmallArray as SA
import Criterion.Main
main = defaultMain
[ bgroup "Word8" $
let bs = BS.pack word8s
... | aslatter/smallarray | tests/Benchmark.hs | bsd-3-clause | 2,165 | 0 | 15 | 734 | 670 | 358 | 312 | 49 | 1 |
module ArgParseCCV where
import Control.Monad
import Data.Char
import Data.List
import System.Console.GetOpt
import System.Environment
import System.Exit
import System.IO
import Text.Printf
data Flag
= Email -- --email
| Author -- --author
| Initial -- --init
... | githubkleon/ConvenientHDL | src/ArgParseCCV.hs | bsd-3-clause | 3,036 | 0 | 16 | 1,001 | 737 | 403 | 334 | 76 | 4 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
-- | 'Guider' monad with 'Config' to replace servant's 'Handler'.
module Guide.Api.Guider
(
Guider (..),
Context (..),
guiderToHandler,
)
where
import Imports
import Servant (Handler (..), ServantErr (..))
import Guide.Api.Utils (RequestDetails)
import Guide.Config ... | aelve/guide | back/src/Guide/Api/Guider.hs | bsd-3-clause | 2,062 | 0 | 15 | 397 | 480 | 267 | 213 | -1 | -1 |
import System.IO
import Data.Char
main = do
contents <- readFile "src/files_for_stream/baabaa.txt"
writeFile "src/files_for_stream/baabaacaps.txt" (map toUpper contents)
| ku00/h-book | src/WriteBaaBaaCaps.hs | bsd-3-clause | 179 | 0 | 9 | 25 | 42 | 20 | 22 | 5 | 1 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.Raw.ARB.FramebufferObject
-- Copyright : (c) Sven Panne 2013
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability : portab... | mfpi/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/ARB/FramebufferObject.hs | bsd-3-clause | 3,594 | 0 | 4 | 470 | 337 | 234 | 103 | 98 | 0 |
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
-- | Defines the 'Frame' type, most interesting operations regarding 'Frame's
-- can be found in 'MonadFrame'
module Frame where
import AccelerationStructure
import Camera
import Cleanup
import ... | expipiplus1/vulkan | examples/rays/Frame.hs | bsd-3-clause | 9,441 | 0 | 16 | 2,890 | 1,444 | 798 | 646 | -1 | -1 |
-- File created: 2009-07-15 10:37:42
module Haschoo.Utils where
import Control.Arrow (first, (***))
import Control.Monad (liftM)
import Control.Monad.Error () -- Monad ErrOr
import Control.Monad.State (MonadState, get, put)
import Control.Monad.Trans (MonadIO, liftIO)
import System.IO ... | Deewiant/haschoo | Haschoo/Utils.hs | bsd-3-clause | 3,108 | 0 | 10 | 805 | 1,515 | 820 | 695 | 76 | 4 |
data Dir = N | W | S | E deriving (Eq, Show)
data Pos = Pos Dir Int Int deriving Show
data Cmd = L | R | A deriving (Eq, Read, Show)
moveLeft (Pos N x y) = Pos W (x-1) y
moveLeft (Pos W x y) = Pos S x (y-1)
moveLeft (Pos S x y) = Pos E (x+1) y
moveLeft (Pos E x y) = Pos N x (y+1)
moveRight (Pos N x y) = Pos E (x+1) y... | wangbj/excises | 629.hs | bsd-3-clause | 924 | 0 | 8 | 236 | 623 | 318 | 305 | 25 | 1 |
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
module OpenCV.Calib3d
( FundamentalMatMethod(..)
, WhichImage(..)
-- , calibrateCamera
, findFundamentalMat
, computeCorrespondEpilines
) where
import "base" Data.Int
import "base" Data.Word
import "base" Foreign.C.Types
import qual... | Cortlandd/haskell-opencv | src/OpenCV/Calib3d.hs | bsd-3-clause | 6,614 | 0 | 20 | 1,547 | 1,077 | 599 | 478 | -1 | -1 |
-- | Field Of View scanning.
--
-- See <https://github.com/LambdaHack/LambdaHack/wiki/Fov-and-los>
-- for discussion.
module Game.LambdaHack.Server.Fov
( -- * Perception cache
FovValid(..), PerValidFid
, PerReachable(..), CacheBeforeLucid(..), PerActor
, PerceptionCache(..), PerCacheLid, PerCacheFid
-- * ... | LambdaHack/LambdaHack | engine-src/Game/LambdaHack/Server/Fov.hs | bsd-3-clause | 15,900 | 0 | 19 | 3,824 | 3,509 | 1,920 | 1,589 | -1 | -1 |
module Tct.Its.Data.Problem
( Its (..)
, ItsStrategy
, ItsDeclaration
, initialise
, removeRules
, restrictRules
, validate
--, rvss
, domain
, sizeIsDefined
, isClosed
, closedProof
, updateTimebounds
, startrules
, Progress (..)
, hasProgress
, progress
) where
import qualifi... | ComputationWithBoundedResources/tct-its | src/Tct/Its/Data/Problem.hs | bsd-3-clause | 6,503 | 0 | 16 | 1,641 | 2,213 | 1,217 | 996 | 135 | 2 |
module Chapter7Exercises where
q3 :: (Ord a) => a -> a -> Bool
q3 = undefined
q5 :: a -> a
q5 x = x
tensDigit :: Integral a => a -> a
tensDigit x = d
where xLast = x `div` 10
d = xLast `mod` 10
-- tensDigit' :: Integral a => a -> a
-- tensDigit' x = snd $ divMod x 10
tensDigit' x = (fst $ divMod x 1... | brodyberg/Notes | ProjectRosalind.hsproj/LearnHaskell/lib/HaskellBook/Chapter7Exercises.hs | mit | 625 | 0 | 8 | 197 | 314 | 171 | 143 | 22 | 2 |
{-# LANGUAGE TemplateHaskell #-}
module Types where
import Import
data AppConfig = AppConfig { dbPool :: Text
, redisPool :: Text
}
type AppM = ReaderT AppConfig
type TenantID = Integer
data Tenant = Tenant{}
type UserID = Integer
data User = User{}
type Produc... | meditans/haskell-webapps | skeleton/src/Domain/Types.hs | mit | 771 | 7 | 8 | 170 | 239 | 132 | 107 | 29 | 0 |
-- | Examples:
--
-- >>> import Haskmon
-- >>> getPokemonByName "eevee" :: IO Pokemon
-- Pokemon {pokemonName = "Eevee", pokemonNationalId = 133, ... }
-- >>> getMoveById 1 :: IO Move
-- Move {moveName = "Pound", movePower = 40, movePp = 35, moveAccuracy = 100, moveMetadata = MetaData {resourceUri = "/api/v1/move/1/", ... | bitemyapp/Haskmon | src/Haskmon.hs | mit | 676 | 0 | 5 | 109 | 38 | 28 | 10 | 5 | 0 |
{-# OPTIONS -fglasgow-exts #-}
module RedBlackTree.Insert ( make_fixed, make_quiz ) where
import Challenger.Partial
import Autolib.ToDoc
import Autolib.Reporter
import Autolib.Ana
import Autolib.Size
import Inter.Types
import Inter.Quiz
import RedBlackTree.Param
import System.Random
import Data.Typeable
---------... | florianpilz/autotool | src/Baum/RotSchwarzBaumProjekt/Insert.hs | gpl-2.0 | 6,948 | 2 | 16 | 1,842 | 1,617 | 810 | 807 | -1 | -1 |
module Graphics.UI.GLFW.Utils(withGLFW, openWindow, getVideoModeSize) where
import Control.Exception(bracket_)
import Control.Monad(unless)
import Control.MonadA (MonadA)
import Data.Vector.Vector2 (Vector2(..))
import qualified Graphics.UI.GLFW as GLFW
assert :: MonadA m => String -> Bool -> m ()
assert msg p = unle... | sinelaw/lamdu | bottlelib/Graphics/UI/GLFW/Utils.hs | gpl-3.0 | 746 | 0 | 11 | 98 | 250 | 133 | 117 | 16 | 1 |
main = (3, 4
f x = x
| roberth/uu-helium | test/parser/ForgetClose.hs | gpl-3.0 | 22 | 1 | 6 | 9 | 19 | 10 | 9 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-- ... | olorin/amazonka | amazonka-s3/gen/Network/AWS/S3/DeleteBucket.hs | mpl-2.0 | 2,787 | 0 | 9 | 557 | 341 | 209 | 132 | 48 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-- ... | fmapfmapfmap/amazonka | amazonka-elasticbeanstalk/gen/Network/AWS/ElasticBeanstalk/RestartAppServer.hs | mpl-2.0 | 3,910 | 0 | 11 | 733 | 458 | 280 | 178 | 60 | 1 |
-- Copyright (C) 2017 Red Hat, Inc.
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
--
-- This library i... | atodorov/bdcs | src/BDCS/Label/Docs.hs | lgpl-2.1 | 1,117 | 0 | 7 | 211 | 121 | 78 | 43 | -1 | -1 |
-- * Basic data types
module System.Console.ANSI.Common,
-- * Cursor movement by character
cursorUp, cursorDown, cursorForward, cursorBackward,
hCursorUp, hCursorDown, hCursorForward, hCursorBackward,
cursorUpCode, cursorDownCode, cursorForwardCode, cursorBackwardCode,
-- * Cursor movement by line
cursorUpLine, curso... | ekmett/ansi-terminal | includes/Exports-Include.hs | bsd-3-clause | 1,452 | 3 | 4 | 127 | 140 | 134 | 6 | -1 | -1 |
{-# OPTIONS_GHC -F -pgmF tasty-auto #-}
| s9gf4ult/opticover | test/Spec.hs | bsd-3-clause | 40 | 0 | 2 | 6 | 3 | 2 | 1 | 1 | 0 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE TypeOperators, ExistentialQuantification, FlexibleContexts #-}
{-# LANGUAGE ConstraintKinds, StandaloneDeriving #-}
-- Okay
{-# LANGUAGE FlexibleInstances, UndecidableInstances #-}
{-# OPTIONS_GHC -Wall #-}
-- {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- TEMP
-- {-# OPTIONS_GHC -f... | conal/lambda-ccc | src/LambdaCCC/Run.hs | bsd-3-clause | 4,010 | 0 | 11 | 809 | 780 | 424 | 356 | 54 | 1 |
{-# OPTIONS -fallow-undecidable-instances #-}
import Testsuite
import Data.Array.Parallel.Unlifted.Distributed
import Data.Array.Parallel.Unlifted
import Data.Array.Parallel.Base.Hyperstrict
class (Eq a, DT a, Arbitrary a, Show a) => D a
instance (Eq a, DT a, Arbitrary a, Show a) => D a
class (Eq a, UA a, Arb... | mainland/dph | dph-test/old/Distributed.hs | bsd-3-clause | 4,989 | 0 | 9 | 1,519 | 235 | 137 | 98 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE PatternGuards #-}
{-# LANGUAGE CPP #-}
module Network.Wai.Handler.Warp.HTTP2.Worker (
Respond
, response
, worker
) where
#if __GLASGOW_HASKELL__ < 709
import Control.Applicative
#endif
import Contro... | dylex/wai | warp/Network/Wai/Handler/Warp/HTTP2/Worker.hs | mit | 10,678 | 0 | 18 | 2,666 | 2,196 | 1,106 | 1,090 | 176 | 4 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE Patter... | noughtmare/yi | yi-core/src/Yi/Buffer/Implementation.hs | gpl-2.0 | 18,304 | 0 | 21 | 4,581 | 4,838 | 2,570 | 2,268 | 347 | 3 |
module Model.Utils where
import Import
import Blaze.ByteString.Builder (Builder, toLazyByteString)
import Control.Monad.Reader (MonadReader, ask)
import qualified Data.Text.Lazy as TL
import qualified Data.Text.Lazy.Encoding as TLE
import Yesod (renderRo... | Happy0/snowdrift | Model/Utils.hs | agpl-3.0 | 629 | 0 | 11 | 159 | 174 | 97 | 77 | -1 | -1 |
data List' a = Nil' | Cons' a (List' a)
myMap f Nil' = Nil'
myMap f (Cons' x xs) = Cons' (f x) (myMap f xs)
-- f Nil' = Nil'
-- tail (Cons' x xs) = xs
foo = let x = []
y = []
in (1:x, 'a':y)
map f [] = []
map f (x:xs) = (f x):(map f xs)
idInt :: Int -> Int
idInt x = x
idBool :: Bool -> Bool
idBool... | themattchan/tandoori | input/datatype.hs | bsd-3-clause | 411 | 0 | 9 | 129 | 239 | 126 | 113 | 15 | 1 |
<?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="en-GB">
<title>Automation Framework</title>
<maps>
<homeID>top</homeID>
<ma... | thc202/zap-extensions | addOns/automation/src/main/javahelp/org/zaproxy/addon/automation/resources/help/helpset.hs | apache-2.0 | 978 | 81 | 67 | 169 | 417 | 213 | 204 | -1 | -1 |
{-# LANGUAGE Trustworthy #-}
-----------------------------------------------------------------------------
-- |
-- Module : Control.Arrow
-- Copyright : (c) Ross Paterson 2002
-- License : BSD-style (see the LICENSE file in the distribution)
--
-- Maintainer : libraries@haskell.org
-- Stability : pro... | jwiegley/ghc-release | libraries/base/Control/Arrow.hs | gpl-3.0 | 11,382 | 0 | 17 | 3,035 | 2,557 | 1,400 | 1,157 | 141 | 1 |
{-# LANGUAGE RankNTypes, ScopedTypeVariables #-}
module T11339 where
import Control.Applicative ( Const(Const, getConst) )
import Data.Functor.Identity ( Identity(Identity) )
type Traversal s t a b = forall f. Applicative f => (a -> f b) -> s -> f t
failing :: forall s t a b . Traversal s t a b -> Traversal s t a b... | ezyang/ghc | testsuite/tests/typecheck/should_compile/T11339.hs | bsd-3-clause | 1,089 | 0 | 14 | 282 | 503 | 263 | 240 | 21 | 2 |
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeFamilies #-}
module Unison.Util.AnnotatedText where... | unisonweb/platform | parser-typechecker/src/Unison/Util/AnnotatedText.hs | mit | 8,805 | 0 | 18 | 2,252 | 2,894 | 1,498 | 1,396 | -1 | -1 |
data Color = Red | Green | Blue | Indigo deriving Show
head :: [a] -> a
head (x:_) = x
head [] = error "head error: empty list"
-- pattern matching can be rewriten as expression
head' :: [a] -> a
head' xs = case xs of
(x:_) -> x
[] -> error "head': empty list"
isRGB :: Color ... | djleonskennedy/learning-haskell | src/basics/pattern-matching.hs | mit | 1,188 | 0 | 9 | 293 | 308 | 175 | 133 | 20 | 2 |
{-# LANGUAGE RecordWildCards #-}
--------------------------------------------------------------------
-- |
-- Copyright : (c) 2015 Smelkov Ilya
-- License : MIT
-- Maintainer: Smelkov Ilya <triplepointfive@gmail.com>
-- Stability : experimental
-- Portability: non-portable
--
-- The Triangulate splits up all face... | triplepointfive/soten | src/Codec/Soten/PostProcess/Triangulate.hs | mit | 4,064 | 0 | 17 | 1,038 | 1,031 | 572 | 459 | 64 | 3 |
{- Copyright (C) 2014 Calvin Beck
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, ... | Chobbes/mathform | src/Text/MathForm/Readers/SageTokens.hs | mit | 4,349 | 0 | 8 | 1,768 | 558 | 316 | 242 | 84 | 1 |
module BitBoard where
import qualified Piece
import qualified Move
import qualified Util
import Data.Word
import Data.Bits
import Data.Bits.Extras
import Control.Exception
import Data.List(foldl')
import Debug.Trace
import Text.Printf
type BitBoard = Word64
emptyBoard :: BitBoard
emptyBoard = 0
data Bb = Bb {black ... | ysnrkdm/Hamlet | src/BitBoard.hs | mit | 15,217 | 0 | 18 | 4,414 | 5,467 | 2,899 | 2,568 | 331 | 17 |
{-# LANGUAGE PatternSynonyms #-}
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.SVGGraphicsElement
(getBBox, getBBox_, getCTM, getCTM_, getScreenCTM, getScreenCTM_,
getTransformToElemen... | ghcjs/jsaddle-dom | src/JSDOM/Generated/SVGGraphicsElement.hs | mit | 5,434 | 0 | 12 | 895 | 1,087 | 608 | 479 | 86 | 1 |
module Y2021.M03.D05.Solution where
{--
'Shell scripting' Haskell is the name of the game for today.
Today we're going to build a Haskell application that interacts with the
shell, or 'command line,' if you prefer.
Specifically, we're creating the application 'im' that has this interaction:
$ im geophf
Hello, geoph... | geophf/1HaskellADay | exercises/HAD/Y2021/M03/D05/Solution.hs | mit | 1,179 | 0 | 8 | 235 | 83 | 47 | 36 | 6 | 1 |
module Interpreter (
addBreak, removeBreak, toggleBreak,
interpret, step, reset
)
where
import qualified Graphics.UI.Gtk as Gtk
import qualified InterfaceDT as IDT
import qualified TextAreaContent as TAC
import qualified Lexer
import qualified Data.... | SWP-Ubau-SoSe2014-Haskell/SWPSoSe14 | src/RailEditor/Interpreter.hs | mit | 17,084 | 0 | 22 | 4,112 | 6,610 | 3,218 | 3,392 | 377 | 30 |
factorial :: Integer -> Integer
factorial 0 = 1
factorial n = n * factorial (n - 1)
--solution = 40 choose 20
solution = factorial 40 `div` (factorial 20 * factorial 20) | DylanSp/Project-Euler-in-Haskell | prob15/solution.hs | mit | 170 | 0 | 8 | 33 | 68 | 35 | 33 | 4 | 1 |
{-# htermination (-) :: Float -> Float -> Float #-}
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/Prelude_MINUS_3.hs | mit | 52 | 0 | 2 | 10 | 3 | 2 | 1 | 1 | 0 |
{-# LANGUAGE TemplateHaskell #-}
module UnitTest.RequestParse.TemplateRequests where
import Data.Aeson (Value)
import Data.List.NonEmpty (NonEmpty(..))
import Data.Yaml.TH (decodeFile)
import Test.Tasty as Tasty
import Web.Facebook.Messenger
import UnitTest.Internal
-----------------------
-- TEMPLATE REQUESTS --
... | Vlix/facebookmessenger | test/UnitTest/RequestParse/TemplateRequests.hs | mit | 7,236 | 0 | 13 | 2,911 | 914 | 503 | 411 | -1 | -1 |
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
module Trans.HaskellToText (moduleToText) where
import Data.List (intersperse)
import Data.String (fromString)
import Text.PrettyPrint.Leijen.Text (hcat, vcat)
import... | zenhack/haskell-capnp | cmd/capnpc-haskell/Trans/HaskellToText.hs | mit | 11,190 | 0 | 18 | 3,710 | 3,407 | 1,752 | 1,655 | 252 | 1 |
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
-- C->Haskell Compiler: binding generator
--
-- Copyright (c) [1999..2003] Manuel M T Chakravarty
--
-- This file is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free So... | ian-ross/c2hs-macos-test | c2hs-0.26.1/src/C2HS/Gen/Bind.hs | mit | 129,342 | 16 | 36 | 40,263 | 31,301 | 15,964 | 15,337 | 2,199 | 36 |
module TypeInterference2 where
f x y = x + y + 3
| Numberartificial/workflow | haskell-first-principles/haskell-from-first-principles-master/05/05.06.01-type-interference2.hs | mit | 50 | 0 | 6 | 13 | 22 | 12 | 10 | 2 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafregional-bytematchset.html
module Stratosphere.Resources.WAFRegionalByteMatchSet where
import Stratosphere.... | frontrowed/stratosphere | library-gen/Stratosphere/Resources/WAFRegionalByteMatchSet.hs | mit | 2,232 | 0 | 15 | 248 | 279 | 162 | 117 | 31 | 1 |
module Test where
{
import PopGen;
import Probability;
get_observed_alleles file = map list_from_vector $ list_from_vector $ read_phase_file file;
filename = "/home/bredelings/Reports/Kmar/NNKB2.phase1.infile";
data1 = get_observed_alleles filename;
n_loci = length data1;
n_individuals = (length (data... | bredelings/BAli-Phy | tests/PartialSelfing/diploid.pure_herm.single_theta.NNKB2.hs | gpl-2.0 | 674 | 13 | 15 | 108 | 256 | 145 | 111 | -1 | -1 |
{-| GenOpCodes handles Python opcode generation.
GenOpCodes contains the helper functions that generate the Python
opcodes as strings from the Haskell opcode description.
-}
{-
Copyright (C) 2011, 2012, 2013 Google Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the ... | vladimir-ipatov/ganeti | src/Ganeti/Hs2Py/GenOpCodes.hs | gpl-2.0 | 2,642 | 0 | 21 | 545 | 505 | 260 | 245 | 39 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_HADDOCK show-extensions #-}
-- |
-- Module : System.CanonicalizePath
-- License : GPL-2
-- Maintainer : yi-devel@googlegroups.com
-- Stability : experimental
-- Portability : portable
--
-- System.Directory.canonicalizePath replacemen... | atsukotakahashi/wi | src/library/System/CanonicalizePath.hs | gpl-2.0 | 3,360 | 0 | 16 | 721 | 703 | 382 | 321 | 52 | 3 |
{-# LANGUAGE DeriveGeneric, OverloadedStrings #-}
-- The type Ensemble represents all information about an ensemble that is shared
-- between a given client and a server, including but not limited to all of the
-- live coding "programs" to be rendered by the client.
--
-- (See also EnsembleS which wraps this typ... | d0kt0r0/estuary | common/src/Estuary/Types/Ensemble.hs | gpl-3.0 | 4,308 | 0 | 15 | 915 | 1,055 | 587 | 468 | 85 | 1 |
module Hledger (
module Hledger.Data
,module Hledger.Query
,module Hledger.Read
,module Hledger.Reports
,module Hledger.Utils
,tests_Hledger
)
where
import Test.HUnit
import Hledger.Data
import Hledger.Query
import Hledger.Read ... | kmels/hledger | hledger-lib/Hledger.hs | gpl-3.0 | 525 | 0 | 6 | 157 | 95 | 60 | 35 | 19 | 1 |
module Arel.Util where
import Data.Text (unpack)
import Prelude hiding (FilePath)
import Shelly
---
eitherToMaybe :: Either a b -> Maybe b
eitherToMaybe (Left _) = Nothing
eitherToMaybe (Right b) = Just b
fptos :: FilePath -> String
fptos = unpack . toTextIgnore
| fosskers/arel | Arel/Util.hs | gpl-3.0 | 268 | 0 | 7 | 47 | 95 | 52 | 43 | 9 | 1 |
module NLP.Summarizer
( summarize
, SummarizerResult(..))
where
import NLP.Summarizer.Arguments
import NLP.Summarizer.Article
import NLP.Summarizer.Dictionary
import NLP.Summarizer.Grader
import NLP.Summarizer.Highlighter
import NLP.Summarizer.Sentence
import Data.Text (Text)
import qualified Data.Text as T
da... | rainbyte/summarizer | src/NLP/Summarizer.hs | gpl-3.0 | 1,091 | 0 | 14 | 295 | 241 | 141 | 100 | 29 | 1 |
{-# OPTIONS -Wall #-}
{-# LANGUAGE TemplateHaskell, FlexibleContexts, RelaxedPolyRec #-}
module Main where
-- import Text.Parsec
import System.Console.Haskeline.Class
import Control.Monad.State
import HMumps.Runtime
import HMumps.Parsers
import Templates
main :: IO ()
main = do
-- hSetBuffering stdout NoBufferin... | aslatter/hmumps | Main.hs | gpl-3.0 | 1,676 | 1 | 20 | 505 | 552 | 272 | 280 | 42 | 4 |
module HtmlWriter
( File (..)
, Tag (..)
, generateWebsite
, html
, heading
, body
, button
, title
, a
, h1
, p
, img
, footer
, divis
, javascript
, stylesheet
, (==>)
)
where
-- | Represents a physic fi... | zapateo/htmlWriter | HtmlWriter.hs | gpl-3.0 | 3,819 | 0 | 14 | 1,546 | 965 | 515 | 450 | 92 | 1 |
{-- Code defining what is in an assertion context
-}
module Logic.SecPAL.Context where
import Logic.SecPAL.Language
import Logic.SecPAL.Substitutions
import Logic.SecPAL.Pretty
data Context = Context { ac :: AC
, localAC :: AC
, d :: D
, theta :: [... | bogwonch/SecPAL | src/Logic/SecPAL/Context.hs | gpl-3.0 | 938 | 0 | 12 | 348 | 273 | 154 | 119 | 26 | 1 |
module Main where
import PupEventsClient as Client
import PupEventsPQueue
import Control.Concurrent.STM
import Events
import Control.Monad
import Text.Parsec
import HandlersClient
import Control.Concurrent
import Control.Exception.Base (finally)
main =
do (q1, q2, dc) <- doClient Nothing 3
forkIO $ recvE... | RocketPuppy/PupCollide | Client/Test.hs | gpl-3.0 | 940 | 0 | 15 | 295 | 265 | 132 | 133 | 28 | 2 |
module Game where
import Control.Concurrent.STM
import Control.Lens
import Control.Monad.STM.Class
import qualified Data.Map as M
import qualified Data.Set as S
import H.IO
import H.Prelude
import Object
import Parallel
import Types
import Types.Time
gameSim :: Game -> IO ()
gameSim g = do
parallelize splitByAirp... | ktvoelker/airline | src/Game.hs | gpl-3.0 | 3,083 | 0 | 18 | 609 | 1,095 | 531 | 564 | -1 | -1 |
module Data.List.Utils
( groupOn
, sortOn
, minimumOn
, insertAt
, removeAt
, nonEmptyAll
, match
, isLengthAtLeast
, withPrevNext
) where
import qualified Control.Lens as Lens
import Control.Lens.Operators
import Data.Function (on)
import Data.List... | rvion/lamdu | bottlelib/Data/List/Utils.hs | gpl-3.0 | 1,342 | 0 | 10 | 375 | 660 | 358 | 302 | 41 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE ViewPatterns #-}
-- Module : Gen.AST.Data.Syntax
-- Copyright : (c) 2013-2015 Brendan Hay
-- License : This Source ... | fmapfmapfmap/amazonka | gen/src/Gen/AST/Data/Syntax.hs | mpl-2.0 | 25,908 | 0 | 18 | 8,555 | 10,429 | 5,179 | 5,250 | -1 | -1 |
<h3>Example 36 (compact palette syntax #1)</h3>
<plot height=300 aspect=3 stroke-width=2 x="[[seq(0,4*PI,101)]]"
axis-x-label="Time" axis-y-label="sin(x) / cos(x)">
<lines y="[[sin(x)]]" stroke="[[@P{#7F7F7F:#FF0000}(y)]]"/>
<lines y="[[cos(x)]]" stroke="[[@P{0 green; 1 orange}(y)]]"/>
</plot>
<plot height=... | openbrainsrc/hRadian | examples/Example/defunct/Eg36.hs | mpl-2.0 | 1,189 | 74 | 47 | 155 | 475 | 224 | 251 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-admin-directory/gen/Network/Google/Resource/Directory/Tokens/Delete.hs | mpl-2.0 | 3,197 | 0 | 15 | 762 | 390 | 234 | 156 | 62 | 1 |
{-
Copyright (C) 2007 John Goerzen <jgoerzen@complete.org>
All rights reserved.
For license and copyright information, see the file COPYRIGHT
-}
{- |
Module : Data.ListLike.Utils
Copyright : Copyright (C) 2007 John Goerzen
License : LGPL
Maintainer : John Goerzen <jgoerzen@complete.org>
Stab... | jgoerzen/listlike | src/Data/ListLike/Utils.hs | lgpl-2.1 | 2,477 | 0 | 10 | 612 | 630 | 367 | 263 | -1 | -1 |
module DigitalRoot where
digitalRoot :: Integral a => a -> a
digitalRoot x
| x < 10 = x
| otherwise = digitalRoot(digitalRoot (x `div` 10) + (x `mod` 10)) | m3mitsuppe/haskell | exercises/CodeWars.hsproj/DigitalRoot.hs | unlicense | 165 | 0 | 11 | 40 | 78 | 41 | 37 | 5 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Testing
(testCommon)
where
import PPrelude
import TriePath
import Data.Aeson as A
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as LBS
import Data.Char (digitToInt)
import ... | haroldcarr/learn-haskell-coq-ml-etc | haskell/playpen/blockchain/ben-kirwin-merkle/test/Testing.hs | unlicense | 1,756 | 0 | 13 | 462 | 538 | 284 | 254 | 40 | 1 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE LambdaCase #-}
... | dorchard/camfort | src/Language/Fortran/Model/Op/Core/Eval.hs | apache-2.0 | 9,076 | 0 | 20 | 2,053 | 1,909 | 1,011 | 898 | 144 | 9 |
{-# LANGUAGE OverloadedStrings #-}
module FM.NetEase.Crypto (
toHex
, encryptAES
, encryptRSA
, encryptSongId
, encryptPassword
) where
import qualified Crypto.Error as C
import qualified Crypto.Cipher.AES as C
import qualified Crypto.Cipher.Types as C
import qualified Crypto.Hash as C
import Data.Bits (x... | foreverbell/fm-client | lib/FM/NetEase/Crypto.hs | bsd-3-clause | 2,635 | 0 | 14 | 722 | 727 | 406 | 321 | 55 | 3 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
Desugaring exporessions.
-}
{-# LANGUAGE CPP #-}
module Language.Haskell.Liquid.Desugar710.DsExpr ( dsExpr, dsLExpr, dsLocalBinds, dsValBinds, dsLit ) where
-- #include "HsVersions.h"
import Prelude hiding (error)
impo... | ssaavedra/liquidhaskell | src/Language/Haskell/Liquid/Desugar710/DsExpr.hs | bsd-3-clause | 38,735 | 47 | 25 | 11,504 | 7,956 | 4,074 | 3,882 | 533 | 11 |
module LSC2012.TestCatch where
import Data.Data
import Test.LazySmallCheck2012
import Benchmarks.Catch
import System.Environment
instance Serial Value where
series = cons0 Bottom \/ cons2 Value
instance Serial CtorName where
series = cons0 Ctor \/ cons0 CtorN \/ cons0 CtorR \/ cons0 CtorNR
instance Serial V... | UoYCS-plasma/LazySmallCheck2012 | suite/performance/LSC2012/TestCatch.hs | bsd-3-clause | 461 | 0 | 9 | 88 | 146 | 74 | 72 | 14 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Codex.Meetup.M1.Compression.Inflate (
compress,
decompress,
compressFile,
decompressFile
) where
import qualified Codex.Lib.Compression as C
(Compression (..))
import Data.List
(stripPrefix)
import qualified Data.ByteString.Lazy as B
prefix = ".raw"
instance C.Compre... | adarqui/Codex | src/Codex/Meetup/M1/Compression/Inflate.hs | bsd-3-clause | 1,279 | 0 | 14 | 223 | 445 | 230 | 215 | 38 | 2 |
{-# Language QuasiQuotes #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TemplateHaskell #-}
{- Generates C instrumentation code for the list 'variables' of (name, type)
tuples. The files 'out/instrumented.{c,h}' are generated. -}
module Ivory.RTVerification.GenSettersGetters
( getters... | GaloisInc/ivory-rtverification | rtv-lib/src/Ivory/RTVerification/GenSettersGetters.hs | bsd-3-clause | 6,263 | 0 | 18 | 1,313 | 1,378 | 799 | 579 | 109 | 5 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
module Opaleye.TF.Col where
-- | The workhorse type family in @opaleye-tf@. This type family "collapses"
-- noisy types down into things that are more meaningful. F... | ocharles/opaleye-tf | src/Opaleye/TF/Col.hs | bsd-3-clause | 444 | 0 | 7 | 73 | 41 | 30 | 11 | 7 | 0 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
-----------------------------------------------------------------------------
-- |
-- Module : Network.Oracle.OCI.Internal.Model.Error
-- License : BSD-style (see the file LICENSE)
--
-- Maintainer : Owain Lewis <owain@owainlewis.com>
--... | owainlewis/bmcs-haskell-sdk | src/Network/Oracle/OCI/Common/Api.hs | bsd-3-clause | 823 | 0 | 8 | 147 | 113 | 73 | 40 | 12 | 0 |
module HVG.ContextState where
import Data.Monoid
import qualified Data.Map.Strict as M
import qualified Data.Set as S
import HVG.Type
type Link = [LinkPoint]
class StringValue a where
strValue :: a -> String
data TextAlign
= TextStart
| TextEnd
| TextLeft
| TextRight
| TextCenter
instance StringValue T... | CindyLinz/Haskell-HVG | src/HVG/ContextState.hs | bsd-3-clause | 7,765 | 0 | 11 | 1,491 | 2,245 | 1,218 | 1,027 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TemplateHaskell #-}
module Retcon.Monad where
import Control.Applicative
import Control.Exception
import Control.Lens
import Control.Monad.Error.Class
import ... | anchor/retcon | lib/Retcon/Monad.hs | bsd-3-clause | 1,736 | 0 | 9 | 387 | 248 | 145 | 103 | 34 | 1 |
import qualified Zora.List as ZList
import qualified Data.Char as Char
cancel :: (Integer, Integer) -> (Integer, Integer)
cancel (a, b) = (aa, bb)
where aa = f a b
bb = f b a
f :: Integer -> Integer -> Integer
f a b = if ((show a) !! 0) == ((show a) !! 1)
then div a 10
else ff a b
ff :: Intege... | bgwines/project-euler | src/solved/problem33.hs | bsd-3-clause | 1,340 | 6 | 12 | 269 | 602 | 333 | 269 | 37 | 2 |
-----------------------------------------------------------------------------
-- |
-- Module : System.Win32.Com.HDirect.Pointer
-- Copyright : (c) Daan Leijen, leijen@@fwi.uva.nl 1998
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : sof@forkIO.com
-- Stability : provis... | jjinkou2/ComForGHC7.4 | System/Win32/Com/HDirect/Pointer.hs | bsd-3-clause | 2,964 | 4 | 14 | 677 | 781 | 409 | 372 | 57 | 2 |
{-# LANGUAGE OverloadedStrings, FlexibleInstances #-}
module Text.HTML.TagStream.Types where
import Data.Monoid
import Data.ByteString (ByteString)
import qualified Data.ByteString.Char8 as S
import Blaze.ByteString.Builder (Builder, fromByteString, toByteString)
type Attr' s = (s, s)
type Attr = Attr' ByteString
dat... | yihuang/tag-stream | Text/HTML/TagStream/Types.hs | bsd-3-clause | 1,561 | 0 | 12 | 382 | 574 | 312 | 262 | 40 | 4 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE NoNamedWildCards #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
{-# OPTIONS_GHC -Wno-orphans #-}
-----------------------------------------------------------------------------
-- |
-- Mod... | goldfirere/singletons | singletons-base/src/Data/Semigroup/Singletons/Internal.hs | bsd-3-clause | 6,760 | 1 | 14 | 1,794 | 433 | 260 | 173 | -1 | -1 |
module Language.GLSL.Parser where
import Prelude hiding (break, exponent)
import Text.ParserCombinators.Parsec hiding (State, parse)
import Text.ParserCombinators.Parsec.Expr
import Language.GLSL.Syntax
----------------------------------------------------------------------
-- Parser state, hold a symbol table.
----... | chpatrick/language-glsl | Language/GLSL/Parser.hs | bsd-3-clause | 27,234 | 0 | 20 | 5,555 | 7,142 | 3,533 | 3,609 | 641 | 3 |
{-# LANGUAGE OverloadedStrings #-}
module PackageSummary where
import Data.Aeson ((.:), (.=))
import qualified Data.Aeson as Json
import qualified Data.Aeson.Encode.Pretty as Json
import qualified Data.List as List
import qualified Data.ByteString.Lazy.Char8 as LBS
import qualified System.Directory as Dir
import Syste... | mgold/package.elm-lang.org | src/backend/PackageSummary.hs | bsd-3-clause | 3,105 | 0 | 17 | 1,006 | 817 | 433 | 384 | 86 | 4 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Bot.Type
( Bot
, runBot
)
where
import Control.Applicative ((<|>))
import qualified Control.Concurrent.STM as STM
import Control.Lens
import Control.Monad.Catch (MonadThrow)
import Control.Monad.IO.Class (Mona... | frublox/aichanbot | src/Bot/Type.hs | bsd-3-clause | 3,310 | 0 | 15 | 1,051 | 920 | 493 | 427 | 75 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE NoStarIsType #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.Num.Singletons
-- Cop... | goldfirere/singletons | singletons-base/src/GHC/Num/Singletons.hs | bsd-3-clause | 3,969 | 6 | 14 | 1,100 | 739 | 416 | 323 | -1 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.