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 Language.Calc.Options where
data Options = Options { optShowVersion :: Bool
, optShowOutScan :: Bool
, optShowOutParser :: Bool
, optShowHelp :: Bool
} deriving Show
defaultOptions :: Options
defaultOption... | jfcmacro/calc | src/Language/Calc/Options.hs | bsd-3-clause | 547 | 0 | 8 | 271 | 79 | 51 | 28 | 11 | 1 |
{-# LANGUAGE DeriveFunctor, EmptyDataDecls, OverloadedStrings #-}
{-# LANGUAGE StandaloneDeriving #-}
module LXC.Compat (LXC(), withContainer, Container(..)) where
import ClassyPrelude.Yesod
data LXC a = LXC
instance Monad LXC where
return _ = LXC
_ >>= _ = LXC
deriving instance Fun... | konn/leport | leport-web/LXC/Compat.hs | bsd-3-clause | 748 | 0 | 9 | 207 | 193 | 106 | 87 | 24 | 1 |
-- UUAGC 0.9.50 (src-ag/HsToken.ag)
module HsToken where
{-# LINE 2 "./src-ag/HsToken.ag" #-}
import CommonTypes
import UU.Scanner.Position(Pos)
{-# LINE 10 "dist/build/HsToken.hs" #-}
-- HsToken -----------------------------------------------------
{-
alternatives:
alternative AGLocal:
child var ... | norm2782/uuagc | src-generated/HsToken.hs | bsd-3-clause | 1,819 | 0 | 9 | 663 | 164 | 103 | 61 | 12 | 0 |
-- Copyright 2006, Bjorn Bringert.
-- Copyright 2009, Henning Thielemann.
module Network.MoHWS.Server.Request where
import qualified Network.MoHWS.HTTP.Request as Request
import Network.BSD (HostEntry, )
import Network.Socket (HostAddress, PortNumber, )
-- | All the server's information about a request
data T body =... | xpika/mohws | src/Network/MoHWS/Server/Request.hs | bsd-3-clause | 992 | 0 | 10 | 265 | 199 | 120 | 79 | 23 | 0 |
-- |
-- Module: Math.NumberTheory.EisensteinIntegersTests
-- Copyright: (c) 2018 Alexandre Rodrigues Baldé
-- Licence: MIT
-- Maintainer: Alexandre Rodrigues Baldé <alexandrer_b@outlook.
--
-- Tests for Math.NumberTheory.EisensteinIntegers
--
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
module Math.NumberT... | Bodigrim/arithmoi | test-suite/Math/NumberTheory/EisensteinIntegersTests.hs | mit | 7,581 | 0 | 17 | 1,771 | 1,691 | 914 | 777 | 112 | 1 |
module Web.Slack.Prelude
(
(<$>),
(<*>),
FromJSON(..),
Value(..),
(.:),
eitherDecode,
Generic,
Text,
unpack,
printf,
liftIO,
get,
hoistEither
)
where
import Control.Applicative((<... | dhrosa/hslack | Web/Slack/Prelude.hs | mit | 612 | 0 | 6 | 193 | 176 | 119 | 57 | 23 | 0 |
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE ViewPatterns #-}
module Unison.Type where
impor... | CGenie/platform | shared/src/Unison/Type.hs | mit | 9,416 | 15 | 29 | 2,152 | 3,954 | 2,047 | 1,907 | 224 | 16 |
module Data.Graph.Inductive.Query (module Q) where
import Data.Graph.Inductive.Query.ArtPoint as Q
import Data.Graph.Inductive.Query.BCC as Q
import Data.Graph.Inductive.Query.BFS as Q
import Data.Graph.Inductive.Query.DFS as Q
import Data.Graph.Inductive.Query.Dominators as Q
import Data.Graph.... | antalsz/hs-to-coq | examples/graph/graph/Data/Graph/Inductive/Query.hs | mit | 702 | 0 | 4 | 119 | 144 | 114 | 30 | 14 | 0 |
-- {-# LANGUAGE #-}
{-# OPTIONS_GHC -Wall #-}
----------------------------------------------------------------------
-- |
-- Module : Data.NameM
-- Copyright : (c) Conal Elliott 2009
-- License : AGPLv3
--
-- Maintainer : conal@conal.net
-- Stability : experimental
--
-- Name supply monad. Non-abs... | sseefried/shady-gen | src/Data/NameM.hs | agpl-3.0 | 854 | 0 | 11 | 178 | 182 | 104 | 78 | 13 | 1 |
{-# LANGUAGE StandaloneDeriving #-}
{-# OPTIONS_GHC -Wall -fno-warn-orphans #-}
----------------------------------------------------------------------
-- |
-- Module : Graphics.Shady.Language.Equality
-- Copyright : (c) Conal Elliott 2009
-- License : GPL-3
--
-- Maintainer : conal@conal.net
-- Stabili... | conal/shady-gen | src/Shady/Language/Equality.hs | agpl-3.0 | 947 | 0 | 3 | 174 | 23 | 21 | 2 | 3 | 0 |
{-# LANGUAGE DeriveAnyClass #-}
module Haskus.Format.Elf.Segment
( Segment (..)
, SegmentType (..)
, SegmentFlag (..)
, SegmentFlags
, getSegment
, putSegment
-- * Internal
, getSegmentCount
, getSegmentTable
)
where
import Data.Vector (Vector)
import qualified Data.Vector as Vector
imp... | hsyl20/ViperVM | haskus-system/src/lib/Haskus/Format/Elf/Segment.hs | bsd-3-clause | 6,383 | 0 | 14 | 2,103 | 1,302 | 687 | 615 | 150 | 2 |
------------------------------------------------------------------------
-- |
-- Module : Kask.Data.Tree.Search
-- Copyright : (c) 2014 Konrad Grzanek
-- License : BSD-style (see the file LICENSE)
-- Created : 2014-10-25
-- Maintainer : kongra@gmail.com
-- Stability : experimental
-- Portability : por... | kongra/kask-base | src/Kask/Data/Tree/Search.hs | bsd-3-clause | 1,930 | 0 | 10 | 431 | 368 | 212 | 156 | 31 | 1 |
{-# LANGUAGE CPP, DefaultSignatures, FlexibleContexts #-}
-- |
-- Module: Data.Aeson.Types.Class
-- Copyright: (c) 2011-2015 Bryan O'Sullivan
-- (c) 2011 MailRank, Inc.
-- License: Apache
-- Maintainer: Bryan O'Sullivan <bos@serpentine.com>
-- Stability: experimental
-- Portability: portable... | neobrain/aeson | Data/Aeson/Types/Class.hs | bsd-3-clause | 9,453 | 0 | 11 | 2,012 | 815 | 528 | 287 | 53 | 6 |
{-# LANGUAGE TemplateHaskell, TypeOperators, GADTs, KindSignatures #-}
{-# LANGUAGE ViewPatterns, PatternGuards, LambdaCase #-}
{-# LANGUAGE FlexibleContexts, ConstraintKinds #-}
{-# LANGUAGE MagicHash, MultiWayIf, CPP #-}
{-# LANGUAGE Rank2Types #-}
{-# OPTIONS_GHC -Wall #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #... | capn-freako/lambda-ccc | src/LambdaCCC/Unused/SReify.hs | bsd-3-clause | 28,768 | 0 | 17 | 6,830 | 5,216 | 2,805 | 2,411 | 358 | 4 |
module Test.Hspec.Runner (module Test.Hspec.Core.Runner) where
import Test.Hspec.Core.Runner
| hspec/hspec | src/Test/Hspec/Runner.hs | mit | 103 | 0 | 5 | 17 | 24 | 17 | 7 | 2 | 0 |
{-# LANGUAGE LambdaCase #-}
import Data.List
import Data.Maybe
import Data.Ord
import Data.Array.Unboxed
import Data.Array.ST
import Control.Applicative
import Control.Monad
import Control.Monad.State.Lazy
import Control.Monad.ST
import qualified Data.ByteString.Char8 as B
data Point = Point { location :: (Int, Int)
... | c910335/2D-Rank-Finding-Problem | main.hs | mit | 1,630 | 0 | 13 | 431 | 763 | 392 | 371 | 53 | 3 |
{-# LANGUAGE FlexibleContexts #-}
{-| Implementation of functions specific to configuration management.
-}
{-
Copyright (C) 2014 Google Inc.
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. Redist... | mbakke/ganeti | src/Ganeti/WConfd/ConfigVerify.hs | bsd-2-clause | 5,407 | 0 | 23 | 1,216 | 914 | 467 | 447 | 71 | 2 |
module SubHask.Algebra.Ring
where
import SubHask.Algebra
import SubHask.Category
import SubHask.Internal.Prelude
--------------------------------------------------------------------------------
-- | Every free module can be converted into a ring with this type.
-- Intuitively, this lets us use all our code desig... | abailly/subhask | src/SubHask/Algebra/Ring.hs | bsd-3-clause | 1,797 | 0 | 8 | 291 | 538 | 272 | 266 | -1 | -1 |
compress :: [a] -> [a]
compress [] = []
compress [a] = [a]
compress (x:y:xs)
| (x == y) = compress (x:xs)
| otherwise = x : compress (y:xs)
{- Helium does not have a class Eq -}
| roberth/uu-helium | test/thompson/Thompson24.hs | gpl-3.0 | 193 | 0 | 9 | 53 | 108 | 56 | 52 | 6 | 1 |
module Arithmetic where
import Control.Concurrent
import Control.Concurrent.MVar
import System.IO.Unsafe
import Utilities
import Converter
import Stream
import Data.Ratio
import Trit
-- Negate a stream of Gray code
negateGray :: Gray -> Gray
negateGray = fl
-- Multiply a Gray code stream by 2
-- The stream must re... | sdiehl/ghc | testsuite/tests/concurrent/prog001/Arithmetic.hs | bsd-3-clause | 9,047 | 70 | 26 | 5,737 | 2,746 | 1,337 | 1,409 | 167 | 13 |
{-# LANGUAGE BangPatterns, CPP, FlexibleInstances, OverloadedStrings,
RecordWildCards, TypeSynonymInstances #-}
{-# OPTIONS_GHC -funbox-strict-fields #-}
module Main ( main ) where
import Control.Applicative
import Control.Exception (evaluate)
import Control.DeepSeq
import Criterion.Main
import Data.Byte... | treeowl/cassava | benchmarks/Benchmarks.hs | bsd-3-clause | 5,577 | 0 | 20 | 1,806 | 1,361 | 703 | 658 | 134 | 1 |
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE DataKinds, KindSignatures, PolyKinds #-}
pattern PATTERN = ()
data Proxy (tag :: k) (a :: *)
wrongLift :: Proxy PATTERN ()
wrongLift = undefined
| urbanslug/ghc | testsuite/tests/patsyn/should_fail/T9161-2.hs | bsd-3-clause | 194 | 0 | 6 | 33 | 47 | 28 | 19 | -1 | -1 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}
module Futhark.IR.SeqMem
( SeqMem,
-- * Simplification
simplifyProg,
simpleSeqMem,
-- * Module re-exports
module Futhark.IR.... | diku-dk/futhark | src/Futhark/IR/SeqMem.hs | isc | 2,244 | 0 | 9 | 372 | 587 | 319 | 268 | -1 | -1 |
module Tests(tests) where
import Distribution.TestSuite.QuickCheck
import Test.QuickCheck
import Data.List
import Test.QuickCheck.Monadic
import Control.Monad.Identity
import Agricola
import Update
import Data.Maybe
instance Arbitrary Building where
arbitrary = elements [Stall,Stable,Cottage
... | Tritlo/Agricola | src-test/Tests.hs | mit | 6,945 | 1 | 15 | 2,147 | 2,215 | 1,129 | 1,086 | 161 | 1 |
--------------------------------------------------------------------------------
{-# LANGUAGE OverloadedStrings #-}
import Data.Monoid (mappend)
import Hakyll
import Data.Maybe (fromMaybe)
import Control.Monad (liftM)
------------------------------------------------------------... | jackft/jackft.github.io | entropyfactor/site.hs | mit | 2,850 | 0 | 21 | 929 | 525 | 247 | 278 | 61 | 2 |
{-|
Module: Y2015.D08
Description: Advent of Code Day 08 Solutions.
License: MIT
Maintainer: @tylerjl
Solutions to the day 08 set of problems for <adventofcode.com>.
-}
module Y2015.D08 (difference, encoded) where
body :: [a] -> [a]
body [] = []
body [_] = []
body xs = tail $ init xs
hexChars :: String
... | tylerjl/adventofcode | src/Y2015/D08.hs | mit | 1,735 | 0 | 10 | 570 | 590 | 313 | 277 | 34 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Network.Server
-- Copyright : (c) Phil Hargett 2016
-- License : MIT (see LICENSE file)
--
-- Maintainer : phil@haphazardhouse.net
-- Stability : $(Stability)
-- Portability : $(Portability)
--
--
--------... | hargettp/paxos | src/Network/Server.hs | mit | 1,231 | 0 | 15 | 195 | 182 | 96 | 86 | 15 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
module MVC.Action where
import Control.Applicative
impo... | tonyday567/mvc-extended | src/MVC/Action.hs | mit | 5,457 | 0 | 26 | 1,525 | 1,537 | 765 | 772 | 139 | 6 |
{-# LANGUAGE ScopedTypeVariables #-}
import Control.Monad
import System.Random
promptMessage :: Int -> IO ()
promptMessage tries =
if tries < 5
then putStrLn "Not correct, try again!"
else putStrLn "You have used up opportunities, quitting..."
guess :: Int -> Int -> IO Bool
guess tries actual =
if tries ... | hnfmr/beginning_haskell | ex9.1.hs | mit | 715 | 0 | 12 | 201 | 219 | 107 | 112 | 23 | 3 |
module Utility.Terminal (
Color (..),
Style (..),
Weight (..),
errorString,
infoString,
styledString
) where
data Color = Red | Green | Yellow | Blue | Magenta | Cyan | Black | White | Default deriving ( Show )
data Weight = Normal | Bold deriving ( Show )
data Style = Style Color Weight deri... | zjurelinac/Pljuska | Utility/Terminal.hs | mit | 1,143 | 0 | 8 | 274 | 368 | 202 | 166 | 35 | 1 |
{-# LANGUAGE TypeFamilies #-}
{-|
Module : Data.Torrent.Bencode
Description : Types and functions for handling B-encoded data.
Copyright : (c) Kyle Butt, 2014
License : MIT
Maintainer : kylebutt@gmail.com
Stability : experimental
Portability : TypeFamilies
Bencode Data type and Bencode Catamporphisms, t... | iteratee/haskell-tracker | Data/Torrent/Bencode.hs | mit | 6,856 | 0 | 14 | 1,571 | 1,293 | 709 | 584 | 84 | 1 |
{-
Base Package for Scheme compiler
-}
module Scheme (
module Scheme.Eval,
module Scheme.Lex,
module Scheme.Repl
-- module Scheme.Env
) where
import Scheme.Eval
import Scheme.Lex
import Scheme.Repl
-- import Scheme.Env
| johnellis1392/Haskell-Scheme | Scheme/Scheme.hs | mit | 239 | 0 | 5 | 49 | 42 | 28 | 14 | 7 | 0 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE KindSignatures #-}
module Numeric.Sampling.MCMC where
import Control.Applicative
import Control.Comonad
import Control.Comonad.Cofree
import Control.Lens
import Control.Monad
import Control.Monad.Random
import Data.Foldable
import Data.Traversa... | tel/mcmc | src/Numeric/Sampling/MCMC.hs | mit | 2,222 | 0 | 13 | 470 | 791 | 413 | 378 | -1 | -1 |
module Test.Hierarchical
( tests
) where
import Control.Monad
import Data.Binary
import Data.List.Split
import qualified Data.Clustering.Hierarchical as C
import qualified Data.Vector as V
import System.Random.MWC
import Test.Tasty
import Test.Tasty.HUnit
import Test.Tasty.QuickCheck
import AI.Clustering.Hier... | kaizhang/clustering | tests/Test/Hierarchical.hs | mit | 2,375 | 0 | 14 | 540 | 809 | 408 | 401 | 59 | 1 |
{-# LANGUAGE ConstrainedClassMethods #-}
{-# LANGUAGE QuasiQuotes, TypeFamilies #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE PatternGuards #-}
{-# LANGUAGE Rank2Types #-}
-- | A Yesod plugin for Authentication via e-mail
--
-- This plugin works out of the box by only setting a f... | pikajude/yesod | yesod-auth/Yesod/Auth/Email.hs | mit | 21,109 | 0 | 24 | 6,389 | 3,973 | 2,044 | 1,929 | 341 | 10 |
module GitSystem(filesModifiedByCommitString,
gitLogString) where
import System.Process
import Git
filesModifiedByCommitString :: FilePath -> String -> IO String
filesModifiedByCommitString repoPath commitStr =
readProcess "git" ["-C", repoPath, "diff-tree", "--no-commit-id", "--name-only", "-r", ... | dillonhuff/GitVisualizer | src/GitSystem.hs | gpl-2.0 | 444 | 0 | 7 | 70 | 114 | 64 | 50 | 10 | 1 |
{- |
Module : Cover
Description : Cover relation between processes
Maintainer : emanuele.dosualdo@cs.ox.ac.uk
This module defines a function @isCovered@ checking if a process is covered by
another.
The implementation consists of an improved version of Ullmann's sub-graph
isomorphism algorithm.
-}
module Lan... | bordaigorl/jamesbound | src/Language/PiCalc/Semantics/Cover.hs | gpl-2.0 | 6,565 | 0 | 19 | 1,891 | 1,330 | 714 | 616 | 81 | 7 |
-- Aufgabe 12.4
-- a)
data Expr = TermType Term | NTermType Term | Sum Expr Term | Dif Expr Term deriving Show
data Term = FactorType Factor | Prod Term Factor deriving Show
data Factor = Lit Int | ExprType Expr deriving Show
-- b)
-- Usage in GHCi?
-- Simple example:
-- evalTerm (Prod (FactorType (Lit 4)) (Lit 1))... | KaliszAd/programmierung2012 | aufgabe12_4.hs | gpl-2.0 | 1,109 | 16 | 7 | 221 | 311 | 169 | 142 | 14 | 1 |
module Test.App.Logger (tests) where
import Test.Tasty
import Test.Tasty.HUnit
import qualified Data.Vector as Vector
import App.Logger
import App.Message
tests :: TestTree
tests = testGroup "Logger"
[ loggerAddMessageTests
, loggerNewestMessagesTests
]
loggerAddMessageTests = testGroup "loggerAddStrin... | triplepointfive/hapi | test/Test/App/Logger.hs | gpl-2.0 | 944 | 0 | 13 | 190 | 235 | 130 | 105 | 21 | 1 |
{-# LANGUAGE BangPatterns #-}
{- MD3.hs; Mun Hon Cheong (mhch295@cse.unsw.edu.au) 2005
This module has functions to read and animate MD3 models.
credits go to Ben Humphrey who wrote the MD3 tutorial
Yet another module where i'm thinking of using
vertex buffer objects instead of vertex arrays
-}
modul... | elitak/frag | src/MD3.hs | gpl-2.0 | 39,074 | 2 | 18 | 14,747 | 10,622 | 5,675 | 4,947 | 860 | 2 |
{--
You are given the following information, but you may prefer to do some research for yourself.
1 Jan 1900 was a Monday.
Thirty days has September,
April, June and November.
All the rest have thirty-one,
Saving February alone,
Which has twenty-eight, rain or shine.
And on lea... | goalieca/haskelling | 019.hs | gpl-3.0 | 809 | 0 | 11 | 192 | 114 | 62 | 52 | 6 | 1 |
import System.Random
import Control.Applicative
randomfloat = getStdRandom (randomR (0.0, 1.0))
randompoint = (,) <$> randomfloat <*> randomfloat
runM
| trehansiddharth/mlsciencebowl | uploads/chapter1.hs | gpl-3.0 | 155 | 0 | 8 | 22 | 50 | 27 | 23 | -1 | -1 |
module TransList(transList) where
import AbsWhile
import Data.Data -- Data
import Data.Generics.Schemes -- everywhere
import Data.Generics.Aliases -- mkT
transList :: Data a => a -> a
transList = everywhere (mkT tList)
tList :: Exp -> Exp
tList x = case x of
EListRep exps tl -> case tl of
... | tetsuo-jp/while-C-ocaml | src/desugar/TransList.hs | agpl-3.0 | 517 | 0 | 15 | 133 | 187 | 96 | 91 | 15 | 5 |
{-
Habit of Fate, a game to incentivize habit formation.
Copyright (C) 2017 Gregory Crosswhite
This program is free software: you can redistribute it and/or modify
it under version 3 of the terms of the GNU Affero General Public License.
This program is distributed in the hope that it will be usef... | gcross/habit-of-fate | sources/library/HabitOfFate/Server/Requests/Web/NewGroup.hs | agpl-3.0 | 1,422 | 0 | 10 | 242 | 176 | 108 | 68 | 20 | 1 |
{-
This file is part of Tractor.
Tractor is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Tractor is distribu... | ak1211/tractor | src/KabuCom/Model.hs | agpl-3.0 | 4,145 | 0 | 22 | 1,186 | 445 | 251 | 194 | 45 | 1 |
{-# LANGUAGE TupleSections, OverloadedStrings #-}
module Handler.Home
where
import Import
import Data.List
getHomeR :: Handler Html
getHomeR = do
master <- getYesod
coms <- runDB $ selectList [] [Desc CommentTime]
defaultLayout $ do
setTitle "Yacs :: Home"
$(widgetFile "home")
postHomeR :: Handler Html... | nek0/yacs | Handler/Home.hs | agpl-3.0 | 364 | 0 | 12 | 68 | 98 | 48 | 50 | 13 | 1 |
{-
Habit of Fate, a game to incentivize habit formation.
Copyright (C) 2017 Gregory Crosswhite
This program is free software: you can redistribute it and/or modify
it under version 3 of the terms of the GNU Affero General Public License.
This program is distributed in the hope that it will be usef... | gcross/habit-of-fate | sources/library/HabitOfFate/Server/Requests/Shared/LoginOrCreate.hs | agpl-3.0 | 10,251 | 0 | 27 | 2,864 | 2,375 | 1,191 | 1,184 | 221 | 9 |
module Codewars.Kata.Anagram where
import Data.List
import Data.Char
isAnagramOf :: String -> String -> Bool
isAnagramOf a b = (filter f $ sort $ toUpper <$> a) == (filter f $ sort $ toUpper <$> b)
where ls = ['A' .. 'Z'] ++ ['0' .. '9']
f x = x `elem` ls
--
| ice1000/OI-codes | codewars/1-100/anagram-or-not.hs | agpl-3.0 | 271 | 0 | 10 | 64 | 118 | 66 | 52 | 7 | 1 |
module NotThe where
notThe :: String -> Maybe String
notThe "the" = Nothing
notThe "The" = Nothing
notThe x = Just x
replaceThe :: String -> String
replaceThe = unwords . fmap trans . words
where trans word = trans' (notThe word)
trans' Nothing = "a"
trans' (Just x) = x
countTheBeforeVowel :: ... | aniketd/learn.haskell | haskellbook/notthe.hs | unlicense | 1,450 | 0 | 15 | 440 | 518 | 276 | 242 | 37 | 3 |
module Sing where
fstString :: [Char] -> [Char]
fstString x = x ++ " in the rain"
sndString :: [Char] -> [Char]
sndString x = x ++ " over the rainbow"
sing =
if (x <= y) then fstString x else sndString y
where x = "Singin"
y = "Somewhere"
| thewoolleyman/haskellbook | 05/09/maor/sing.hs | unlicense | 263 | 0 | 7 | 74 | 96 | 54 | 42 | 9 | 2 |
--
-- Copyright (C) 2012 Noriyuki OHKAWA
--
-- 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 ag... | notogawa/fluent-logger-conduit | Network/Fluent/Conduit.hs | apache-2.0 | 1,733 | 0 | 8 | 319 | 257 | 159 | 98 | 18 | 1 |
import Data.List
pack [] = []
pack str@(s:_) =
let n = length $ filter (== s) str
r = filter (/= s) str
in
(s,n):(pack r)
ans ("0":_) = []
ans (n:x) =
let n' = read n :: Int
s = pack $ concat $ map words $ take n' x
s' = sortBy (\ (w0,n0) (w1,n1) -> let c = compare n1 n0
... | a143753/AOJ | 0242.hs | apache-2.0 | 805 | 0 | 16 | 400 | 388 | 200 | 188 | 26 | 3 |
{-# LANGUAGE ExistentialQuantification #-}
-- |
-- Maintainer : Roman Smrž <roman.smrz@seznam.cz>
-- Stability : experimental
--
-- Experimental code providing a structure similar to the standard Map, which
-- is able to swap the data to a database on disk. Unlike 'Swapper', in can
-- swap both data and indices, an... | roman-smrz/swapper | src/Data/Disk/SwapMap.hs | bsd-2-clause | 5,527 | 0 | 17 | 1,852 | 1,528 | 768 | 760 | 94 | 4 |
--
-- Copyright 2014, NICTA
--
-- This software may be distributed and modified according to the terms of
-- the BSD 2-Clause license. Note that NO WARRANTY is provided.
-- See "LICENSE_BSD2.txt" for details.
--
-- @TAG(NICTA_BSD)
--
-- Printer for C source format to be consumed by the CapDL initialiser.
-- Note: corr... | seL4/capDL-tool | CapDL/PrintC.hs | bsd-2-clause | 14,045 | 0 | 34 | 3,531 | 4,202 | 2,134 | 2,068 | 259 | 13 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QAbstractPrintDialog_h.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:20
Warning : this file is machine gener... | uduki/hsQt | Qtc/Gui/QAbstractPrintDialog_h.hs | bsd-2-clause | 65,605 | 0 | 18 | 12,889 | 19,859 | 9,578 | 10,281 | -1 | -1 |
-- |
-- Module : Text.Megaparsec.Lexer
-- Copyright : © 2015 Megaparsec contributors
-- © 2007 Paolo Martini
-- © 1999–2001 Daan Leijen
-- License : BSD3
--
-- Maintainer : Mark Karpov <markkarpov@opmbx.org>
-- Stability : experimental
-- Portability : non-portable (use... | neongreen/megaparsec | Text/Megaparsec/Lexer.hs | bsd-2-clause | 10,535 | 0 | 15 | 2,095 | 1,524 | 834 | 690 | -1 | -1 |
-- | Maintainer: 2016 Evan Cofsky <evan@theunixman.com>
--
-- Functions running zfs processes.
module Propellor.Property.ZFS.Process where
import Propellor.Base
import Data.String.Utils (split)
import Data.List
-- | Gets the properties of a ZFS volume.
zfsGetProperties :: ZFS -> IO ZFSProperties
zfsGetProperties z... | ArchiveTeam/glowing-computing-machine | src/Propellor/Property/ZFS/Process.hs | bsd-2-clause | 1,144 | 2 | 17 | 200 | 349 | 187 | 162 | 15 | 1 |
import Data.Maybe
-- fmap :: (a -> b) -> f a -> f b
onList = fmap (+ 1) [1,2,3]
onJust = fmap (+ 1) (Just 4)
onNothing = fmap (+ 1) Nothing
data MyTree a = Leaf a
| Node a (MyTree a) (MyTree a)
deriving (Show,Eq)
instance Functor MyTree where
fmap f (Leaf a) = Leaf (f a)
fmap f ... | fffej/haskellprojects | misc/TypeClassopedia.hs | bsd-2-clause | 473 | 0 | 9 | 139 | 255 | 134 | 121 | 12 | 1 |
{-# LANGUAGE OverloadedStrings #-}
--------------------------------------------------------------------
-- |
-- Module : Text.Atom.Feed.Export
-- Copyright : (c) Galois, Inc. 2008
-- License : BSD3
--
-- Maintainer: Sigbjorn Finne <sof@galois.com>
-- Stability : provisional
-- Description: Convert from Atom to XML... | haskell-pkg-janitors/feed | Text/Atom/Feed/Export.hs | bsd-3-clause | 9,270 | 8 | 25 | 2,946 | 2,662 | 1,369 | 1,293 | 192 | 5 |
module Data.Bitmap.Types
( Dimensions
, Coordinates
, Depth(..)
, CompleteBitmapFormat(..)
, ImageBitmapFormat(..)
) where
-- | (width, height)
type Dimensions i = (i, i)
-- | (row, column)
type Coordinates i = (i, i)
-- | These are the color depths that the bitmap class supports
--
-- The de... | bairyn/bitmaps | src/Data/Bitmap/Data.hs | bsd-3-clause | 2,348 | 0 | 6 | 579 | 183 | 119 | 64 | 17 | 0 |
module Crypto.Hash.TX.Utils
( MD5Hash(..)
, SHA256Hash(..)
, md5HashFile, md5HashBS, md5HashLBS
, sha256HashFile, sha256HashBS, sha256HashLBS
) where
-- {{{1 imports
import Prelude
import qualified Crypto.Hash.MD5 as MD5
import qualified Crypto.Hash.SHA256 as SHA256
import qualified Data.B... | txkaduo/hs-hash-utils | Crypto/Hash/TX/Utils.hs | bsd-3-clause | 2,803 | 0 | 8 | 680 | 748 | 414 | 334 | 63 | 1 |
module Frameworks.CoreFoundation.Range where
data Range = Range { rangeLocation, rangeLength :: Index }
| ekmett/objective-c | Frameworks/CoreFoundation/Range.hs | bsd-3-clause | 105 | 0 | 8 | 14 | 24 | 16 | 8 | 2 | 0 |
{-# OPTIONS_GHC -Wall #-}
module Homework.A.HanoiSpec where
import Homework.A.Hanoi
import Test.Hspec
a = "a"
b = "b"
c = "c"
spec :: Spec
spec = describe "Homework.A.Hanoi" $ do
describe "hanoi" $ do
it "solves the problem for 1 disc" $ do
hanoi 1 a b c `shouldBe` [(a,b)]
it "solves the problem fo... | nicolashery/cis194 | test/Homework/A/HanoiSpec.hs | bsd-3-clause | 516 | 0 | 16 | 127 | 244 | 140 | 104 | 16 | 1 |
{-|
Module : $Header$
Description : Adapter for communicating with Telegram via its http poll API.
Copyright : (c) Justus Adam, 2017
License : BSD3
Maintainer : dev@justus.science
Stability : experimental
Portability : POSIX
See http://marvin.readthedocs.io/en/latest/adapters.html#poll for documentation ... | JustusAdam/marvin | src/Marvin/Adapter/Telegram/Poll.hs | bsd-3-clause | 3,697 | 0 | 20 | 956 | 720 | 385 | 335 | -1 | -1 |
-- Exercise1.hs
module Exercise1 where
-- Exercise 1.
-- Add support for the backquote syntactic sugar: the Scheme standard details
-- what it should expand into (quasiquote/unquote).
import Control.Monad
import System.Environment
import Text.ParserCombinators.Parsec hiding (spaces)
data LispVal = Atom String
... | EFulmer/haskell-scheme-wikibook | src/Exercises/Ch2/Pt2/Exercise1.hs | bsd-3-clause | 3,012 | 0 | 11 | 828 | 730 | 361 | 369 | 78 | 3 |
{-
Copyright (c) 2004, Philippa Jane Cowderoy
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,
this list of conditions ... | nh2/flippi | src/ScriptSyntax.hs | bsd-3-clause | 5,215 | 4 | 22 | 2,757 | 793 | 374 | 419 | 71 | 4 |
{-# OPTIONS_GHC -XBangPatterns #-}
module Main where
import System.Random
import qualified Yaiba.Monomial as MMap
import qualified Yaiba.MonomialVec as MVec
import System.CPUTime
import Text.Printf
import Control.Monad
import Control.Parallel.Strategies
import Microbench
lim :: Int
lim = 10^6
randoList :: IO [([Int]... | jeremyong/Yaiba | Test/MonSpeedo.hs | bsd-3-clause | 1,318 | 0 | 14 | 323 | 593 | 305 | 288 | -1 | -1 |
{-# LANGUAGE RankNTypes #-}
module Language.Java.JVM.JavapParser where
import Language.Java.JVM.Types
import Control.Monad
import Data.Functor.Identity
import Data.List
import Data.Maybe
import Text.Parsec
import qualified Text.Parsec.Token as P
import Text.Parsec.Language (javaStyle)
data TypeDecl=TypeDecl {
... | JPMoresmau/HJVM | src/Language/Java/JVM/JavapParser.hs | bsd-3-clause | 5,927 | 0 | 21 | 2,207 | 1,455 | 744 | 711 | 133 | 2 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Foundation where
import Import.NoFoundation as Import
import Database.Persist.Sql (ConnectionPool, runSqlPool)
import Text.Hamlet (hamletFile)
import Text.Jasmine (minifym)
import Yesod.Auth.Message (AuthMessage (InvalidLogin))
import Yesod.Default.Util (addStaticConten... | cutsea110/BISocie | Foundation.hs | bsd-3-clause | 13,372 | 0 | 19 | 2,985 | 3,301 | 1,618 | 1,683 | -1 | -1 |
{-# LANGUAGE QuasiQuotes #-}
import LiquidHaskell
type State = Int
data ST a b = S (b -> (a, b)) | F a | G (b -> a)
[lq| fresh :: ST {v:Int|v>=0} {v:Int|v>=0} |]
fresh :: ST Int Int
fresh = S $ \n -> (n, n+1)
| spinda/liquidhaskell | tests/gsoc15/unknown/pos/state00.hs | bsd-3-clause | 217 | 0 | 9 | 56 | 93 | 56 | 37 | 7 | 1 |
{-# LANGUAGE FlexibleContexts #-}
-----------------------------------------------------------------------------
-- |
-- Module : Language.R.Lexer
-- Copyright : (c) 2010 David M. Rosenberg
-- License : BSD3
--
-- Maintainer : David Rosenberg <rosenbergdm@uchicago.edu>
-- Stability : experimental
-- Porta... | rosenbergdm/language-r | src/Language/R/Lexer.hs | bsd-3-clause | 16,254 | 0 | 18 | 5,165 | 3,739 | 2,153 | 1,586 | 361 | 2 |
-- | This bitmap type is deprecated; use 'Data.Bitmap.String' instead
--
-- Bitmaps represented as strings
--
-- The module provides polymorphic support for representation of bitmaps as strings.
-- This module is designed to be most efficient with lazy bytestrings.
module Data.Bitmap.StringRGB24A4VR {-# DEPRECATED "Us... | bairyn/bitmaps | src/Data/Bitmap/StringRGB24A4VR.hs | bsd-3-clause | 439 | 0 | 4 | 65 | 26 | 20 | 6 | 3 | 0 |
-----------------------------------------------------------
-- |
-- Module : PrimQuery
-- Copyright : Daan Leijen (c) 1999, daan@cs.uu.nl
-- HWT Group (c) 2003, haskelldb-users@lists.sourceforge.net
-- License : BSD-style
--
-- Maintainer : haskelldb-users@lists.sourceforge.net
-- Stabil... | m4dc4p/haskelldb | src/Database/HaskellDB/PrimQuery.hs | bsd-3-clause | 9,660 | 54 | 15 | 3,387 | 2,613 | 1,450 | 1,163 | 188 | 10 |
-- boilerplate {{{
module Data.SGF.Parse.Util where
import Control.Arrow
import Control.Monad.Error hiding (Error(..))
import qualified Control.Monad.Error as Either
import Control.Monad.State hiding (State(..))
import Control.Monad.Writer
import Data.Char
import Data.Encoding
import Data.Function
import Data.Ix
impor... | dmwit/sgf | Data/SGF/Parse/Util.hs | bsd-3-clause | 9,423 | 0 | 18 | 2,211 | 3,375 | 1,776 | 1,599 | 201 | 6 |
module Battleships.Game where
import System.Random -- for randoms
import System.IO -- for hFlush
import Prelude
import Data.List as List
import Data.Map as Map
import Data.Maybe as Maybe
type Unit = Int
type Coord = (Unit, Unit)
--Record:
nr_cols, nr_lines :: Int -- maximum value!
nr_cols = 10
nr_lines =... | fokot/battleships | src/Battleships/Game.hs | bsd-3-clause | 6,422 | 0 | 23 | 2,006 | 1,681 | 913 | 768 | 96 | 5 |
--
-- Canonicalize.hs
--
-- Transform an expression into canonical form. This is essentially
-- a simplification, but the real goal is that identical expressions
-- will have identical representations after canonicalization.
--
-- Gregory Wright, 27 April 2011
--
module Math.Symbolic.Wheeler.Canonicalize (
can... | gwright83/Wheeler | src/Math/Symbolic/Wheeler/Canonicalize.hs | bsd-3-clause | 15,405 | 0 | 16 | 4,851 | 4,903 | 2,550 | 2,353 | 297 | 6 |
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
--
-- RegTypes.hs --- General Purpose Timer (TIM2 to TIM5) register types
--
-- Copyright (C) 2013, Galois, Inc.
-- All Rights Reserved.
--
module Ivory.BSP.STM32.Peripheral.GTIM2345.RegTy... | GaloisInc/ivory-tower-stm32 | ivory-bsp-stm32/src/Ivory/BSP/STM32/Peripheral/GTIM2345/RegTypes.hs | bsd-3-clause | 856 | 0 | 4 | 187 | 41 | 33 | 8 | 8 | 0 |
import System.Environment (getArgs)
import Data.Bits ((.&.), (.|.), bit)
import Data.List (sort)
import Data.List.Split (splitOn)
hor :: [Int]
hor = [0x42, 0x84, 0x108, 0x210,
0x840, 0x1080, 0x2100, 0x4200,
0x10800, 0x21000, 0x42000, 0x84000,
0x210000, 0x420000, 0x840000, 0x1080000,
0x1806,... | nikai3d/ce-challenges | moderate/builders_team.hs | bsd-3-clause | 1,628 | 0 | 13 | 571 | 639 | 358 | 281 | 42 | 1 |
{-# OPTIONS_GHC -fdefer-typed-holes #-}
----------------------------------------------------------------------------------------------------
-- |
-- Module : Numeric.Algebra.Elementary.Solve
-- Copyright : William Knop 2015
-- License : BSD3
--
-- Maintainer : william.knop.nospam@gmail.com
-- Portabi... | altaic/algebra-elementary | src/Numeric/Algebra/Elementary/Solve.hs | bsd-3-clause | 547 | 0 | 4 | 83 | 30 | 26 | 4 | 3 | 0 |
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE MonadComprehensions #-}
{-# LANGUAGE OverloadedLists #-}
{-# LANGUAGE ScopedTypeVar... | TikhonJelvis/different-tries | src/Trie/Vector.hs | bsd-3-clause | 8,037 | 96 | 13 | 2,402 | 2,367 | 1,231 | 1,136 | -1 | -1 |
module Reverse where
-- Chapter 3 exercise
dropLast :: [a] -> [a]
dropLast x = take (len - 1) x
where len = length x
rvrs :: [a] -> [a]
rvrs [] = []
rvrs x = last : rvrs (dropLast x)
where len = length x
last = x !! (len - 1)
main :: IO ()
main = print $ rvrs "Curry is awesome."
| tkasu/haskellbook-adventure | app/Reverse.hs | bsd-3-clause | 309 | 0 | 9 | 95 | 146 | 78 | 68 | 11 | 1 |
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeFamilies #-}
module Pos.Diffusion.Full.Update
( sendVote
, sendUpdateProposal
, updateListeners
, updateOutSpecs
) where
import Universum
import qualified Network.Broadcast.OutboundQueue as OQ
import Pos.Chain.Upd... | input-output-hk/pos-haskell-prototype | lib/src/Pos/Diffusion/Full/Update.hs | mit | 3,628 | 0 | 11 | 954 | 748 | 427 | 321 | 84 | 1 |
module Nancy.Core.Env where
import qualified Data.Map as Map
import Text.PrettyPrint
import Text.PrettyPrint.HughesPJClass
import Control.Monad.Identity
import Control.Monad.Except
import Control.Monad.Reader
import Control.Monad.Writer
newtype Env v = Env (Map.Map String v)
deriving (Eq, Show)
instance (Pretty v)... | jgardella/nancy | src/Nancy/Core/Env.hs | mit | 1,086 | 0 | 16 | 240 | 518 | 264 | 254 | 32 | 2 |
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, GeneralizedNewtypeDeriving, FlexibleInstances #-}
module Database.Redis.Simple (
runRedis,
auth,
echo,
ping,
quit,
select,
del,
dump,
exists,
expire,
expireAt,
keys,
migrate,
move,
objectRefCount,
objectEncoding,
objectIdleTim... | SaneApp/hedis-simple | src/Database/Redis/Simple.hs | mit | 22,889 | 0 | 13 | 4,439 | 9,936 | 5,171 | 4,765 | 503 | 1 |
{-# language DeriveDataTypeable #-}
module Brainfuck.Syntax.Data where
import Autolib.Size
import Data.Typeable
data Statement
= Block [ Statement ]
| Plus
| Minus
| MRight
| MLeft
| Input
| Output
| Loop [ Statement ]
| Null -- kommentare und co
deriving (... | florianpilz/autotool | src/Brainfuck/Syntax/Data.hs | gpl-2.0 | 401 | 0 | 7 | 130 | 92 | 56 | 36 | 17 | 0 |
{-# LANGUAGE
FlexibleInstances
, TypeSynonymInstances
#-}
{- |
Module : ./OMDoc/XmlInterface.hs
Description : OMDoc-XML conversion
Copyright : (c) Ewaryst Schulz, DFKI 2009
License : GPLv2 or higher, see LICENSE.txt
Maintainer : ewaryst.schulz@dfki.de
Stability : provisional
Portability : po... | spechub/Hets | OMDoc/XmlInterface.hs | gpl-2.0 | 20,517 | 0 | 17 | 6,345 | 5,986 | 2,951 | 3,035 | 425 | 3 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE Rank2Types #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_HADDOCK show-extensions #-}
-- |
-- Module : Yi.Config.Simple
-- License : GPL-2
-- Maintainer : yi-devel@googlegroups.com
-- Stability : experimental
-- Portability : portable
--
-- A simplifi... | siddhanathan/yi | yi-core/src/Yi/Config/Simple.hs | gpl-2.0 | 12,302 | 0 | 13 | 2,545 | 1,879 | 1,105 | 774 | 187 | 3 |
{-# LANGUAGE OverloadedStrings #-}
-- Derived from AWS service descriptions, licensed under Apache 2.0.
-- |
-- Module : Network.AWS.ELB.Types
-- Copyright : (c) 2013-2015 Brendan Hay
-- License : Mozilla Public License, v. 2.0.
-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
-- Stability : auto-g... | fmapfmapfmap/amazonka | amazonka-elb/gen/Network/AWS/ELB/Types.hs | mpl-2.0 | 10,878 | 0 | 13 | 2,240 | 1,634 | 917 | 717 | 238 | 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-ec2/gen/Network/AWS/EC2/ReleaseAddress.hs | mpl-2.0 | 4,601 | 0 | 11 | 893 | 543 | 333 | 210 | 67 | 1 |
module Ast.UsedNamesSpec where
import Control.Exception
import Data.Foldable
import Data.List
import Test.Hspec
import Ast.UsedNames
spec :: Spec
spec = do
let errs :: [(String, ())]
errs =
("errorNyiData", errorNyiData ()) :
("errorNyiOutput... | froozen/dead-code-detection | test/Ast/UsedNamesSpec.hs | bsd-3-clause | 811 | 0 | 21 | 244 | 227 | 121 | 106 | 22 | 1 |
-- |
-- Module : Foundation.Primitives.Types.AsciiString
-- License : BSD-style
-- Maintainer : Haskell Foundation
-- Stability : experimental
-- Portability : portable
--
-- A AsciiString type backed by a `ASCII` encoded byte array and all the necessary
-- functions to manipulate the string.
--
{-# LANGUAG... | vincenthz/hs-foundation | basement/Basement/Types/AsciiString.hs | bsd-3-clause | 2,216 | 0 | 11 | 477 | 347 | 205 | 142 | 34 | 1 |
--------------------------------------------------------------------------
-- Copyright (c) 2007-2010, ETH Zurich.
-- All rights reserved.
--
-- This file is distributed under the terms in the attached LICENSE file.
-- If you do not find this file, copies can be found by writing to:
-- ETH Zurich D-INFK, Haldeneggsteig... | mslovy/barrelfish | hake/Args.hs | mit | 4,350 | 0 | 51 | 1,177 | 1,033 | 606 | 427 | 86 | 1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
module Test.Common.TestHandler (testHandler) where
------------------------------------------------------------------------------
import Control.Concurrent (threadDelay)
import Control.Exception (throwIO)
... | k-bx/snap-server | test/Test/Common/TestHandler.hs | bsd-3-clause | 7,608 | 0 | 17 | 2,455 | 1,600 | 858 | 742 | 144 | 4 |
module Distribution.Simple.HaskellSuite where
import Control.Monad
import Data.Maybe
import Data.Version
import qualified Data.Map as M (empty)
import Distribution.Simple.Program
import Distribution.Simple.Compiler as Compiler
import Distribution.Simple.Utils
import Distribution.Simple.BuildPaths
import Distribution.... | tolysz/prepare-ghcjs | spec-lts8/cabal/Cabal/Distribution/Simple/HaskellSuite.hs | bsd-3-clause | 8,207 | 0 | 21 | 1,849 | 1,986 | 1,032 | 954 | 172 | 4 |
<?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="ar-SA">
<title>Report Generation</title>
<maps>
<homeID>reports</homeID>
<mapref locati... | kingthorin/zap-extensions | addOns/reports/src/main/javahelp/org/zaproxy/addon/reports/resources/help_ar_SA/helpset_ar_SA.hs | apache-2.0 | 966 | 77 | 66 | 156 | 407 | 206 | 201 | -1 | -1 |
--------------------------------------------------------------------------------
-- | Deal with Cmm registers
--
module LlvmCodeGen.Regs (
lmGlobalRegArg, lmGlobalRegVar, alwaysLive,
stgTBAA, baseN, stackN, heapN, rxN, otherN, tbaa, getTBAA
) where
#include "HsVersions.h"
import Llvm
import CmmE... | lukexi/ghc-7.8-arm64 | compiler/llvmGen/LlvmCodeGen/Regs.hs | bsd-3-clause | 5,473 | 0 | 11 | 1,605 | 1,432 | 733 | 699 | 92 | 43 |
module RenameParamIn2 where
{- add1 n xs = foldl (+) n xs -}
add1 n xs = (case ((+), n, xs) of
(f, z, []) -> z
(f, z, (x : xs)) -> add1 ( ((+) n x)) xs)
{- by the rule above:
foldl f (f z x) xs = add1 (f z x) xs -}
| kmate/HaRe | old/testing/generativeFold/RenameParamIn2_TokOut.hs | bsd-3-clause | 263 | 0 | 12 | 105 | 91 | 55 | 36 | 4 | 2 |
module Prelude where
data Int
data Bool = False|True
--f x = (x::Int,x::Bool)
g = \ x->x::Int
| forste/haReFork | tools/base/tests/tiTest9.hs | bsd-3-clause | 97 | 0 | 5 | 20 | 31 | 20 | 11 | -1 | -1 |
{-# LANGUAGE CPP, ForeignFunctionInterface #-}
module Data.HashMap.PopCount
( popCount
) where
#if __GLASGOW_HASKELL__ >= 704
import Data.Bits (popCount)
#else
import Data.Word (Word)
import Foreign.C (CUInt)
#endif
#if __GLASGOW_HASKELL__ < 704
foreign import ccall unsafe "popc.h popcount" c_popcount :: CUI... | pacak/cuddly-bassoon | unordered-containers-0.2.8.0/Data/HashMap/PopCount.hs | bsd-3-clause | 419 | 0 | 9 | 65 | 78 | 46 | 32 | 8 | 1 |
-- !!! Desugaring sections with function-type arguments
-- Although this is really a desugaring test, the problem is
-- only tickled by the simplifier
-- type Foo a b = a -> (b -> a) -> b
module ShouldCompile where
(++++) :: (a -> (b -> a) -> b) -> (a -> (b -> a) -> b) -> a -> (b -> a) -> b
x ++++ y = y
g a xs = ma... | ghc-android/ghc | testsuite/tests/simplCore/should_compile/simpl001.hs | bsd-3-clause | 360 | 0 | 11 | 91 | 123 | 69 | 54 | 5 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.